DrawingEnumerator Class

The DrawingEnumerator class provides the means to iterate through drawing instances. Drawing enumerators are generated by the drawing handler.
Inheritance Hierarchy

Namespace:  Tekla.Structures.Drawing
Assembly:  Tekla.Structures.Drawing (in Tekla.Structures.Drawing.dll) Version: 2023.0.3
Syntax
public sealed class DrawingEnumerator : DrawingEnumeratorBase

The DrawingEnumerator type exposes the following members.

Properties
  NameDescription
Public propertyCurrent
Gets the current drawing.
Top
Methods
  NameDescription
Public methodGetEnumerator
Allows the usage of the foreach statement with DrawingObjectEnumerator.
(Inherited from DrawingEnumeratorBase.)
Public methodGetSize
Returns the total amout of items.
(Inherited from DrawingEnumeratorBase.)
Public methodMoveNext
Moves to the next item in the enumerator.
(Inherited from DrawingEnumeratorBase.)
Public methodReset
Resets the enumerator to the beginning.
(Inherited from DrawingEnumeratorBase.)
Top
Fields
  NameDescription
Public fieldSelectInstances
Indicates that the instance Select() is called when the 'Current' item is asked from the enumerator. The user can set this to 'false' if no members are ever asked from the instance. This is the case when, for example, asking only a report property from the identifier. Warning: normally the user should not change this value.
(Inherited from DrawingEnumeratorBase.)
Top
Examples
using Tekla.Structures.Drawing;

public class Example
{
       public void Example1()
       {
           DrawingHandler DrawingHandler = new DrawingHandler();

           // Loop through all available drawings and delete all GA drawings.
           DrawingEnumerator AllDrawings = DrawingHandler.GetDrawings();

           while(AllDrawings.MoveNext())
           {
               Drawing CurrentDrawing = AllDrawings.Current as GADrawing;
               if(CurrentDrawing != null)
               {
                   CurrentDrawing.Delete();
               }
           }
       }
}
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