ModelObjectVisualization Class |
The class to set and clear temporary visualization (color and transparency) for model objects in view.
Permananet representation will be restored when view is redrawed or temporary visualization is cleared.
Can be used also to fetch current permanent representation of model object.
Inheritance Hierarchy
Namespace: Tekla.Structures.Model.UI
Assembly: Tekla.Structures.Model (in Tekla.Structures.Model.dll) Version: 2023.0.3
Syntax
The ModelObjectVisualization type exposes the following members.
Methods
Name | Description | |
---|---|---|
ClearAllTemporaryStates |
Clears temporary visualization from all model objects and restores permanent representation.
| |
GetRepresentation |
Gets current permanent representation (red, blue, green and transparency) of given model object
| |
SetTemporaryState(ListIdentifier, Color) |
Sets visualization temporary state (red, blue, green and transparency) for given model object identifiers
| |
SetTemporaryState(ListModelObject, Color) |
Sets visualization temporary state (red, blue, green and transparency) for given model objects
| |
SetTemporaryStateForAll |
Sets temporary visualization state (red, blue, green and transparency) for all model objects
| |
SetTransparency(ListIdentifier, TemporaryTransparency) |
Restores permanent representation settings and sets temporary transparency for given model object identifiers
| |
SetTransparency(ListModelObject, TemporaryTransparency) |
Restores permanent representation settings and sets temporary transparency for given model objects
| |
SetTransparencyForAll |
Restores permanent representation settings and sets temporary transparency for all model objects
|
Examples
using Tekla.Structures.Model; using Tekla.Structures.Geometry3d; using System.Collections; public class Example { public void Example1() { Model model = new Model(); Beam b = new Beam(new Point(0,0,0), new Point(0,0,6000)); Beam b1 = new Beam(new Point(0,1000,0), new Point(0,1000,6000)); Beam b2 = new Beam(new Point(0,2000,0), new Point(0,2000,6000)); b.Material.MaterialString = b1.Material.MaterialString = b2.Material.MaterialString = "Steel_Undefined"; b.Profile.ProfileString = b1.Profile.ProfileString = b2.Profile.ProfileString = "PL10*1000"; b.Insert(); b1.Insert(); b2.Insert(); model.CommitChanges(); var blueObjects = new List<ModelObject> { b , b2 }; var redObjects = new List<ModelObject> { b1 }; ModelObjectVisualization.SetTransparencyForAll(TemporaryTransparency.HIDDEN); ModelObjectVisualization.SetTemporaryState(blueObjects, new TSM.UI.Color(0.0, 0.0, 1.0)); ModelObjectVisualization.SetTemporaryState(redObjects, new TSM.UI.Color(1.0, 0.0, 0.0)); } }
See Also