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
SystemObject
  Tekla.Structures.ModelComponentInput

Namespace:  Tekla.Structures.Model
Assembly:  Tekla.Structures.Model (in Tekla.Structures.Model.dll) Version: 2023.0.3
Syntax
[SerializableAttribute]
public sealed class ComponentInput : ICollection, 
	IEnumerable

The ComponentInput type exposes the following members.

Constructors
  NameDescription
Public methodComponentInput
Creates a new component input object.
Top
Properties
  NameDescription
Public propertyCount
Gets the number of elements contained in the ICollection.
Public propertyIsSynchronized
Gets a value indicating whether access to the ICollection is synchronized (thread safe).
Public propertySyncRoot
Gets an object that can be used to synchronize access to the ICollection.
Top
Methods
  NameDescription
Public methodAddInputObject
Adds a model object to the component input.
Public methodAddInputObjects
Adds an array list of model objects to the component input.
Public methodAddInputPolygon
Adds a polygon to the component input.
Public methodAddOneInputPosition
Adds an input position to the component input.
Public methodAddTwoInputPositions
Adds two input positions to the component input.
Public methodCopyTo
Copies the elements of the ICollection to an Array, starting at a particular Array index.
Public methodCode exampleGetEnumerator
Returns an enumerator that iterates through a collection.
Top
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
Was this helpful?
The feedback you give here is not visible to other users. We use your comments to improve the content.
Previous
Next