Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.
jholland3XDLM
688 Views, 2 Replies

iLogic add Mate Offset

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)