Assembly Class |
The Assembly class defines a single manufacturing unit: objects that are bolted or welded together in the workshop.
An assembly has a main part and secondary assemblables attached to it. The number of secondaries is limited to 2048.
Hierarchical assemblies can also have subassemblies attached to them and they can have a parent assembly instance.
Inheritance Hierarchy
SystemObject
Tekla.Structures.ModelObject
Tekla.Structures.ModelModelObject
Tekla.Structures.ModelAssembly
Tekla.Structures.ModelObject
Tekla.Structures.ModelModelObject
Tekla.Structures.ModelAssembly
Namespace: Tekla.Structures.Model
Assembly: Tekla.Structures.Model (in Tekla.Structures.Model.dll) Version: 2024.0.0+a110b435391768740483e3032720a566518c9a63
Syntax
The Assembly type exposes the following members.
Constructors
Properties
Name | Description | |
---|---|---|
AssemblyNumber |
Defines the numbering in the assembly sense. If the members are empty and zero, the main part attributes are used.
| |
Identifier |
The identifier of the object.
(Inherited from Object.) | |
IsUpToDate | Gets if the object does not have a modification which is not shared. (Inherited from ModelObject.) | |
ModificationTime | Gets latest time of the object was modified or created. (Inherited from ModelObject.) | |
Name |
The name of the assembly.
|
Methods
Name | Description | |
---|---|---|
Add(ArrayList) |
Adds an array list of given assemblable instances to the assembly. For assemblies use Add(Assembly Assembly). Notice that adding
other than assembly instances will actually assume that you are adding objects to a cast unit assembly.
| |
Add(Assembly) |
Adds a new subassembly for the assembly instance.
| |
Add(IAssemblable) |
Adds the given assemblable instance to the assembly. Notice that adding
other than assembly instances will assume that you are adding objects to a cast unit assembly.
| |
CompareTo(Object) |
Compares Identifiers of model objects.
(Inherited from ModelObject.) | |
CompareTo(Assembly) |
Compares the instantiated assembly with another one.
| |
Delete |
Explodes the assembly instance.
(Overrides ModelObjectDelete.) | |
DeleteUserDefinedCoordSys |
Deletes the assembly's user defined coordinate system, if it has one.
| |
Equals |
Check if Identifiers of model objects are same.
(Inherited from ModelObject.) | |
GetAllReportProperties |
Retrieves all properties for the model object in one hashtable.
Type for the returned value must be checked using type casting.
(Inherited from ModelObject.) | |
GetAllUserProperties |
Retrieves all properties for the model object in one hashtable.
Type for the returned value must be checked using type casting.
(Inherited from ModelObject.) | |
GetAssembly |
Returns the assembly instance the assembly belongs to (null if none).
| |
GetAssemblyType |
Returns the type of the assembly.
| |
GetChildren |
Returns an enumerator of all the children model objects.
(Inherited from ModelObject.) | |
GetCoordinateSystem |
Returns the coordinate system for the given model object.
(Inherited from ModelObject.) | |
GetDoubleReportProperties |
Retrieves multiple double report properties for the model object. It is faster
to fetch multiple properties at once.
(Inherited from ModelObject.) | |
GetDoubleUserProperties |
Retrieves all double properties for the model object.
(Inherited from ModelObject.) | |
GetDynamicStringProperty |
Gets a dynamic string property from the model object.
(Inherited from ModelObject.) | |
GetFatherComponent |
Returns the father component of the model object.
(Inherited from ModelObject.) | |
GetFatherPour |
Returns the pour that the assembly is directly associated to.
| |
GetFatherPourUnit |
Returns the pour unit that the bolt group is associated to.
| |
GetHierarchicObjects |
Returns an enumerator of all the connected hierarchic objects.
(Inherited from ModelObject.) | |
GetIntegerReportProperties |
Retrieves multiple integer report properties for the model object. It is faster
to fetch multiple properties at once.
(Inherited from ModelObject.) | |
GetIntegerUserProperties |
Retrieves all integer properties for the model object.
(Inherited from ModelObject.) | |
GetMainObject |
Selects and returns the main object of the assembly or null if none.
| |
GetMainPart |
Selects and returns the main part of the assembly or null if none.
| |
GetPhase |
Retrieves the phase of the model object (the phase number, the phase name,
the phase comment and whether the phase is the current one or not).
(Inherited from ModelObject.) | |
GetReportProperty(String, Double) |
Retrieves a double property of the report for the model object.
(Inherited from ModelObject.) | |
GetReportProperty(String, Int32) |
Retrieves an integer property of the report for the model object.
(Inherited from ModelObject.) | |
GetReportProperty(String, String) |
Retrieves a string property of the report for the model object.
(Inherited from ModelObject.) | |
GetSecondaries |
Selects and returns all the secondary assemblables belonging to the assembly. The method replaces the
old GetObjects() method. Notice that the number of secondaries is limited to 2048.
| |
GetStringReportProperties |
Retrieves multiple string report properties for the model object. It is faster
to fetch multiple properties at once.
(Inherited from ModelObject.) | |
GetStringUserProperties |
Retrieves all string properties for the model object.
(Inherited from ModelObject.) | |
GetSubAssemblies |
Selects and returns a list of subassemblies belonging to the assembly.
| |
GetUserProperty(String, Double) |
Retrieves a double property for the model object.
(Inherited from ModelObject.) | |
GetUserProperty(String, Int32) |
Retrieves an integer property for the model object.
(Inherited from ModelObject.) | |
GetUserProperty(String, String) |
Retrieves a string property for the model object.
(Inherited from ModelObject.) | |
HasUserDefinedCoordSys |
Returns whether the assembly has a user defined coordinate system.
| |
Insert |
Inserts the Assembly instance in the model.
At the moment only rebar assemblies can be inserted.
The main object of the assembly must be a Reinforcement or RebarSet.
If the main rebar is not set (null), the main rebar will be automatically set to the secondary rebar with the biggest weight.
(Overrides ModelObjectInsert.) | |
Modify |
Modifies the assembly instance in the model.
(Overrides ModelObjectModify.) | |
Remove |
Removes the given instance from the assembly.
Before removing steel parts from an assembly all connecting workshop welds and bolts must be deleted.
| |
Select |
Selects the assembly instance from the model. The identifier of the instance must be set.
(Overrides ModelObjectSelect.) | |
SetDynamicStringProperty |
Sets a dynamic string property for the model object.
(Inherited from ModelObject.) | |
SetLabel |
Sets a label for an object when a new instance is created, this method must be called before Insert.
The label is used in plug-ins for identifying the changed object in modification.
(Inherited from ModelObject.) | |
SetMainObject |
Sets the main object of the assembly.
| |
SetMainPart |
Sets the main part of the assembly.
| |
SetPhase |
Sets the phase of the model object.
(Inherited from ModelObject.) | |
SetUserDefinedCoordSys |
Set user defined assembly coordinate system. If set, GetCoordinateSystem will return this value.
| |
SetUserProperties |
Sets multiple properties for the model object.
(Inherited from ModelObject.) | |
SetUserProperty(String, Double) |
Sets a double property for the model object.
(Inherited from ModelObject.) | |
SetUserProperty(String, Int32) |
Sets an integer property for the model object.
(Inherited from ModelObject.) | |
SetUserProperty(String, String) |
Sets a string property for the model object.
(Inherited from ModelObject.) |
Examples
using Tekla.Structures.Model; using Tekla.Structures.Geometry3d; using System; public class Example { public void Example1() { Beam beam1 = new Beam(new Point(0,0,0), new Point(1000,0,0)); Beam beam2 = new Beam(new Point(0,0,0), new Point(0,0,1000)); beam1.Profile.ProfileString = "380*380"; beam1.Material.MaterialString = "K40-1"; beam2.Profile.ProfileString = "380*380"; beam2.Material.MaterialString = "K40-1"; beam1.Insert(); beam2.Insert(); Assembly assembly = beam1.GetAssembly(); assembly.Add(beam2); if(!assembly.Modify()) Console.WriteLine("Assembly Modify Failed!"); } public void Example2() { // Create some rebars. var rebarSet = new RebarSet(); var rebarGroup = new RebarGroup(); var singleRebar = new SingleRebar(); // Set rebar properties here (code omitted). rebarSet.Insert(); rebarGroup.Insert(); singleRebar.Insert(); // Create a rebar assembly. var rebarAssembly = new Assembly(); rebarAssembly.SetMainObject(rebarSet); rebarAssembly.Add(rebarGroup); rebarAssembly.Add(singleRebar); rebarAssembly.Insert(); } }
See Also