In dynamo is there any possibility to select the structural rebar tag type from Multi rebar annotation

Hi all,
I am trying to get the location of “Structural rebar tag & Multi rebar annotation” in single shot. I can select “Structural Rebar Tag” by easy picking if i pick the “Multi rebar Annotation” i can’t get the location like “Structural Rebar Tag”. So i need to retrieve the "“Structural Rebar Tag” type from “Multi rebar Annotation”. See my graph below.

We can’t help you if you don’t also share the python code that’s getting the annotation location. If it’s the code from your previous post (which would be nice if you included a link to) then I think it was already mentioned that it wouldn’t work for non-tag elements. You need a different method for dealing with annotations. It also looks like you’re running your code on the category instead of the element.

Yea, @Nick_Boyts so i am just trying to select the Structural Rebar Tag from Multi rebar annotations. Then this python code will works. The problem is i can’t select Structural Rebar tag from Multi rebar annotation by using drag option. But i can pick it easily. My aim is selecting the Tag by using Drag. I have attached my current graph. Thank you for your response.

########################################
### Configure the Python environment ###
########################################
### standard imports ###
import sys #add the sys class to the Python environment so we can work with the sys objects
import clr #add the CLR (common language runtime) class to the Python environment so we can work with .net libraries

### Dynamo Revit imports ###
clr.AddReference("RevitNodes") #add Dynamo's Revit nodes library to the clr
import Revit #import Dynamo's Revit node class
clr.ImportExtensions(Revit.Elements) #add the element conversion methods to the CLR
clr.ImportExtensions(Revit.GeometryConversion) #add the geometry conversion methods to the CLR

### Revit API imports ###
clr.AddReference("RevitAPI") #add the Revit API to the CLR
import Autodesk #add the Autodesk class to the Python environment 
from Autodesk.Revit.DB import * #import every class of the Revit API to the Python environment



results = [] #list to hold the results
elems = UnwrapElement(IN[0]) #import the elements from IN[0] of the Dynamo environment and convert to native Revit elements
if not elems.__class__ == [].__class__ : elems = [elems] #ensure that elems is a list, not an individual object, so that we can always prepare for a loop
for elem in elems: #iterate over the list of elements
    if not hasattr(elem,"TagHeadPosition"): results.append("element is not a valid tag type") #inform the user if the element isn't a valid tag
    else: results.append(elem.TagHeadPosition.ToPoint()) #otherwise get the location point
OUT = results #return the results to the Dynamo list

Please post code as preformatted text (</>) to maintain formatting.

Thank you! I am new to this forum. I’ve done as you instructed now.

I’m having a hard time following but it sounds like you want to be able to box-select your Multi-Rebar Annotations and have that also return the embedded Structural Rebar Tag. Is that correct?

Take a look at the MultiReferenceAnnotation class. You can get the tag using TagId.
MultiReferenceAnnotation Members (revitapidocs.com)

Yes @Nick_Boyts you are absolutely right. This is my clear cut intention.

I follow your suggestion and will post the changes. Thank you!

Hi,
Using the Get DependentElements node from the GeniusLocie package, I obtained the desired results.