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

PickInputGetEnumerator Method

Returns an enumerator that iterates through a collection.

Namespace:  Tekla.Structures.Model.UI
Assembly:  Tekla.Structures.Model (in Tekla.Structures.Model.dll) Version: 2019.0.0.0 (2019.0.0.0)
Syntax
public IEnumerator GetEnumerator()

Return Value

Type: IEnumerator
An IEnumerator object that can be used to iterate through the collection.

Implements

IEnumerableGetEnumerator
Examples
using Tekla.Structures.Model;
using Tekla.Structures.Geometry3d;
using System;
using System.Collections;

public class Example
{
    public void Example1()
    {
        Beam B = new Beam(new Point(12000, 0, 0), new Point(12000, 0, 6000));
        B.Profile.ProfileString = "380*380";
        B.Material.MaterialString = "K40-1";
        if (B.Insert())
        {
            Component C = new Component();
            C.Name = "Component Test";
            C.Number = 30000063;

            ComponentInput CI = new ComponentInput();
            CI.AddInputObject(B);

            C.SetComponentInput(CI);

            C.LoadAttributesFromFile("standard");

            C.SetAttribute("side_bar_space", 333.0);

            if (!C.Insert())
            {
                Console.WriteLine("Component Insert failed");
            }
            else
            {
                // test fetching component input
                ComponentInput ComponentSel = C.GetComponentInput();
                IEnumerator Enumerator = ComponentSel.GetEnumerator();
                while (Enumerator.MoveNext())
                {
                    InputItem ObjectInput = Enumerator.Current as InputItem;
                    if (ObjectInput.GetInputType() == InputItem.InputTypeEnum.INPUT_1_OBJECT)
                    {
                        Beam BeamInput = ObjectInput.GetData() as Beam;
                    }
                }
            }
        }
    }
}
See Also