How do you call "Sub-Assembly" Parameters?

How do you call "Sub-Assembly" Parameters?

Anonymous
Not applicable
311 Views
1 Reply
Message 1 of 2

How do you call "Sub-Assembly" Parameters?

Anonymous
Not applicable
I am working with the Inventor 5 API accessing the parameter table.
(e.g. Set oAngle1Param = oDoc.ComponentDefinition.Parameters.Item("Joint_Angle1"))

HOWEVER, how might I go about accessing "sub-assembly" parameters (through the API)? I have been trying to setup spreadsheet links in the sub-assembly (making adaptive, etc)... but still cannot access from the "top-level." I am in a crunch for time... so any advice will be greatly appreciated!
0 Likes
312 Views
1 Reply
Reply (1)
Message 2 of 2

Anonymous
Not applicable

Hi
Kerwin,


size=2>
 

It's
actually quite simple to access the parameters of any subassembly or part in an
assembly.  As you traverse an assembly you get back a
ComponentOccurrence.  The ComponentOccurrence object supports the
Definition property which will return a PartComponentDefinition or
AssemblyComponentDefinition object.  By doing this you're now directly
accessing the part or assembly document.  You've left the context of the
assembly.  It's just the same as if you had opened the part directly and
obtained the compoent definition.  From this you have access to the
parameters and anything else in that file.


size=2>
 


size=2>-Brian


style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
 I
am working with the Inventor 5 API accessing the parameter table.
(e.g.
Set oAngle1Param = oDoc.ComponentDefinition.Parameters.Item("Joint_Angle1"))

HOWEVER, how might I go about accessing "sub-assembly" parameters (through
the API)? I have been trying to setup spreadsheet links in the sub-assembly
(making adaptive, etc)... but still cannot access from the "top-level." I am
in a crunch for time... so any advice will be greatly
appreciated!

0 Likes