011 - 更新工程图中的质量属性
2023-12-29 本文已影响0人
怪怪001
设计背景:打开工程图发现质量属性为无。
实际问题是:零件或者装配体的零件质量属性没有更新
期望的结果:工程图中的质量属性显示数值。
iLogic代码如下:
Dim oDoc As DrawingDocument = ThisDoc.Document
Dim oViewModelDoc As Document
For Each oSheet As Sheet In oDoc.Sheets
For Each oView As DrawingView In oSheet.DrawingViews
oViewModelDoc = oView.ReferencedDocumentDescriptor.ReferencedDocument
oViewModelDoc = ThisApplication.Documents.Open(oViewModelDoc.fullfilename, True)
oViewModelDoc.activate
ThisApplication.CommandManager.ControlDefinitions.Item("AppUpdateMassPropertiesCmd").Execute
iLogicVb.UpdateWhenDone=True
oViewModelDoc.Close
Next
Next