AnsweredAssumed Answered

Mass Properties of Sub-Assemblies Macro

Question asked by Paul Ryan on Apr 25, 2013
Latest reply on Apr 26, 2013 by Jerry Steiger

Hello,

 

I am new to SolidWorks and SolidWorks VBA.  I am trying to do something simple I believe but I have been unsuccessful. 

 

Problem:  Given a top level assembly, I would like the mass properties of sub-assemblies in the sub-assembly's coordinate system/origin.   Also, I would like to have that coordinate system/origin location and orientation relative to the top level assemblies. 

 

Failed Solution:  I have tried to use the "Transform2" method on my Component2 object, but I get an error if any of the sub-assemblies are classifed as "Flexible".  I have tried the MassProperty object on an assembly and I get an error.  I have tried modifying macros found in these forums and the help documentation but my VBA skills are not up to par.

 

 

I have attached the the macro for the Transform.  How could I get it to work with Flexible Sub-Assemblies and add the mass properties of those files?  Any help would be greatly appreciated.

Attachments

Outcomes