Welcome to the Onshape forum! Ask questions and join in the discussions about everything Onshape.
First time visiting? Here are some places to start:- Looking for a certain topic? Check out the categories filter or use Search (upper right).
- Need support? Ask a question to our Community Support category.
- Please submit support tickets for bugs but you can request improvements in the Product Feedback category.
- Be respectful, on topic and if you see a problem, Flag it.
If you would like to contact our Community Manager personally, feel free to send a private message or an email.
Editing Logic
EvanReese
Member, Mentor Posts: 2,135 ✭✭✭✭✭
I'm making my first foray into Editing Logic Functions, and I don't seem to be wrapping my head around it. I've been able to make one boolean control another boolean. I also was able to make one length value control another one, but if I manually changed the controlled length, it wouldn't update when I changed the controlling value anymore. Why is that? Lastly, I'm trying to control a boolean with a pair length values and some greater-than logic, and can't seem to get it working. The link is here. Can someone help me understand why this isn't working? this is the code below
export function editTest(context is Context, id is Id, oldDefinition is map, definition is map, isCreating is boolean) returns map { if (definition.meLength1 > definition.myLength2) { definition.yourBoolean = true; return definition; } else { definition.yourBoolean = false; return definition; } }for some reason the code for > formats a $gt above, but it's > in the feature studio.
Evan Reese
0
Best Answer
-
EvanReese Member, Mentor Posts: 2,135 ✭✭✭✭✭aaaand, in re-reading the code above I noticed a typo that caused it to fail. Onshape, can we please delete posts so as to not embarrass ourselves?Evan Reese2
Answers