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

Yes thank you for realizing my silly mistake.

 

I am trying to do something amazingly simple. I'm just trying to flip the "Part Number" and the "Description" in the iProperties project tab for both the asssembly properties and each part properties.

 

Here is the code I have borrowed:

 

oCompDef = ThisDoc.Document.ComponentDefinition
oAssyOccurrences  = oCompDef.Occurrences

Dim oOccurrence As ComponentOccurrence
Dim oSubOccurrence1 As ComponentOccurrence
For Each oOccurrence In oAssyOccurrences
If oOccurrence.DefinitionDocumentType = DocumentTypeEnum.kAssemblyDocumentObject Then
iLogicVb.RunRule(oOccurrence.Name,"Test")

For Each oSubOccurrence1 In oOccurrence.SubOccurrences
If oSubOccurrence1.DefinitionDocumentType = DocumentTypeEnum.kAssemblyDocumentObject Then
iLogicVb.RunRule(oSubOccurrence1.Name,"Test")

End If
Next
End If
Next

And here is the "Test" that I'm calling.

 

TempString = iProperties.Value("Project", "Part Number")
iProperties.Value("Project", "Description") = TempString
iProperties.Value("Project", "Part Number") = ""

It runs but doesn't do a thing.