API Reference

Detailed and full API reference helps you master Tekla development

This is the most recent version of Tekla Open API.
For older versions, please visit Tekla Warehouse.

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: 2021.0.0
public sealed class ComponentInput : ICollection, 

The ComponentInput type exposes the following members.

  Name Description
Public method ComponentInput
Creates a new component input object.
  Name Description
Public property Count
Gets the number of elements contained in the ICollection.
Public property IsSynchronized
Gets a value indicating whether access to the ICollection is synchronized (thread safe).
Public property SyncRoot
Gets an object that can be used to synchronize access to the ICollection.
  Name Description
Public method AddInputObject
Adds a model object to the component input.
Public method AddInputObjects
Adds an array list of model objects to the component input.
Public method AddInputPolygon
Adds a polygon to the component input.
Public method AddOneInputPosition
Adds an input position to the component input.
Public method AddTwoInputPositions
Adds two input positions to the component input.
Public method CopyTo
Copies the elements of the ICollection to an Array, starting at a particular Array index.
Public methodCode example GetEnumerator
Returns an enumerator that iterates through a collection.
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";

           Component Component = new Component();
           Component.Name = "Component Test";
           Component.Number = 30000063;

           ComponentInput ComponentInput = new ComponentInput();



           Component.SetAttribute("side_bar_space", 333.0);

           if (!Component.Insert())
               Console.WriteLine("Component Insert failed");
See Also