Dimensioning Generic Annotation Families

Hello,
Right now I have a script that does the dimension for each ICE panel section.
In my case for each panel that deviates from the standard size, we insert a hatch that evidences the material to be removed as highlighted in the image below:

The hatch is a Family instance from a generic annotation type. I can’t find for the life of me a way to get a reference from the annotation family unless it is a line.

If I dimension the thing manually and use the Revit lookup tool I can see it uses a surface (I know, “what? It is a 2d element”)


Some times it gets a REFERENCE_TYPE_LINEAR, which makes a lot more sense.

My end goal is this:

Does anyone know how to get the references from this kind of element?

Please advise! Every single thing I tried failed.

Hmm… Seems tricky… The crux of it is that you need to get the hatch geometry… Maybe @erfajo or @Alban_de_Chasteigner can assist in how this might be retrieved? I can’t get anything :frowning:

If you go into the generic annotation, the reference plane that’s in there is retrievable, but you can’t make new ones…

When I dimension between generic annotations I get something slightly different…
image

So my thought right now, is can you nest your family in a generic model and load that in? Then you can add more references which you can use for dimensioning?

image

Hope that’s useful,

Mark

2 Likes

Well I figured out a way, if I call all references “Weak Reference” and the 2 ones I need " Strong Reference" at leas in my case the array of reference comes always ordered with references from left to right so being only 2:

lSI = a.GetReferences(FamilyInstanceReferenceType.StrongReference)[0]
if len(a.GetReferences(FamilyInstanceReferenceType.StrongReference)) > 1:
	lSE = a.GetReferences(FamilyInstanceReferenceType.StrongReference)[1]

Now if I have a second reference I know at least in my case I will be the exterior one.
Worked on a file with more than 200 dimensions.

It is still unreasonable that you can’t name a reference line! Just add naming to the things, problem solved.

1 Like