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.
Do editing logic functions work with enums?
Lee_Hesketh
Member, Developers Posts: 148 ✭✭✭
Do editing logic functions work with enums? If so, how do I implement it?
Thanks
Lee Hesketh
Thanks
Lee Hesketh
There are 10 types of people in the world. Those who know binary, those who don't and those who didn't expect base 3!
0
Best Answers
-
NeilCooke Moderator, Onshape Employees Posts: 5,682Could it be as simple as the misspelling of "length"?Senior Director, Technical Services, EMEAI6
-
NeilCooke Moderator, Onshape Employees Posts: 5,682Try something like:
if(changedDefinition.myEnum == myEnum.ONE)<br>
changedDefinition.length = 1*inch; <br>
if(changedDefinition.myEnum == myEnum.TWO)<br>
changedDefinition.length = 2*inch; <br>
}<br>
return changedDefinition;
</code><h2><pre class="CodeBlock"><code>if(oldDefinition.myEnum != changedDefinition.myEnum)<br><code> {<br>
Senior Director, Technical Services, EMEAI2
Answers
But nothing happens and don't know why.