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

Hi @kresh.bell ,

 

I started replying to this earlier but had to take a meeting, and @Andrii_Humeniuk was too fast for me! and had already provided a solution by the time I started to post this.

 

In any case, I had this version ready, so I'll share it also... maybe it'll help someone in the future.

 

It looks like the 2 versions work pretty much the same.

 

The primary difference I see is that Andrii's excellent version reaches down into a subassembly and gets the part, when a subassembly is selected. Whereas my example gets the subassembly description. 

 

Also my example highlights the selected component by using the select set and puts the name in the message box, but those are minor differences.

 

I hope this helps.
Best of luck to you in all of your Inventor pursuits,
Curtis
http://inventortrenches.blogspot.com

 

Dim oOccurrence As ComponentOccurrence

msg = "Select a component (press ESC to exit)"
While True
	oOccurrence = ThisApplication.CommandManager.Pick(SelectionFilterEnum.kAssemblyOccurrenceFilter, msg)

	' If nothing gets selected then we're done	
	If IsNothing(oOccurrence) Then Exit While

	oName = oOccurrence.Name

	ThisApplication.ActiveDocument.selectset.select(oOccurrence)
	oDesc = iProperties.Value(oName, "Project", "Description")
	oDesc = InputBox(oName & " Description", "iLogic", oDesc)
	If Not oDesc = Nothing Then iProperties.Value(oName, "Project", "Description") = oDesc

End While