Creates a new IndependentTag Element.
Namespace:
Autodesk.Revit.Creation
Assembly:
RevitAPI
(in RevitAPI.dll) Version: 18.0.0.0 (18.0.0.420)
Syntax
C# |
---|
|
Visual Basic |
---|
|
Visual C++ |
---|
|
Parameters
- dbview
-
Type:
Autodesk.Revit.DB
View
The view in which the tag is to be visible.
- elemToTag
-
Type:
Autodesk.Revit.DB
Element
The host object of tag.
- addLeader
-
Type:
System
Boolean
Whether there will be a leader.
- tagMode
-
Type:
Autodesk.Revit.DB
TagMode
The mode of the tag. Add by Category, add by Multi-Category, or add by material.
- tagOrientation
-
Type:
Autodesk.Revit.DB
TagOrientation
The orientation of the tag.
- pnt
-
Type:
Autodesk.Revit.DB
XYZ
If not using a leader, this is the position of the tag head. If using a leader, then the tag will be placed with the default leader length as close to this input point as possible.
Return Value
If successful, an IndependentTag object is returned.Remarks
This method forms a tag relationship to the host object.
Exceptions
Exception | Condition |
---|---|
Autodesk.Revit.Exceptions InvalidOperationException | If the view is a perspective view. |
Autodesk.Revit.Exceptions ArgumentException | Thrown if the element to tag does not exist in the given document. |
Autodesk.Revit.Exceptions ArgumentException | Thrown if the view does not exist in the given document. |