ViewMarkBasicTagAttributes Class

The ViewMarkBasicTagAttributes class contains basic attributes for view mark tags.
Inheritance Hierarchy

Namespace:  Tekla.Structures.Drawing
Assembly:  Tekla.Structures.Drawing (in Tekla.Structures.Drawing.dll) Version: 2026.0.0-alpha00057080+93cd22c410a086ecc356b7088d4daaf2e12907eb
Syntax
[SerializableAttribute]
public class ViewMarkBasicTagAttributes : GenericAttributesBase

The ViewMarkBasicTagAttributes type exposes the following members.

Constructors
  NameDescription
Public methodViewMarkBasicTagAttributes
Creates a new mark tag attributes instance.
Public methodViewMarkBasicTagAttributes(Vector, TagLocation, ContainerElement)
Creates a new mark tag attributes instance with the given offset, location and content.
Top
Properties
  NameDescription
Public propertyLocation
The location of the mark tag.
Public propertyOffset
The offset of the mark tag.
Public propertyTagContent
The tag content.
Top
Methods
  NameDescription
Public methodIsEqual
Compares the current object with an object of the same type.
(Overrides GenericAttributesBaseIsEqual(Object).)
Top
Examples
Reads and modifies tag content of view mark:
using Tekla.Structures.Drawing;

namespace ExampleViewMark
{
    internal class Program
    {
        static void Main()
        {
            DrawingHandler dh = new DrawingHandler();
            Drawing currentDrawing = dh.GetActiveDrawing();
            DrawingObjectEnumerator doe = currentDrawing.GetSheet().GetAllViews();

            while (doe.MoveNext())
            {
                View drawingView = doe.Current as View;
                ContainerElement ce = drawingView.Attributes.TagsAttributes.TagA1.TagContent;
                string currentTextTagA1 = ce.GetUnformattedString();
                // TagA2..TagA5 can be accessed and modified similarly

                drawingView.Attributes.TagsAttributes.TagA1.TagContent.Add(new TextElement("TagA1"));
                drawingView.Modify();
            }

            currentDrawing.CommitChanges();
            // Add breakpoint here to check the tags in the drawing

            View.ViewMarkTagsAttributes viewTags = new View.ViewMarkTagsAttributes
            {
                TagA1 = new View.ViewMarkTagAttributes(),
            };

            viewTags.TagA1.TagContent.Add(new TextElement("Test"));
            doe.Reset();

            while (doe.MoveNext())
            {
                View drawingView = doe.Current as View;
                drawingView.Attributes.TagsAttributes = viewTags;
                drawingView.Modify();
            }

            currentDrawing.CommitChanges();
            // Add breakpoint here to check the tags in the drawing again
        }
    }
}
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