NX二次开发源码分享: 快速获取显示部件下所有的视图
NX二次开发源码分享: 快速获取显示部件下所有的视图比较快的方法吧,直接找属性VWLETTER
For Each dwg As Drawings.DrawingSheet In theSession.Parts.Display.DrawingSheets
Echo("Drawing: " & dwg.Name.ToString)
For Each draftingView As Drawings.DraftingView In dwg.GetDraftingViews()
If draftingView.HasUserAttribute("VWLETTER", NXObject.AttributeType.String, -1) Then
Echo(" " & draftingView.Name & " - " &
draftingView.GetUserAttributeAsString("VWLETTER", NXObject.AttributeType.String, -1))
Else
Echo(" " & draftingView.Name)
End If
Next
Next
End Sub
页:
[1]