As some are aware, if you assign a mass to a component, rather than letting the mass be calculated based on the volume and density, SolidWorks can't calculate and display the moments of inertia for that component or any assembly that references it. (A workaround is to create a custom material and tweak the density to yield the correct mass, if known) I have an assembly that apparently contains such a compoment or components, but I don't know which one(s). is there a way to find out which components in an assembly have assigned mass, without opening each individually? I tinkered with assembly visualization a bit, but haven't been successful so far. In this particular assembly, there are 224 unique components. I expect no more than one or two are culprits, since I was able to get moments of inertia from an earlier revision of this assembly recently.
Also, is there anything other than assigned mass that would cause the moments of inertia not to display?
To narrow it down, can you look at the files that were saved recently. Those whose date and time stamps in Windows Explorer are recent. Sort your Windows Explorer by Date Modified. Not sure if you can do a sort like that in your PDM system if you are using one.
I am wondering if Assigned Mass can be searched for with a Macro. The macro would search all the files in the assembly and report those with Assigned Mass set.
Here is what I get when I record a macro and set an assigned property. So it would appear that you could search for that with a macro through a set of SolidWorks files.
Dim swApp As Object
Dim Part As Object
Dim boolstatus As Boolean
Dim longstatus As Long, longwarnings As Long
Sub main()
Set swApp = _
Application.SldWorks
Set Part = swApp.ActiveDoc
Dim myMassProp As Object
Set myMassProp = Part.Extension.CreateMassProperty()
boolstatus = myMassProp.SetAssignedMassProp(0.453592497943, -0.005833689969584, 0.005334, -0.001676447737477, 1, Nothing)
End Sub
You may want to ask your question in the API forum.
Cheers,
Anna