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.

Get Internal ID of selection

MBartlett21MBartlett21 Member Posts: 1,418 EDU
I would like to get the internal ID of my selection, so I can tell if a change will break some references or not.
MB - I make FeatureScripts: view FS (My FS's have "Official" beside them)

Comments

  • konstantin_shiriazdanovkonstantin_shiriazdanov Member Posts: 820 ✭✭✭✭
    I can also add that getting entity ID and being able to track its parent/child ID's (for example in patterned geometry) would add much to the value of FS.
  • MBartlett21MBartlett21 Member Posts: 1,418 EDU
    @konstantin_shiriazdanov
    I could make a FS that will store an entity ID, but i'd really like Onshape to add it into their UI (i.e. visibly see if it changes in features)
    MB - I make FeatureScripts: view FS (My FS's have "Official" beside them)
  • kevin_o_toole_1kevin_o_toole_1 Onshape Employees, Developers, HDM Posts: 414
    transientQueriesToStrings will return a selection's internal id. However I suspect this is not actually what you want. Internal IDs can change without any harm (e.g. any upstream feature will change the internal ids of all downstream features, even if it doesn't effect them), and breaking changes can occur without any id change (e.g. an id used for one face initially could refer to a conceptually totally different face after a change). The way in Onshape of determining which entities are which is not ids. It's queries: both those generated for selections and those manually created in FS. Our generated queries will resolve successfully if they can, and otherwise will turn red in the UI and resolve to nothing inside the feature.

    I think I lack a good conceptual model of the request here. A motivating example would help. For instance, what do you want to be the trigger for check? What determines the correct "before" state to compare against? What changes should fail the check, and what changes should pass? What UI are you imagining?

  • lanalana Onshape Employees Posts: 428
    If I understand it correctly, you'd like to be able to trace dependencies of the entity identity and entities downstream whose identities depend on this one. Let's say It is a DAG ( parent-child graph). Some of the nodes are not visible (don't exist) in current state, but could be highlighted if we roll back to the state when they've been alive. The node can carry the operation id so that this is some-what useful for debugging custom features. Is this close?
  • MBartlett21MBartlett21 Member Posts: 1,418 EDU
    @lana
    Yes
    One use of this would be to tell if a custom feature will break a feature downstream.
    MB - I make FeatureScripts: view FS (My FS's have "Official" beside them)
Sign In or Register to comment.