03-01-2021
05:55 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
03-01-2021
05:55 AM
How's this?
Dim oSSet As SelectSet = ThisDoc.Document.SelectSet
If oSSet.Count = 0 Then
MsgBox("Select a drawing view")
Exit Sub
End If
'Reference to the drawing view from the 1st selected object
Dim oView As DrawingView = TryCast(oSSet.Item(1), DrawingView)
If oView IsNot Nothing Then
'get the model
oModelName = oView.ReferencedDocumentDescriptor.ReferencedDocument.DisplayName
'get the properties from the model
oPartNumber = iProperties.Value(oModelName, "Project", "Part Number")
oMember = iProperties.Value(oModelName, "Custom", "Member")
oTotalQty = iProperties.Value(oModelName, "Custom", "TotalQty")
'modify the view label as needed
oView.Label.FormattedText = oPartNumber & vbCrLf & oMember & vbCrLf & oTotalQty & " X OFF"
Else
MsgBox("Selected object is not a drawing view")
End If
-------------------------------------------------------------------------------------------
Inventor 2023 - Dell Precision 5570
Did you find this reply helpful ? If so please use the Accept Solution button below.
Maybe buy me a beer through Venmo @mcgyvr1269