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.

Custom feature - Set RAL Color

brooke_spreenbrooke_spreen Member, Developers Posts: 115 ✭✭✭
Hi folks, I've put together a quick feature for setting colors based on standard RAL values -



Bodies and faces are selected separately. Checking the "Override faces" box will ensure that all faces of the body, including those where a color has been previously applied, will be changed to the selected color.

The document (link) should be public/sharable/copyable/etc.

Happy scripting :)


Design Engineer | Anerdgy AG

Comments

  • eric_pestyeric_pesty Member Posts: 1,868 PRO
    edited August 2022
    Really cool!

    Hope you don't mind, I ended up "borrowing" a bunch of your code to add these to a "company colors" feature I created a while back.

    I really like how I am 100% not a programmer and I only very vaguely understand what I'm doing but because Featurescript is simple enough I was able to figure what I needed to copy (and where to paste it) to get it to integrate with what I already had (my feature starts with a drop down of "types" of colors).

    The most amazing part is that it took me about 5min and it worked perfectly on the first try after hitting commit!

    BOOM!


  • EvanReeseEvanReese Member, Mentor Posts: 2,096 ✭✭✭✭✭
    @eric_pesty
    Boom indeed!

    @brooke_spreen
    Thanks for sharing this! I've not worked with RAL colors before, but if I do, I may end up adding it to my Part Color feature as well. If so I'll definitely credit you in the code.
    Evan Reese
  • MichaelPascoeMichaelPascoe Member Posts: 1,970 PRO
    Awesome, thanks for sharing!

    Learn more about the Gospel of Christ  ( Here )

    CADSharp  -  We make custom features and integrated Onshape apps!   cadsharp.com/featurescripts 💎
  • antlu65antlu65 Member Posts: 59 EDU
    Thumbs up! Also noticed the name of your company 'Anerdgy'.  =)
    Maybe that means something in another language.
  • brooke_spreenbrooke_spreen Member, Developers Posts: 115 ✭✭✭
    @eric_pesty Got to love those 'aha' moments!
    @Evan_Reese It might be that it is primarily a European system. It is at least maintained by a German organization. But the Chinese manufacturers we have worked with recognize it.
    @antlu65 Not quite another language....the name is just a play on "energy" :)
    Design Engineer | Anerdgy AG
Sign In or Register to comment.