I'm looking for an API function that can look at the Bend Line notes on a sheet metal part in a drawing. If the part is Face-Down, the macro will flip the part to Face-Up. This would work in the same way as when you click "Flip View" in the Flat Pattern Options while in a Drawing View of a...
I seem to have found a Solidworks API oddity or bug...
When I use the following code (below) to add a custom property Name "Volume" with a Value of
"SW-Mass@P-24-3-6.SLDPRT", it almost works as expected. The value is added correctly, exactly as it should be.
However, when I check the results...
Hi all,
Bear with me here, I'm trying to learn how to use the SldWorks.CustomPropertyManager object, but the examples I've see in SW API help require the user to select a "weldment feature", and the API code uses a "SldWorks.SelectionMgr" object to set the "SldWorks.Feature" object, which...
When adding Custom Properties for components I've noticed that, depending on the part, certain "Text Expressions" are available for one part and unavailable for others. For example, I'm told by our engineers that the Text Expression for a "Thickness" property is only available for a sheet metal...
I seem to have a problem grasping the concept of VB objects and their requirements for use. I'm trying to traverse an assembly to check the custom properties of every component for certain values. The problem first occurs when I get to the 2nd level of the assembly, and I call a subroutine that...
I have a macro that traverses an assembly to generate a customized Bill of Materials. I'm still in the testing phases, and I've run the macro on many different SW assemblies with no problem, but there is one small assembly that is giving me a problem.
For some reason, the macro is not grabbing...
Help! My code was working fine yesterday, I'm not sure what happened. I have an object swChildComp, declared as
Dim swChildComp As SldWorks.Component2
-- which works fine, because I can extract a part name from it
strModName = swChildComp.Name
--but when I try to set another...
My code seemed to be working fine earlier, and I was actually getting the custom properties for the parts, but somewhere I screwed something up in my haste.
Here is the extent of my code:
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Const swDocAssembly = 2
Option Explicit...
I'm new to Solidworks API, and I've checked the built-in API help, searched these forums, and Google'd the web for help but found nothing that suits my needs so far.
I'm looking for a code example that traverses an open assembly in SW and scans every component for it's custom properties. For...
Hi all, newbie question here...
I have a macro that traverses an assembly to create an indented Bill of Materials. The problem I'm having is that our engineers use expressions in the custom property fields rather than absolute values. I see that the values are automatically evaluated and...