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

Hi @jonatan.holmgren ,

 

Try something like this example, which sets the part number of each selected occurrence to be 777, note that this example might error out if a browser node that was not an occurence was selected, such as an assembly level work plane, etc.

 

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

 

Dim oAsmCompDef As AssemblyComponentDefinition
oAsmCompDef = ThisApplication.ActiveDocument.ComponentDefinition

Dim oSelection As SelectSet
oSelection = ThisApplication.ActiveDocument.SelectSet

Dim oOccurrence As ComponentOccurrence
For Each oOccurrence In oSelection
	iProperties.Value(oOccurrence.Name, "Project", "Part Number") = "777"
Next