Skip to content

Instantly share code, notes, and snippets.

@benkoshy
Created July 22, 2024 02:07
Show Gist options
  • Save benkoshy/fddac48531d76cb79d23e38b67fd6fc3 to your computer and use it in GitHub Desktop.
Save benkoshy/fddac48531d76cb79d23e38b67fd6fc3 to your computer and use it in GitHub Desktop.
Tekla API - How to highlight model objects

We want to:

  • select an object,
  • and we need the user to understand that it has been selected.

This is done through: (i) highlighting it, and (ii) via a display prompt.

Don Norman elaborates on the need to alert users

    Picker picker = new Picker();
    ModelObject modelObject = picker.PickObject(Picker.PickObjectEnum.PICK_ONE_OBJECT, 
                                                "Select object you are going to edit");

    Operation.Highlight(new List<ModelObject>(){ modelObject});
    
    /// etc.

    Operation.DisplayPrompt("Part has been set.");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment