When a Structural Framing Tag is placed as an instance, by default, it does not have the Leader Arrowhead set. How can we use the Revit API to set the leader arrowhead.
The Leader Arrowhead parameter is, in fact, part of the Structural Framing Tag's Symbol object. And so when we access the Family Symbol of the Structural Framing Tag, we will be able to access the Built-in Parameter called LEADER_ARROWHEAD. This parameter is what needs to be set in order to set the arrow head for the tag. Here is an example showing list of arrowheads available in a structural template for a Structural Column Tag instance.
Now the value that we wish to set for this type parameter can be obtained by filtering for the Arrowheads that are available in the model/template. This can be done by filtering for elements which are of ElementType and which have the built-in parameter called ALL_MODEL_FAMILY_NAME set to the value 'Arrowhead'. Once we have access to the Arrowhead element that we wish to use, you can set the ID of the Arrowhead element to the LEADER_ARROWHEAD built-in parameter. The following code snippet illustrates this approach for the Structural Column Tag instance shown in the screenshot above.
public class Command : IExternalCommand
public Result Execute(ExternalCommandData commandData,
ref string message,
UIApplication uiApp = commandData.Application;
Document doc = uiApp.ActiveUIDocument.Document;
// Access all elements in the model which represent Arrowheads
// This is being done by filtering all elements which
// are of ElementType and have the ALL_MODEL_FAMILY_NAME
// builtIn Parameter set to 'Arrowhead'
ElementId id = new ElementId(
ParameterValueProvider provider =
FilterStringRuleEvaluator evaluator =
FilterRule rule =
new FilterStringRule(provider, evaluator, "Arrowhead", false);
ElementParameterFilter filter =
FilteredElementCollector collector =
using (Transaction trans = new Transaction(doc, "Arrowhead"))
// For simplicity, assuming that the
// Structural Component Tag is selected
foreach (Element selectedElement in
IndependentTag tag = selectedElement as IndependentTag;
if (null != tag)
// Access the Symbol of the IndependentTag element
FamilySymbol tagSymbol =
doc.GetElement(tag.GetTypeId()) as FamilySymbol;
// Set the LEADER_ARROWHEAD parameter of the
// Symbol with one of the arrowheads that was filtered
After executing this code, in which for simplicity sake, we are just setting the first extracted arrowhead to the tag – we can see that the leader had a arrowhead set to it.