Tekla Open API

Detailed and full API reference helps you master Tekla Open API

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

ReferenceModelObjectAttributeEnumerator Class

The ReferenceModelObjectAttributeEnumerator class can be used to enumerate through reference model object attributes.
Inheritance Hierarchy
SystemObject
  Tekla.Structures.Model.CollaborationReferenceModelObjectAttributeEnumerator

Namespace:  Tekla.Structures.Model.Collaboration
Assembly:  Tekla.Structures.Model (in Tekla.Structures.Model.dll) Version: 2018.1.0.0 (2018.1.0.0)
Syntax
[SerializableAttribute]
public sealed class ReferenceModelObjectAttributeEnumerator : IEnumerator

The ReferenceModelObjectAttributeEnumerator type exposes the following members.

Constructors
  Name Description
Public method ReferenceModelObjectAttributeEnumerator
Creates a new reference model object attribute enumerator instance.
Top
Properties
  Name Description
Public property Current
The current attribute.
Top
Methods
  Name Description
Public method MoveNext
Moves to the next reference model object attribute.
Public method Reset
Resets the enumerator.
Top
Examples
using Tekla.Structures.Model;
using Tekla.Structures.Model.Collaboration;
using System;

public class Example
{
       public void Example1()
       {
           ReferenceModel RM = new ReferenceModel();
           RM.Filename = "c:\\TeklaStructuresModels\\reference_model.dwg";
           RM.Scale = 1.0;

           if(RM.Insert())
           {
               foreach(ReferenceModelObject RMO in RM.GetChildren())
               {
                   ReferenceModelObjectAttributeEnumerator RMOAttributeEnumerator = new ReferenceModelObjectAttributeEnumerator(RMO);

                   while(RMOAttributeEnumerator.MoveNext())
                   {
                       ReferenceModelObjectAttribute RMOAttribute = (ReferenceModelObjectAttribute)RMOAttributeEnumerator.Current;
                       Console.WriteLine("Attribute name: " + RMOAttribute.Name);
                   }
               }
           }
       }
}
See Also