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.

Some API-related feature questions…

kevin_coulsonkevin_coulson Member Posts: 6 ✭✭

I’m attempting to build an AI Agent for Onshape. We’ve been building in some features through the RestAPI and things are moving along, but I saw this video

and was inspired to try to add some of these features - hide/show, select parts, etc. It got me thinking about a number of things I want to be able to do, so I’ll just list them out (maybe they need their own discussions):

  • pull the current user selection,
  • Toggle part visibility,
  • Insert a standard content part
  • Add loads/constraints for simulation

I’ve read that toggling part visibility (not to be confused with transparency) is not possible via featurescript, but there must be some way to modify this other than the GUI? Are there endpoints for inserting standard content? For simulation-related functionality? For user selection?

And if not - how else could I access this data? How does it happen on the Onshape side? There must be some way to execute this stuff…

thanks in advance for your insights!

Comments

  • Caden_ArmstrongCaden_Armstrong Member Posts: 271 PRO

    User selection is read through client messaging
    https://onshape-public.github.io/docs/app-dev/clientmessaging

    Part visibility isn't something that is supported yet.


    Inserting standard content is the same as inserting any other part, you just have to know what the path (document id and configuration) is for the standard content. If you insert something into an assembly manually, pull the getAssembly information, you can see it there.

    www.smartbenchsoftware.com --- fs.place --- Renaissance
    Custom FeatureScript and Onshape Integrated Applications
Sign In or Register to comment.