- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
i have an iLogic rule that Adds a part and creates constraints. The part changes depending on user selections. I need to take one occurrence, located at center, and make a pattern. I plan to offset the part then create a pattern. I went to where iLogic adds the Mate, and tried to include the optional Offset parameter. Every way I've tried to do this, I get an "offset not set to instance of object" error. It is just an equation to determine the offset, Height/number of parts + spacing between.
Code:
Note: MediaHeight is found useing ilogic measure between named faces, and manipulated if a pattern is needed. It is returning a number in the logger, currently 7.961
MediaOffset = (MediaHeight + (MediaHeight/2) + 1)
Constraints.AddMate("MediaMate2", "Media", center, "", "YZ Plane",offset := MediaOffset)
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
You should be able to drop
offset :=and just use the variable
Constraints.AddMate("MediaMate2", "Media", center, "", "YZ Plane", MediaOffset)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
When I went back to the rule. I realized the issues were with a sub-routine . There were a couple of different scenarios in which I needed to change how the constraints were, so I made a sub and called it when I needed. I got rid of that and just put it in an if statement, everything worked fine.