Creating IndependentTags, not showing up?

Creating IndependentTags, not showing up?

Anonymous
Not applicable
604 Views
1 Reply
Message 1 of 2

Creating IndependentTags, not showing up?

Anonymous
Not applicable

Hello,

I am trying to produce tags on some of my elements already created. I am using the IndendentTag.Create method, although I am trying to use a custom family for independentTag which uses a custom parameter of the element 'Identity_Reference' to show the tag text. This works fine when done manually inside Revit using the Tag By Category button, but when trying to do it programmatically it doesn't produce any error, but also no tags are created. The parameter is succesfully updated, and when I manually create the tag in revit afterwards, the text shows up as this field is already populated.

 

This is called inside a transaction just after the element is created:

            IndependentTag tag = IndependentTag.Create(doc, doc.ActiveView.Id, new Reference(ele), true, TagMode.TM_ADDBY_CATEGORY, TagOrientation.Horizontal, xyz);
            FamilySymbol sym = getFamilySymbol("Identity Reference", "Schematic_Identity Ref");
            tag.ChangeTypeId(sym.Id);
            Parameter p = ele.LookupParameter("Identity_Reference");
            p.Set(text);

Any assistance would be greatly appreciated.

Thanks

0 Likes
Accepted solutions (1)
605 Views
1 Reply
Reply (1)
Message 2 of 2

Anonymous
Not applicable
Accepted solution

Nevermind, changing 'addLeader' bool to false, made them appear.

0 Likes