An annotation symbol is a symbol applied to a family to uniquely identify that family in a project.
Figure 76: Annotation Symbol with two leaders
Annotation symbols can be created using the following overload of the Creation.Document.NewFamilyInstance() method:
Code Region 16-6: Create a new Annotation Symbol |
public FamilyInstance NewFamilyInstance Method (XYZ origin, FamilySymbol symbol, View specView) |
The annotation symbol can be deleted using the Document.Delete() method.
Add and remove leaders using the addLeader() and removeLeader() methods.
Code Region 16-7: Using addLeader() and removeLeader() |
public void AddAndRemoveLeaders(AnnotationSymbol symbol) { int leaderSize = symbol.Leaders.Size; string message = "Number of leaders in Annotation Symbol before add: " + leaderSize; symbol.addLeader(); leaderSize = symbol.Leaders.Size; message += "\nNumber of leaders after add: " + leaderSize; symbol.removeLeader(); leaderSize = symbol.Leaders.Size; message += "\nNumber of leaders after remove: " + leaderSize; TaskDialog.Show("Revit", message); } |