Message 1 of 9

Not applicable
05-10-2018
12:34 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
The code below is sending some iproperties to the different parts of the assembly, now I have placed some sub-assemblies as well but the code is not taking in consideration the parts of those sub-assemblies to send the iproperties, can somebody help me to correct the code so it does that as well. basically to send the iproperties in the code to all parts in the assembly and to all the parts of the different sub-assemblies as well.
Thanks in advance
Here is the code:
SyntaxEditor Code Snippet
Dim oAsmCompDef As AssemblyComponentDefinition oAsmCompDef = ThisApplication.ActiveDocument.ComponentDefinition 'Iterate through all Of the occurrences Dim oOccurrence As ComponentOccurrence For Each oOccurrence In oAsmCompDef.Occurrences.AllReferencedOccurrences(oAsmCompDef) Try 'write to component iprops iProperties.Value(oOccurrence, "Project", "Project") = iProperties.Value("Project", "Project") iProperties.Value(oOccurrence, "Project", "Creation Date") = iProperties.Value("Project", "Creation Date") iProperties.Value(oOccurrence, "Summary", "Title") = iProperties.Value("Summary", "Title") iProperties.Value(oOccurrence, "Summary", "Company") = iProperties.Value("Summary", "Company") iProperties.Value(oOccurrence, "Summary", "Author") = iProperties.Value("Summary", "Author") iProperties.Value(oOccurrence, "Custom", "AVT_NUMBER") = iProperties.Value("Custom", "AVT_NUMBER") Catch 'catch errors MsgBox ("ERROR WHEN MAKING LABEL") End Try Next
Solved! Go to Solution.