ComponentInput Class |
The ComponentInput class handles the input of component objects and positions. A component has one component input.
The component input must include all the needed input objects and points in the correct order. For example,
an input with a point and a part is different from an input of a part and a point.
The maximum number of different input items in the collection is 10.
Inheritance Hierarchy
Namespace: Tekla.Structures.Model
Assembly: Tekla.Structures.Model (in Tekla.Structures.Model.dll) Version: 2023.0.3
Syntax
The ComponentInput type exposes the following members.
Constructors
Name | Description | |
---|---|---|
ComponentInput |
Creates a new component input object.
|
Properties
Name | Description | |
---|---|---|
Count |
Gets the number of elements contained in the ICollection.
| |
IsSynchronized |
Gets a value indicating whether access to the ICollection is synchronized (thread safe).
| |
SyncRoot |
Gets an object that can be used to synchronize access to the ICollection.
|
Methods
Name | Description | |
---|---|---|
AddInputObject |
Adds a model object to the component input.
| |
AddInputObjects |
Adds an array list of model objects to the component input.
| |
AddInputPolygon |
Adds a polygon to the component input.
| |
AddOneInputPosition |
Adds an input position to the component input.
| |
AddTwoInputPositions |
Adds two input positions to the component input.
| |
CopyTo | ||
GetEnumerator |
Returns an enumerator that iterates through a collection.
|
Examples
The following example creates a component with a given component input:
using Tekla.Structures.Model; using Tekla.Structures.Geometry3d; using System; public class Example { public void Example1() { Beam Beam = new Beam(new Point(12000, 0, 0), new Point(12000, 0, 6000)); Beam.Profile.ProfileString = "380*380"; Beam.Material.MaterialString = "K40-1"; Beam.Insert(); Component Component = new Component(); Component.Name = "Component Test"; Component.Number = 30000063; ComponentInput ComponentInput = new ComponentInput(); ComponentInput.AddInputObject(Beam); Component.SetComponentInput(ComponentInput); Component.LoadAttributesFromFile("standard"); Component.SetAttribute("side_bar_space", 333.0); if (!Component.Insert()) { Console.WriteLine("Component Insert failed"); } } }
See Also