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.
Set Property (New Custom Feature!) 🆕

Set Property (New Custom Feature!)

Set Property allows you to:
- Dynamically set the properties of your part or multiple parts.
- Set custom properties.
Tips:
- Custom property ID's are found in your company settings.
- Right click on any value input to convert it to expression. This means you can use variables to drive the values.
- Want more cool custom features? Visit https://www.cadsharp.com/featurescripts/

CADSharp specializes in custom features and API.

Learn more about the Gospel of Christ ( Here )
CADSharp - We make custom features and integrated Onshape apps! Learn How to FeatureScript Here 🔴
6
Comments
Learn more about the Gospel of Christ ( Here )
CADSharp - We make custom features and integrated Onshape apps! Learn How to FeatureScript Here 🔴
Toll dass ihr das macht! Danke dafür!
Sure thing! 😎
Learn more about the Gospel of Christ ( Here )
CADSharp - We make custom features and integrated Onshape apps! Learn How to FeatureScript Here 🔴
Hi @MichaelPascoe and thanks for the script ! Maybe I'm doing something wrong but when using the script to change the name of a part whose name had previously been manually changed, it doesn't work.
https://cad.onshape.com/documents/d46d641aba26104e94b70a37/w/5a96188877debc677f6c3507/e/c137d8b212e42c0fb242f04a
I can get the name to change and make that dynamic by linking it to variables and so on, it all works great. Just not if I previously name the file manually which is the case most of the time as I don't necessarily plan in advance to need to configure the name.
@Jon_H You can click on reset all in the properties tab. Then it works see the video below.
Thanks @Pattabi_Kakumanu for the workaround ! At least this restores the script functionality, but it also clears all the other properties which then need to be manually re-entered, not very practical. I hope there is a way for the featurescript to detect that it needs to reset the name property and that it is possible to reset only one field.
@Jon_H Currently this is one of Onshape's limitations. FeatureScript is unable to override manually set properties. Resetting the property like Pattabi showed, is the only way to reset that specific property to allow FS to set it.
Learn more about the Gospel of Christ ( Here )
CADSharp - We make custom features and integrated Onshape apps! Learn How to FeatureScript Here 🔴
.
Update!
https://cad.onshape.com/documents/861d68af1cee67efb9e4843d/w/53981180c0515118622d7818/e/65b0c9acba56e6a4786405…
Note: Due to how Onshape currently works, get property is not live in the feature tree.
So to update it, you will have to manually open the feature and click the Refresh button.
Learn more about the Gospel of Christ ( Here )
CADSharp - We make custom features and integrated Onshape apps! Learn How to FeatureScript Here 🔴
I need to check the forums more frequently, I was struggling to get and set materials properties because they exist outside of normal runtime and here you go dropping the solution to my problem 2 weeks ago with a more elegant refresh button to boot.
.
Update!
https://cad.onshape.com/documents/861d68af1cee67efb9e4843d/w/53981180c0515118622d7818/e/65b0c9acba56e6a4786405…
(TIP: If you intend to keep data with your part through export and import outside of Onshape, then use Properties not Attributes.)
Learn more about the Gospel of Christ ( Here )
CADSharp - We make custom features and integrated Onshape apps! Learn How to FeatureScript Here 🔴
This feature just keeps getting better! GET is a big deal
Independent Onshape Consultant | Industrial Designer
GET is one thing, but I think you're burying the lede here with that comment about property exports to external software @MichaelPascoe . You mean to tell me that this whole time the parasolid file format supports metadata for materials and tagging faces for custom properties? If so I have some unkind words for the CAMWorks developers and their implementation of parts interrogation and the literal man-years wasted re-clicking on parts for nesting orientation and material schedules.