Skip to content

Instantly share code, notes, and snippets.

@benkoshy
Last active October 15, 2025 23:19
Show Gist options
  • Select an option

  • Save benkoshy/1330b98d16e464fd554df07d0352be10 to your computer and use it in GitHub Desktop.

Select an option

Save benkoshy/1330b98d16e464fd554df07d0352be10 to your computer and use it in GitHub Desktop.
Tekla API - How to access a drawing's model object?

Sometimes you will want to query an object's properties - that you found in a drawing. How do you do that?

Let us suppose we have a single part. Then we need to:

  • Get the Drawing
  • Get the part identifier
  • Select it in the model
SinglePartDrawing singlePartDrawing = (SinglePartDrawing)drawing;
Tekla.Structures.Model.ModelObject modelObject = model.SelectModelObject(singlePartDrawing.PartIdentifier);
Tekla.Structures.Model.Part part = (Tekla.Structures.Model.Part)modelObject;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment