No one on here or at work has been able to resolve this issue yet. I'm trying to remain optimistic that it is possible. I just don't see how DS wouldn't have put in the capability for this.
Once again: I'm trying to create a macro that will read both configuration specific information (CreateMassProperties) AND assigned mass (GetMassProperty).
The issue is that CreateMassProperties overwrites any assigned mass and GetMassProperty only gets the mass of the last saved configuration of whichever part it's on. So if you're needing mass properties for -003 and the part was last saved in -001, it will give you the mass properties of -001.
I need the macro to do both. I have tried and tried. I've looked at every bit of code I could find that bore some relevance to mine. They all have the same issues I'm having.
For i = 0 To UBound(Bodies) RetBool = SwComp.AddBodies(Bodies) Set swBody = Bodies(i) Mass = swBody.GetMassProperties2 xlsheet.Range("I" & xlCurRow).Value = Mass(5) 'swMass = .GetMassProperty 'ReferencedConfiguration & Chr(13) xlsheet.Range("D" & xlCurRow).Value = swMass(5) 'vMassProp 'troubleshooting nDensity = tmpModel.GetUserPreferenceDoubleValue(swMaterialPropertyDensity) 'DO NOT USE tmpModExt vMassProp = swBody.GetMassProperties(nDensity) xlsheet.Range("E" & xlCurRow).Value = vMassProp(5) 'troubleshooting '****************** Example of Issue **************** Assigned = tmpModel.GetMassProperties xlsheet.Range("F" & xlCurRow).Value = Assigned(5) 'troubleshooting xlsheet.Range("G" & xlCurRow).Value = MassProp.Mass 'from CreateMassProperties 'troubleshooting
At the bottom you'll see the code that outputs the issues I mention above. I believe I have tried everything, but nothing has worked and I don't have any more ideas. I'm to the point where I've begun doing things I've already done months ago. The result is not any better.
Can anyone take one last look at this?