Ilogic link parameters glitch

Ilogic link parameters glitch

J.Oye
Advocate Advocate
170 Views
1 Reply
Message 1 of 2

Ilogic link parameters glitch

J.Oye
Advocate
Advocate

Having an issue trying to update a sub-assembly within a top level assembly using ilogic.

The order in which to test out the files:

 

1. Open up 100036.iam.........go into parameters dialogue box and adjust the user parameter "frame_width" (54, 62 and 70). The assembly updates to be expected at this point.

2. Open up 100056.iam........go into parameters dialogue box and adjust the user parameter "frame_width" (54, 62 and 70).  When either 54 or 62 "frame_width" is called out Inventor throws up an error.  Update this assembly If needed.

3. Go back into 100036.iam and try adjust that parameter again, when any value besides "70" gets called out an error comes up again and will tell you what line the error is on.  When 54, the error will be on line 4, when 62 the error will be on line 6.

4.  If all the files are closed out and only 100036.iam is opened up all 3 values will work just fine until 100056.iam get's brought back into the equation.

 

Disclaimer, I'm not a programmer just know how to lay out ilogic in lamen terms to get things done so I'm sure things can get laid out more efficient but regardless I believe there's a glitch in the matrix.

0 Likes
171 Views
1 Reply
Reply (1)
Message 2 of 2

daltonNYAW9
Advocate
Advocate

I think this is intended w/ parts that use model states.
Replace that line with this try/catch:

Try
	Parameter("100036:1", "frame_width") = frame_width
Catch
	Dim oFactoryDoc As Document = Components.Item("100036:1").Occurrence.Definition.ModelStates.ActiveModelState.FactoryDocument
	curES = oFactoryDoc.ComponentDefinition.Modelstates.MemberEditScope
	oFactoryDoc.ComponentDefinition.Modelstates.MemberEditScope = MemberEditScopeEnum.kEditAllMembers
	oFactoryDoc.ComponentDefinition.Parameters.Item("frame_width").Value = frame_width 'insert parameter name and value
	oFactoryDoc.ComponentDefinition.Modelstates.MemberEditScope = curES
End Try

https://www.autodesk.com/support/technical/article/caas/sfdcarticles/sfdcarticles/Model-states-membe...

0 Likes