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

I'm not sure what your code did, or If I just don't understand how to use it.

However, I think maybe your code is a bit too complicated for its use? Maybe I'm wrong.

 

I've looked a bit around and found out that this short code does almost what I need it to do.

 

Dim oAsmCompDef As AssemblyComponentDefinition
oAsmCompDef = ThisApplication.ActiveDocument.ComponentDefinition

Dim oOccurrence As ComponentOccurrence

For Each oOccurrence In oAsmCompDef.Occurrences.AllReferencedOccurrences(oAsmCompDef) 
	
iProperties.Value("Custom", "Temp PartNum") = iProperties.Value(oOccurrence.Name, "Project", "Part Number")

Next

 

Now I just need the 'Next' at the end to wait for user input istead of being automatic. I guess this is what you did with following code:

 

Dim oIndex As Integer
Dim oLastOne As Integer
If
	oIndex = oLastOne + 1
Else
	oIndex = 1

 

 

With the code first code in this post, I have a custom property called "Temp PartNum", which will tell the user which part is currently active for edits.

Skjermbilde.PNG

 

If I get this "next part" (the code above) button to work, all others iProperties I will be able to fix myself.