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.
PLANE_OFFSET_BOUNDS
papawo
Member, Developers Posts: 206 PRO
Best Answer
-
lana Onshape Employees Posts: 709You can replicate the loop
for (var selection in definition.selFace )
within the body of the function. Then selection.myLength will be length value as you need it,
or you can doif (size(<span>definition.selFace) > 0)<br>{<br>... </span>definition.selFace[0].myLength ..<span><br>}</span>
If you are only interested in the first element.
6
Answers
It may also be that what you're passing in is not a length, or that you're not passing in an 'offset' at all. Screenshotting more of the call stack, or the line that the error is complaining on may be more useful for debugging.
You can try using something like "offset" : 0.01 * meter
"offset" : selection.myLength //<<<<<it should be this. but it doesnt work . selection.myLength is inside an array in the precondition
});
if I use-----> "offset" : 0.01 * meter , it does work, but I need to get the length from the precondition
May be it should be ? Not sure what you meant by "selection.myLength is inside an array in the precondition"
for (var selection in definition.selFace )
within the body of the function. Then selection.myLength will be length value as you need it,or you can do
If you are only interested in the first element.