Possible to get coordinates for detail groups?

Hello All. I am attempting to get location of detail groups i have placed on several different levels. I have attempted to use Group.Location but get error being there are several of same group name sometimes. I tried to change lacing to longest but that also does not work. I have also tried Element.Location from clockwork but that also fails. Is there a way to retrieve origin points for each detail group placed in the model? Thank you for any assistance.


Error says - Object reference not set to an instance of an object.

Detail groups are 2D elements so they are view specific. You won’t be able to find a 3D location point for a details group but you can try something that works with annotations, concerning a view.

@dweber12 not sure if this is of use but heres away to get a list of views your detail groups are on…

Well - yes - detail groups do have a 3D location point. But it is a little more complicated than just a simple 3D point in the Revit model space. Everything sits on a sketch plane, So a detail sitting on a plan view with an elevation of 100’-0" will have a z-coordinate of 100. Simple enough for looking up and down. However, it gets more complicated if you have a detail that is in elevation or rotated in plan and elevation. In elevation Y is up and X and Z are the screen coordinates. For a compound rotated view, you’ll have a odd XYZ sketch plane slicing through 3D space at a compound angle. To find the real 3D coordinate you have to translate between the sketch plane and the real Revit 3D space.

For something real funky, copy paste some filled regions from different views to a section. Now rotate the section and all the filled regions will be on different sketch planes in 3D space.

I have this in my script, but the Group.Location only works if the detail group is only used once. I am trying to find when i use the same group multiple times on different levels. I am trying to find where my “Unit” groups are stacking between multiple levels.