IndependentTag.Create
Description:
Places a tag on an element or subelement.
Places a tag on an element or subelement.
Overloads (2):
Create(Document,ElementId,ElementId,Reference,Boolean,TagOrientation,XYZ)
public static IndependentTag Create(
Document document,
ElementId symId,
ElementId ownerDBViewId,
Reference referenceToTag,
bool addLeader,
TagOrientation tagOrientation,
XYZ pnt
)
-
documentThe document to which the tag will be added.
-
symIdThe id for the FamilySymbol which determines the tag's type.
-
ownerDBViewIdThe view in which the tag will be visible.
-
referenceToTagThe host reference of the tag. The reference can be to an element or subelement in a local or linked document.
-
BooleanaddLeaderWhen true, the tag will be created with a straight leader with an attached end.
-
tagOrientationThe orientation of the tag's head.
-
pntFor tags without leaders, this point is the position of the tag head. For tags with leaders, this point is the end point of the leader, and a leader of default length will be created from this point to the tag head.
-
The ElementId ownerDBViewId does not correspond to a View. -or- The ElementId ownerDBViewId is a view template. -or- The ElementId ownerDBViewId is a perspective view. -or- The 3D view ownerDBViewId is not locked. -or- The ElementId symId does not correspond to a FamilySymbol. -or- The reference can not be tagged.
-
A non-optional argument was null
-
A value passed for an enumeration argument is not a member of that enumeration
-
Tag creation failed.
-
The document is in failure mode: an operation has failed, and Revit requires the user to either cancel the operation or fix the problem (usually by deleting certain elements). -or- The document is being loaded, or is in the midst of another sensitive process.
-
The document has no open transaction.