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.
evlength question
papawo
Member, Developers Posts: 206 PRO
when I select several lines evlength add the total length and extrude.
How to keep each extrude the same length as the sketch line but able to still select multiple line.
How to keep each extrude the same length as the sketch line but able to still select multiple line.
Tagged:
0
Best Answer
-
Jake_Rosenfeld Moderator, Onshape Employees, Developers Posts: 1,646You can use 'evaluateQuery(...)' to get all the lines as individual queries, and then use a for loop over the lines:
const lines = evaluateQuery(context, lineQuery); for (var line in lines) { const lineLength = evLength(context, { "entities" : line }); // extrude(...) or opExtrude(...) using lineLength }
Jake Rosenfeld - Modeling Team5
Answers