Welcome to the Onshape forum! Ask questions and join in the discussions about everything Onshape, CAD, maker project and design.

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.

Colors in Featurescript

marcus_bernsteinmarcus_bernstein Member Posts: 15 EDU
Hey Onshape people-

I'm working on a project for competitive robotics and it would be pretty sweet if I could set the color of a part/extrude in featurescript. The standard documentation doesn't seem to have functionality for it and a quick search didn't turn up anything, but any help that you can provide would be much appreciated!

I'm new to the forums so sorry if I missed anything big or didn't catch a previous answer to this question. 

Comments

  • ilya_baranilya_baran Onshape Employees, Developers Posts: 775
    This is not yet implemented, sorry.  It is planned soon, though possibly not soon enough for your project...
    Ilya Baran \ Director of FeatureScript \ Onshape Inc
  • vikram_babu080vikram_babu080 Member Posts: 4 EDU
    Just following up on this question, has this been implemented yet? I am interested in changing the color of a line if have created using FeatureScript (specifically using to OpFitSpline function).
  • owen_sparksowen_sparks Member, Developers Posts: 1,287 PRO
    You can change the colours of parts, but not sketch geometry.
    Production Engineer
    HWM-Water Ltd
  • owen_sparksowen_sparks Member, Developers Posts: 1,287 PRO
    Why the down-vote?  :|
    Production Engineer
    HWM-Water Ltd
  • konstantin_shiriazdanovkonstantin_shiriazdanov Member Posts: 596 ✭✭✭✭
    @owen_sparks be carefull, look like you have a musterious foe. The more posts you write the more downvotes he would be able to make :D
  • emagdalenaC2CemagdalenaC2C Member, Developers Posts: 301 ✭✭✭✭
    Unfortunately, we can't know who votes, but I give you 2 up votes in compensation
    I've even looked over if there is something about it in the vanilla forums, which I think is the one used here... but without results
    Un saludo,                                                      C2C Close 2 Circle™                                   ☑ ¿Por qué no organizamos una reunión online? 
    Eduardo Magdalena                        Consulting Partner de Onshape                                                 Averigua a quién conocemos en común

  • Jake_RosenfeldJake_Rosenfeld Moderator, Onshape Employees, Developers Posts: 814
    @vikram_babu080 @marcus_bernstein

    This is possible through the new `setProperty(...)` call:
    https://cad.onshape.com/FsDoc/library.html#setProperty-Context-map

    setProperty(context, {
                "entities" : someQuery,
                "propertyType" : PropertyType.APPEARANCE,
                "value" : color(1.0, 0.5, 0.2)
            });

    Jake Rosenfeld - Modeling Team
  • owen_sparksowen_sparks Member, Developers Posts: 1,287 PRO
    @Jake_RosenfeldI believe @vikram_babu080is asking about changing a line colour not a part colour.

    Cheers,

    Owen S.
    Production Engineer
    HWM-Water Ltd
  • Jake_RosenfeldJake_Rosenfeld Moderator, Onshape Employees, Developers Posts: 814
    @owen_sparks

    D'oh!  Thanks :)
    Jake Rosenfeld - Modeling Team
  • vikram_babu080vikram_babu080 Member Posts: 4 EDU
    Just following up on this question, has this been implemented yet? I am interested in changing the color of a line if have created using opFitSpline from a black line to a different colored line.
  • Jake_RosenfeldJake_Rosenfeld Moderator, Onshape Employees, Developers Posts: 814
    Hi @vikram_babu080

    There is currently no way to change the color of an edge in Onshape (in FeatureScript or from the UI).  If you would like to see this functionality implemented please add an improvement request on the Improvement Requests section of this forum.



    Something that may be helpful in the meantime:
    https://cad.onshape.com/FsDoc/library.html#debug-Context-

    If you call `debug(context, edgeQuery)` in FeatureScript it will turn the edge red.  The red will only appear when the feature dialog for your feature is open though.  Once the user presses the green check mark, the red will go away and the edge will be black again.
    Jake Rosenfeld - Modeling Team
Sign In or Register to comment.