Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ```c#
- Model Model = new Model();
- System.Type[] Types = new System.Type[1];
- Types.SetValue(typeof(TSM.Part), 0);
- ModelObjectEnumerator parts = Model.GetModelObjectSelector().GetAllObjectsWithType(Types);
- foreach (TSM.Part part in parts)
- {
- // you can cast the part to an object that you are after e.g. Beam, perhaps depending on some certain properties (e.g. a certain length etc) and add that to a collection accordingly if you wish.
- Tekla.Structures.Model.Operations.Operation.DisplayPrompt("Assembly number " + part.AssemblyNumber + " " + part );
- }
- ```
Add Comment
Please, Sign In to add comment