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.
variable in part properties

Hi,
is there any way to get the variable in the part configuration without typing it in manually?
I know that I could do a list configuration with fixed lenghts and then I can configure the properties for every item in the list. But I would like to this automaticaly.
In this case I want to have the length of different wiring ducts in the comments.
thanks.
Tagged:
0
Comments
With a configuration variable, you'll need to use a Custom Feature to assign the Property with an expression.
See the Part Name custom feature, call this, chose expression, and insert the variable. May need to do some rounding/scaling to deal with the default unit conversions, but you can easily tag the variable in the Part name or number!
https://bedfordstatics.onshape.com/documents/cff5249641e260dddc6588dc/w/f11992258668fd8ed8744408/e/0fe4c3e97c01eb56d1722272 - link share to example
.
I'll echo what Kevin said.
Within a feature, you can turn most inputs into an expression by right clicking it → convert to expression. This will let you use variables and equations in that input, it will even let you use inline FeatureScript. For example if you had name variables:
#prefix ~ "_" ~ #size ~ "_Config"
Evan's Part Name feature is good. However, if you want to be able to set any property, not just the name,
Property / Attribute feature.
you could use the
If you want to quickly turn lengths into a readable format for part names or descriptions, then I recommend the
Variable to String feature.
.
Learn more about the Gospel of Christ ( Here )
CADSharp - We make custom features and integrated Onshape apps! Learn How to FeatureScript Here 🔴