I have an assembly with sub assemblies and subassemblies below that. I use an .ipt with a bunch of custom user paramaters to drive all sorts of things. I'm trying to right an ilogic rule to place in the upper assembly that will pull a user paramater and map it to a custom iproperty of all the files in the assembly, including all lower assemblies and ipt's.
I found some code on here that works to change the assemblies but not any of the sub assemblies or ipts below.
' set a reference to the assembly component definintion.' This assumes an assembly document is open.DimoAsmCompDefAsAssemblyComponentDefinitionoAsmCompDef=ThisApplication.ActiveDocument.ComponentDefinition'Iterate through all of the occurrencesDimoOccurrenceAsComponentOccurrenceForEachoOccurrenceInoAsmCompDef.Occurrences'check for and skip virtual components'(in case a virtual component trips things up)IfNotTypeOfoOccurrence.DefinitionIsVirtualComponentDefinitionThen'set part number for each componentiProperties.Value(oOccurrence.Name, "Custom", "TRUCK")=Parameter("MEDSKETCH:1", "TRUCK")&""ElseEndIfNext
I'm fairly new to ilogic and VBA and would appreciate any help!