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

ILogic is it Possible to Make Contraints.AddMate Reference the active document instead of the document the rule is running in?

Hello,

 

Apologies if I posted this in the wrong place this is my first post. 

 

Basically I've made a rule that takes in some user information and then copies an existing assembly and places it in a new file location. The rule then opens this new assembly file and makes some edits. The edits are working perfectly until I try to add some mates to the assembly. 

 

I'm currently using: 

Constraints.AddMate("Door_YZ" & MateNumber, {DoorName, "Stile:1" }, YZFace, "", "YZ Plane", XOffset)

Though I'm getting an error because the rule doesn't recognize the component name (DoorName, "Stile:1"). This is because Constraints.AddMate is referenced by ThisRule which is the document where the rule is running not the one I'm trying to edit. 

 

Is there any other way to add constraints where I can reference the active file?

 

Thanks

 

 

Labels (3)