Using debug(context,...) with id

How can I use an id in order to have debug highlight the element in question?

Something like:

debug(context, id);

Comments

  • GregBrown
    GregBrown Member, Onshape Employees, csevp, pcbaevp Posts: 412 image

    You need to make a query for the id of the feature in question:
    e.g. debug(context, qCreatedBy(id + "extrude1", EntityType.BODY), DebugColor.MAGENTA);

    From the FeatureScript docs:

    image.png
  • AsherAtSignalDesign
    AsherAtSignalDesign Member Posts: 34 PRO

    Thanks - I believe that is the example I was looking for.