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.

Options

is it possible to set a curve by FS

roy_yang375roy_yang375 Member Posts: 10 PRO
edited December 2021 in FeatureScript

Im going to write a FS with the funtion which could name the curve I created. 

but I see the type Curve is not supported in set property currently. is that right?

and for further purpuse, is it possible to set appearance or color for curve?



"setProperty (context is Context, definition is map)

Sets a property on a set of bodies and/or faces. The allowed properties are listed in PropertyType. Only APPEARANCE and NAME properties are supported for faces."


Best Answer

  • Options
    NeilCookeNeilCooke Moderator, Onshape Employees Posts: 5,381
    edited December 2021 Answer ✓
    A curve is a wire body so NAME will work, but appearances can only be applied to Parts, Surfaces or Faces. If you create a closed Composite Part using the curves, you can then set the colour (and the name). Docs should be updated.
    Senior Director, Technical Services, EMEAI

Answers

  • Options
    NeilCookeNeilCooke Moderator, Onshape Employees Posts: 5,381
    edited December 2021 Answer ✓
    A curve is a wire body so NAME will work, but appearances can only be applied to Parts, Surfaces or Faces. If you create a closed Composite Part using the curves, you can then set the colour (and the name). Docs should be updated.
    Senior Director, Technical Services, EMEAI
Sign In or Register to comment.