Community
Inventor Forum
Welcome to Autodesk’s Inventor Forums. Share your knowledge, ask questions, and explore popular Inventor topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

iLogic help with changing iproperties in all open files and assemblies

1 REPLY 1
Reply
Message 1 of 2
ageezee
406 Views, 1 Reply

iLogic help with changing iproperties in all open files and assemblies

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.Dim oAsmCompDef As AssemblyComponentDefinition
oAsmCompDef = ThisApplication.ActiveDocument.ComponentDefinition

'Iterate through all of the occurrencesDim oOccurrence As ComponentOccurrence
For Each oOccurrence In oAsmCompDef.Occurrences
'check for and skip virtual components'(in case a virtual component trips things up)If Not TypeOf oOccurrence.Definition Is VirtualComponentDefinition Then

'set part number for each componentiProperties.Value(oOccurrence.Name, "Custom", "TRUCK") = Parameter("MEDSKETCH:1", "TRUCK") & ""

Else
End If
Next

 

 

I'm fairly new to ilogic and VBA and would appreciate any help!

 

Thanks.

Anthony

 

 

 

 
1 REPLY 1
Message 2 of 2
cwhetten
in reply to: ageezee

Have you considered using Design Assistant to help you change the value of an iProperty (or many) all at once?

 

-cwhetten

Please click "Accept as Solution" if this response answers your question.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report