iLogic: Create constraint with reference to Parameter (rather than value)

iLogic: Create constraint with reference to Parameter (rather than value)

Anonymous
Not applicable
689 Views
2 Replies
Message 1 of 3

iLogic: Create constraint with reference to Parameter (rather than value)

Anonymous
Not applicable
Components.Add("MyNewComponent", MyFile.ipt)	
Constraints.AddFlush("Flush:1", "MyNewComponent", "XY Plane", "", "XY Plane", Distance

 Distance is an Inventor Parameter. This code works, but when I edit the constraint, the Offset is the value of "Distance" (at the time of running the rule). I would like the offset to be a reference to "Distance" instead (so that the offset updates automatically when the parameter is changed).

Replacing "Distance" with Parameter("Distance") has no effect.

0 Likes
Accepted solutions (1)
690 Views
2 Replies
Replies (2)
Message 2 of 3

marcin_otręba
Advisor
Advisor
Accepted solution

Try this:

 

Constraints.AddFlush("Flush:1", "MyNewComponent", "XY Plane", "", "XY Plane", "Distance") 

 

Hi, maybe you want to check my apps:


DrawingTools   View&ColoringTools   MRUFolders

Message 3 of 3

Anonymous
Not applicable

Oh dear. This works fine!

I was sure I tested that yesterday, and it complained about "Distance" not being a double. Must have referenced an iLogic parameter.

Thank you!

0 Likes