Fail to update Mass, on title block on idw, but update the sek I open the model files ?

Fail to update Mass, on title block on idw, but update the sek I open the model files ?

Darkforce_the_ilogic_guy
Advisor Advisor
181 Views
1 Reply
Message 1 of 2

Fail to update Mass, on title block on idw, but update the sek I open the model files ?

Darkforce_the_ilogic_guy
Advisor
Advisor

I have this properties in idw title block . Something it just show N/A. Insted of  the mass ... is there a way to force it  to have the mass before save ?.  If i open the model and go back to the idw the mass is updateded without doing anything else then open the model

 

bt_1-1663848354880.png

 

bt_0-1663848322511.png

 

---

bt_3-1663848649884.png

 

 

 

 

0 Likes
182 Views
1 Reply
Reply (1)
Message 2 of 2

tyler.warner
Advocate
Advocate

@Darkforce_the_ilogic_guy you can add this rule to the drawing & have it set to run on the save event trigger.

 

Dim oDocument As Document = ThisApplication.ActiveDocument

Dim oPartDocument As PartDocument = oDocument.AllReferencedDocuments.Item(1)
Dim oPartCompDef As PartComponentDefinition = oPartDocument.ComponentDefinition
Dim oMassProps As MassProperties = oPartCompDef.MassProperties
Dim oMass As Double = oMassProps.Mass
	
Dim oCommandManager As CommandManager = ThisApplication.CommandManager
Dim oControlDefs As ControlDefinitions = oCommandManager.ControlDefinitions

oControlDefs.Item("AppUpdateMassPropertiesCmd").Execute()
oPartDocument.Update()
oDocument.Update()
If this solved your problem or answered your question, please click ACCEPT SOLUTION.
If this helped you, please click LIKE.
0 Likes