11-01-2017
07:25 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
11-01-2017
07:25 AM
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.