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.

How to get elementId of the currently selected item from the tab on the left

adrian_wasikadrian_wasik Member Posts: 6
edited May 2020 in App Store & Partners Apps
Hi Everyone,

I am trying to figure out what is the best possible way to recognize that the selection of the element in the tab on the left has changed and what is the id of the currently selected element. I thought that OnShape client can give me this kind of information via post messaging (https://dev-portal.onshape.com/help), but it looks like it is not possible - I couldn't find any message type for that.


Is there any type of communication with the OnShape client that would provide me with this information, or do I have to think about some other ways to achieve that?

Comments

  • adrian_wasikadrian_wasik Member Posts: 6
    edited June 2020
    It seems that this information cannot be obtained by post messaging. CORS prevented us from retrieving it using any other way, so we gave up an idea of displaying our application in the context of element selected in the tab on the left and we let the user pick an assembly using item picker which we can tell OnShape to display using post messaging "itemSelectedInSelectItemDialog" (https://dev-portal.onshape.com/help Client Messaging).
    I still believe that this would be very helpful information to have in some integrated apps, therefore, I will create a feature request for that.

    Edit:
    Link to the feature request: https://forum.onshape.com/discussion/13803/client-messaging-itemselectedinselectitemtab#latest
Sign In or Register to comment.