Welcome to the Onshape forum! Ask questions and join in the discussions about everything Onshape.

First time visiting? Here are some places to start:
  1. Looking for a certain topic? Check out the categories filter or use Search (upper right).
  2. Need support? Ask a question to our Community Support category.
  3. Please submit support tickets for bugs but you can request improvements in the Product Feedback category.
  4. 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 Color and Material - New FeatureScript

sebastian_glanznersebastian_glanzner Member, Developers Posts: 422 PRO
Hello everyone,

I would like to share a featureScript of mine which I think could be useful for you.
https://cad.onshape.com/documents/a1c694da929cd0c00da57f1d/w/affc3a805df9b0c08ec7af3c/e/641eb1448fe7d5609b74ae7e



You can make a copy of this document and customize the table with the materials you use for your parts.
The advantage in using this feature instead of the Onshape material list is, that all parts will have the same color in your documents.
Also you can extend the feature to set custom properties!

Here is a list of custom properties I use:
- German material name
- English material name
- German surface name
- English surface name

This helps me to fill my BOMs and part properties.

PS.: Make sure to place the feature at the end of the feature list. That the way the mass is calculated correctly.

Comments

  • H_WangH_Wang Member Posts: 20 ✭✭
    Hello everyone,

    I would like to share a featureScript of mine which I think could be useful for you.
    https://cad.onshape.com/documents/a1c694da929cd0c00da57f1d/w/affc3a805df9b0c08ec7af3c/e/641eb1448fe7d5609b74ae7e



    You can make a copy of this document and customize the table with the materials you use for your parts.
    The advantage in using this feature instead of the Onshape material list is, that all parts will have the same color in your documents.
    Also you can extend the feature to set custom properties!

    Here is a list of custom properties I use:
    - German material name
    - English material name
    - German surface name
    - English surface name

    This helps me to fill my BOMs and part properties.

    PS.: Make sure to place the feature at the end of the feature list. That the way the mass is calculated correctly.
    Hi Sebastian,
           This is a great feature, I use it to assign density to my COTS parts. However, there is a small bug. Here is what happens: If you assigned any type of materials to the part from Onshape materials Library, the feature will not work even when you change the material back to "None" from Onshape materials assignment. I believe this is due to the fact that Onshape materials lib assign "0" to the part if you select "None", and the feature is not able to overwrite that "0". Is there any fix can be applied? Thanks!
  • NeilCookeNeilCooke Moderator, Onshape Employees Posts: 5,671
    @Haibing_Wang - setting part properties manually will override anything set using FeatureScript, even if you run the custom feature again. You can reset properties to enable the script to work again, details here: https://www.onshape.com/cad-blog/tech-tip-how-to-reset-part-properties-in-onshape

    Senior Director, Technical Services, EMEAI
Sign In or Register to comment.