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: 2024.0.0+a110b435391768740483e3032720a566518c9a63
Syntax
[SerializableAttribute]
public sealed class ReferenceModelObjectAttributeEnumerator : IEnumerator

The ReferenceModelObjectAttributeEnumerator type exposes the following members.

Constructors
  NameDescription
Public methodReferenceModelObjectAttributeEnumerator
Creates a new reference model object attribute enumerator instance.
Top
Properties
  NameDescription
Public propertyCurrent
The current attribute.
Top
Methods
  NameDescription
Public methodMoveNext
Moves to the next reference model object attribute.
Public methodReset
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
Was this helpful?
The feedback you give here is not visible to other users. We use your comments to improve the content.
Previous
Next