Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.
mcgyvr
in reply to: michael6T7C2

@michael6T7C2 

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