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.

Colors in Featurescript

marcus_bernsteinmarcus_bernstein Member, User Group Leader Posts: 35 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. 
Any chance Onshape is looking for interns?

Philadelphia User Group Leader

Comments

  • ilya_baranilya_baran Onshape Employees, Developers, HDM Posts: 1,175
    This is not yet implemented, sorry.  It is planned soon, though possibly not soon enough for your project...
    Ilya Baran \ VP, Architecture and FeatureScript \ Onshape Inc
  • vikram_babu080vikram_babu080 Member Posts: 4
    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: 2,660 PRO
    Why the down-vote?  :|
    Business Systems and Configuration Controller
    HWM-Water Ltd
  • konstantin_shiriazdanovkonstantin_shiriazdanov Member Posts: 1,221 ✭✭✭✭✭
    @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
  • emagdalenaC2iemagdalenaC2i Member, Developers, Channel partner Posts: 859 ✭✭✭✭✭
    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,

    Eduardo Magdalena                         C2i Change 2 improve                         ☑ ¿Por qué no organizamos una reunión online?  
                                                                         Partner de PTC - Onshape                                     Averigua a quién conocemos en común
  • Jake_RosenfeldJake_Rosenfeld Moderator, Onshape Employees, Developers Posts: 1,646
    @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: 2,660 PRO
    @Jake_RosenfeldI believe @vikram_babu080is asking about changing a line colour not a part colour.

    Cheers,

    Owen S.
    Business Systems and Configuration Controller
    HWM-Water Ltd
  • Jake_RosenfeldJake_Rosenfeld Moderator, Onshape Employees, Developers Posts: 1,646
    @owen_sparks

    D'oh!  Thanks :)
    Jake Rosenfeld - Modeling Team
  • vikram_babu080vikram_babu080 Member Posts: 4
    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: 1,646
    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.