Inventor General

New Member
Posts: 1
Registered: ‎08-11-2008
Message 1 of 2 (214 Views)

iLogic help with changing iproperties in all open files and assemblies

214 Views, 1 Replies
01-15-2013 11:33 AM

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") & ""

End If



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







*Expert Elite*
Posts: 1,051
Registered: ‎09-03-2008
Message 2 of 2 (193 Views)

Re: iLogic help with changing iproperties in all open files and assemblies

01-15-2013 03:06 PM in reply to: ageezee

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



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

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community

Inventor Exchange Apps

Created by the community for the community, Autodesk Exchange Apps for Autodesk Inventor helps you achieve greater speed, accuracy, and automation from concept to manufacturing.

Connect with Inventor