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.
How to add a part length to a part name
I often use extruded aluminium lengths to build machine
enclosures for customers, and when I have finished the design I export the
model as a Parasolid.
When designing the model the length of each extrusion is
defined by a Configuration variable.
My clients need to have the length of each extrusion in
the part name so that they know what to order, for example, “Alprofil 40 x 40 Light
L1000”, where L1000 is the length in mm. Is there any way to append L1000
automatically to the Part Name?
I appreciate that this will have to be done using
FeatureScript and would appreciate any help.
Thank you.
Best Answers
-
owen_sparks Member, Developers Posts: 2,660 PROI believe if the "variable" is from a drop down pick list then the answer is yes and directly from the config table, no FS required.If it's from an actual variable then answer then the answer is not today. I believe there could be a workaround using individual "Measure Distance" features to wrap back into the names but what we really want it to be able to directly read the part properties values.Owen S.Business Systems and Configuration Controller
HWM-Water Ltd5 -
philip_thomas Member, Moderator, Onshape Employees, Developers Posts: 1,381@owen_sparks - to make it work for extrusions, you would take our code for extruding (publicly available) and add these couple of lines. You will already have the extrusion depth (for a blind extrusion). For other types, you would need a few more lines to figure out exactly what the distance was.
The example i posted was just a quickie to show how to change the name of a featurePhilip Thomas - Onshape5 -
philip_thomas Member, Moderator, Onshape Employees, Developers Posts: 1,381@owen_sparks - The problem with the 'Beams' custom feature is that it can make multiple extrusions with miters and other end treatments.
That makes it hard to roll up to a single value in the feature name.Philip Thomas - Onshape5
Answers
HWM-Water Ltd
https://cad.onshape.com/documents/61e112bec493ae9f0cdd1eef/w/422f340a0bd2767715b1fc6e/e/4e59cdbeeaf56dc6b10245a3
HWM-Water Ltd
The example i posted was just a quickie to show how to change the name of a feature
HWM-Water Ltd
That makes it hard to roll up to a single value in the feature name.