Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.
WCrihfield
in reply to: tmathieson

Just to clarify one point...

There are only 2 iLogic snippets that allow you to specify what model state you want to work with, and neither of them have to do with accessing Parameters.

One is for replacing one component with another component:

Component.Replace("SubAssembly:1", "OtherAssembly.iam<Model State1>", True)

The other is for adding a component to the assembly:

Dim modelStateComponentA = Components.AddWithModelState("a:1", "a.ipt", "Model State2")

So...we do not have any official confirmation or example from Autodesk that says that their Parameter() iLogic snippet allows you to specify a model state to work with.  It simply may not have that capability/option built into it yet.

We do have an example of the Parameter() snippet being used with the MakePath snippet:

Parameter(MakePath("SubAssem1:1", "Part1:1"), "d0") = 1.2

, but not one that includes anything about specifying a model state.  So, I would give up on trying to access a Parameter specific to a named model state using the Parameter() iLogic snippet.

Have you tried any regular Inventor API route yet.

Wesley Crihfield

EESignature

(Not an Autodesk Employee)