# Get Geometry of a family which has detail item

**URL:** <https://forum.dynamobim.com/t/get-geometry-of-a-family-which-has-detail-item/46625>\
**Category:** Geometry\
**Created:** [February 11, 2020, 9:59am UTC](https://forum.dynamobim.com/t/get-geometry-of-a-family-which-has-detail-item/46625 "2020-02-11T09:59:13Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![dineshsubramani](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/dineshsubramani/32/159417_2.png) [@dineshsubramani](https://forum.dynamobim.com/u/dineshsubramani)\
**Post date:** [February 11, 2020, 9:59am UTC](https://forum.dynamobim.com/t/get-geometry-of-a-family-which-has-detail-item/46625/1 "2020-02-11T09:59:13Z")

</div>

hi guys  
i’m trying to retrieve the geometry of a family element which has only one detail element

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/7/7/77401fb2e5d7ab5dba602eec30af66ef0567608a.png)

the result is

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/e/6/e6fea8e4fd0ef6bebfec6c17ba224f4fb2d8ab5b.png)  
No geometry

but while i snoop i can see the solid geometry help me out

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/f/6/f65c2d2819b02cbff6abe76329a3f8b1ed6dcf00.png)

---

<div class="post-metadata">

**Author:** ![jacob.small](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/jacob.small/32/161030_2.png) [@jacob.small](https://forum.dynamobim.com/u/jacob.small)\
**Post date:** [February 12, 2020, 4:47am UTC](https://forum.dynamobim.com/t/get-geometry-of-a-family-which-has-detail-item/46625/2 "2020-02-12T04:47:20Z")

</div>

When accessed via Dynamo, detail components do not have geometry but their family types do.

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/4/4/44894e48293f9b23d7237ae2011d49df8e898c80.png)

A few things to note:

1. This means that instance parameter based transformations are not taken into account via the geometry (such as the length of a line based detail component), and the shapes must be scaled after the fact.
2. The resulting shapes often have false flag errors which show during the geometry conversion. My warning effectively stated “it wasn’t clear which version of geometry conversion to use so results may not be correct.”
3. Geometry is placed at the overall origin as you’re pulling it from the family type which has no transforms applied instead of the instance origin. As such you’ll have to apply the transform coordinates from the instance AFTER you apply any instance based geometry transformations (otherwise scaling stuff like a filled region is MUCH harder).
4. You’ll need to have a complete understanding of the family, including it’s internal origin and how the family was built in order to leverage this at scale in a project environment.

---

<div class="post-metadata">

**Author:** ![dineshsubramani](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/dineshsubramani/32/159417_2.png) [@dineshsubramani](https://forum.dynamobim.com/u/dineshsubramani)\
**Post date:** [February 12, 2020, 4:55am UTC](https://forum.dynamobim.com/t/get-geometry-of-a-family-which-has-detail-item/46625/3 "2020-02-12T04:55:29Z")

</div>

Hi Jacob  
I tried this already and checked once again but the result is same

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/8/2/8222e0b92b34cbede992460d41f0b10f3c7f3837.png)  
I have attached the family file  
Thanks in advance

---

<div class="post-metadata">

**Author:** ![jacob.small](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/jacob.small/32/161030_2.png) [@jacob.small](https://forum.dynamobim.com/u/jacob.small)\
**Post date:** [February 12, 2020, 4:57am UTC](https://forum.dynamobim.com/t/get-geometry-of-a-family-which-has-detail-item/46625/4 "2020-02-12T04:57:29Z")

</div>

Are you doing this in the family file or in a project?

---

<div class="post-metadata">

**Author:** ![dineshsubramani](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/dineshsubramani/32/159417_2.png) [@dineshsubramani](https://forum.dynamobim.com/u/dineshsubramani)\
**Post date:** [February 12, 2020, 4:57am UTC](https://forum.dynamobim.com/t/get-geometry-of-a-family-which-has-detail-item/46625/5 "2020-02-12T04:57:53Z")

</div>

family loaded into project

---

<div class="post-metadata">

**Author:** ![jacob.small](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/jacob.small/32/161030_2.png) [@jacob.small](https://forum.dynamobim.com/u/jacob.small)\
**Post date:** [February 12, 2020, 5:01am UTC](https://forum.dynamobim.com/t/get-geometry-of-a-family-which-has-detail-item/46625/6 "2020-02-12T05:01:28Z")

</div>

Ah. You’re using a detail item inside a model item. These are excluded typically. I’ll see what I can dig up but this may not be possible with your current family setup.

---

<div class="post-metadata">

**Author:** ![jacob.small](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/jacob.small/32/161030_2.png) [@jacob.small](https://forum.dynamobim.com/u/jacob.small)\
**Post date:** [February 12, 2020, 5:28am UTC](https://forum.dynamobim.com/t/get-geometry-of-a-family-which-has-detail-item/46625/7 "2020-02-12T05:28:35Z")

</div>

Looks like you’re going to have to go a full API route so you can specify which view to pull detail items from, and even then it may not pull the info you really want.

> **[Retrieving Lines Within a Family Instance](https://thebuildingcoder.typepad.com/blog/2011/08/retrieving-lines-within-a-family-instance.html)**
>
> Here is a basic query on how to obtain geometrical objects from a family instance answered by my colleague Saikat Bhattacharya. We have looked at more complex geometry retrieval in the past, so let's look at this simple case now: Question: I am...

I’d instead look at other means of pulling what you are likely after:

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/4/e/4e0a5955029f59ae7e057d3df075c440921dbaa6.png)

---

<div class="post-metadata">

**Author:** ![dineshsubramani](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/dineshsubramani/32/159417_2.png) [@dineshsubramani](https://forum.dynamobim.com/u/dineshsubramani)\
**Post date:** [February 12, 2020, 5:34am UTC](https://forum.dynamobim.com/t/get-geometry-of-a-family-which-has-detail-item/46625/8 "2020-02-12T05:34:27Z")

</div>

Thanks jacob  
This may work out for this particular family but it is not generic solution i have different families of the different shape in same template

---

<div class="post-metadata">

**Author:** ![jacob.small](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/jacob.small/32/161030_2.png) [@jacob.small](https://forum.dynamobim.com/u/jacob.small)\
**Post date:** [February 12, 2020, 5:38am UTC](https://forum.dynamobim.com/t/get-geometry-of-a-family-which-has-detail-item/46625/9 "2020-02-12T05:38:50Z")

</div>

> [@dineshsubramani](#):
>
> i have different families of the different shape in same template

Then likely you’ll have to move to using another method of modeling your content, or build a custom node to expose that content. Short of that you can get the topmost face of the model content and work with that after pulling onto the desired plane; get all model content and project onto a plane to create surfaces (this could be VERY computationally taxing), or if stuff is really complex creating a detail component which has the shape and flexibility you need and placing that programmatically atop your other current family instances and pull the content from there. Wish I had better news for you.

---

<div class="post-metadata">

**Author:** ![dineshsubramani](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/dineshsubramani/32/159417_2.png) [@dineshsubramani](https://forum.dynamobim.com/u/dineshsubramani)\
**Post date:** [February 12, 2020, 5:44am UTC](https://forum.dynamobim.com/t/get-geometry-of-a-family-which-has-detail-item/46625/10 "2020-02-12T05:44:08Z")

</div>

Hope this works Thanks Jacob

---

<div class="post-metadata">

**Author:** ![Alban\_de\_Chasteigner](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/alban_de_chasteigner/32/39650_2.png) [@Alban\_de\_Chasteigner](https://forum.dynamobim.com/u/Alban_de_Chasteigner)\
**Post date:** [February 12, 2020, 9:52pm UTC](https://forum.dynamobim.com/t/get-geometry-of-a-family-which-has-detail-item/46625/11 "2020-02-12T21:52:06Z")

</div>

What is the category of your family ? If it is a Generic Annotation or a Detail Item category, it is possible to retrieve the 2D geometry in the correct location with the help of the API.

 ![FamilyInstance Get Geometry2](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/a/9/a9381316009c7f06a563f86ecd992c2283828986.jpeg)  
 ![FamilyInstance Get Geometry](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/7/8/78e74f52a644eed2e93859fcec5864188dd801d9.jpeg)  
[FamilyInstance Get Geometry.dyn](https://forum.dynamobim.com/uploads/short-url/pZOxBoKlbCpYeOK852NFt6b5U1l.dyn) (2.1 KB)

---

<div class="post-metadata">

**Author:** ![jacob.small](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/jacob.small/32/161030_2.png) [@jacob.small](https://forum.dynamobim.com/u/jacob.small)\
**Post date:** [February 13, 2020, 4:39am UTC](https://forum.dynamobim.com/t/get-geometry-of-a-family-which-has-detail-item/46625/12 "2020-02-13T04:39:52Z")

</div>

It’s classified as furniture in this case. ☹

---

<div class="post-metadata">

**Author:** ![dineshsubramani](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/dineshsubramani/32/159417_2.png) [@dineshsubramani](https://forum.dynamobim.com/u/dineshsubramani)\
**Post date:** [February 13, 2020, 7:04am UTC](https://forum.dynamobim.com/t/get-geometry-of-a-family-which-has-detail-item/46625/13 "2020-02-13T07:04:21Z")

</div>

Jacob is Right but your reply help to understand more clearly thanks Alban 👍

---

<div class="post-metadata">

**Author:** ![Alban\_de\_Chasteigner](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/alban_de_chasteigner/32/39650_2.png) [@Alban\_de\_Chasteigner](https://forum.dynamobim.com/u/Alban_de_Chasteigner)\
**Post date:** [February 13, 2020, 9:26am UTC](https://forum.dynamobim.com/t/get-geometry-of-a-family-which-has-detail-item/46625/14 "2020-02-13T09:26:41Z")

</div>

The masking regions don’t appear to be supported by the API.  
So the solution from @jacob.small is therefore the only one.

The geometry of the symbolic lines can however be retrieved if necessary.

 ![2D geometry 2](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/f/7/f74da4febb63ea4467f9e199adf42cde643ea1c7.jpeg)  
 ![2D geometry](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/1/e/1e264abaee09e2f69f123f3edb7a3f562f5d3244.jpeg)

---

<div class="post-metadata">

**Author:** ![dineshsubramani](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/dineshsubramani/32/159417_2.png) [@dineshsubramani](https://forum.dynamobim.com/u/dineshsubramani)\
**Post date:** [February 13, 2020, 9:51am UTC](https://forum.dynamobim.com/t/get-geometry-of-a-family-which-has-detail-item/46625/15 "2020-02-13T09:51:11Z")

</div>

Hi Alban it’s Not Working

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/5/c/5c9806fdd791a7b25ff0bfaa10098bedf92db08a.png)  
Please review the family file below  
[Conference Table NEW.rfa](https://forum.dynamobim.com/uploads/short-url/An140RhBok2FDmJO1KbyPNqZhPu.rfa) (420 KB)

---

<div class="post-metadata">

**Author:** ![Alban\_de\_Chasteigner](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/alban_de_chasteigner/32/39650_2.png) [@Alban\_de\_Chasteigner](https://forum.dynamobim.com/u/Alban_de_Chasteigner)\
**Post date:** [February 13, 2020, 10:40am UTC](https://forum.dynamobim.com/t/get-geometry-of-a-family-which-has-detail-item/46625/16 "2020-02-13T10:40:49Z")

</div>

EDIT :

Looks like I was too quick in my tests. See the post by @c.poupin below.

---

<div class="post-metadata">

**Author:** ![dineshsubramani](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/dineshsubramani/32/159417_2.png) [@dineshsubramani](https://forum.dynamobim.com/u/dineshsubramani)\
**Post date:** [February 13, 2020, 10:45am UTC](https://forum.dynamobim.com/t/get-geometry-of-a-family-which-has-detail-item/46625/17 "2020-02-13T10:45:23Z")

</div>

Alban thanks a lot for spending time on it this is one of a sample i have many families similar to this…so this wont work. but thank a lot have a good day

---

<div class="post-metadata">

**Author:** ![c.poupin](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/c.poupin/32/89152_2.png) [@c.poupin](https://forum.dynamobim.com/u/c.poupin)\
**Post date:** [February 13, 2020, 2:06pm UTC](https://forum.dynamobim.com/t/get-geometry-of-a-family-which-has-detail-item/46625/18 "2020-02-13T14:06:25Z")

</div>

hello,  
a Python solution with specify the view in [Geometry Option](https://www.revitapidocs.com/2018.2/aa41fc13-9f81-836c-4271-82568ba5d7e8.htm) (the detail elements are only visible on certain views)

```
import clr
clr.AddReference('ProtoGeometry')
from Autodesk.DesignScript.Geometry import *

clr.AddReference('RevitAPI')
import Autodesk
from Autodesk.Revit.DB import *

clr.AddReference('RevitNodes')
import Revit
clr.ImportExtensions(Revit.Elements)
clr.ImportExtensions(Revit.GeometryConversion)

clr.AddReference('RevitServices')
import RevitServices
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager

doc = DocumentManager.Instance.CurrentDBDocument

elem = UnwrapElement(IN[0])

outsurface = []
outedges = []
outlines = []

#get the actual view where the Detail Element is Visible
view = doc.ActiveView
op = Options()
op.View = view
geoms = elem.get_Geometry(op)
for geoinst in geoms:
	if isinstance(geoinst, GeometryInstance):
            geosymbs = geoinst.GetInstanceGeometry()
            #or only get Symbolgeometry 
	        #geosymbs = geoinst.GetSymbolGeometry()
		for geoelem in geosymbs:
			if isinstance(geoelem, Solid):
				for face in geoelem.Faces:
					outsurface.extend(face.ToProtoType())
				for edge in geoelem.Edges:
					outedges.append(edge.AsCurve().ToProtoType())	
			if isinstance(geoelem, Line):	
				outlines.append(geoelem.ToProtoType())
OUT = outsurface, outedges, outlines

```

result without symbolic lines in Family (only masking regions)

 ![get geometry for detail items](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/0/3/03c852153871af9496370fea382385665ee00993.png)

result with symbolic lines

 ![get geometry for detail items v2](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/9/8/98db996c80c9cf07db6cbed14d0720d3982eef18.png)

---

<div class="post-metadata">

**Author:** ![dineshsubramani](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/dineshsubramani/32/159417_2.png) [@dineshsubramani](https://forum.dynamobim.com/u/dineshsubramani)\
**Post date:** [February 14, 2020, 8:34am UTC](https://forum.dynamobim.com/t/get-geometry-of-a-family-which-has-detail-item/46625/19 "2020-02-14T08:34:44Z")

</div>

sorry poupin this is not working  
the geometry is not the family instance geometry

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/b/e/be5804c5c52744cc48e0f8ec35d69b15d6ad962b.png)

showing the same values for all elements  
anyway thanks

---

<div class="post-metadata">

**Author:** ![dineshsubramani](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/dineshsubramani/32/159417_2.png) [@dineshsubramani](https://forum.dynamobim.com/u/dineshsubramani)\
**Post date:** [February 14, 2020, 8:36am UTC](https://forum.dynamobim.com/t/get-geometry-of-a-family-which-has-detail-item/46625/20 "2020-02-14T08:36:02Z")

</div>

its not working alban

[Next page](https://forum.dynamobim.com/t/get-geometry-of-a-family-which-has-detail-item/46625.md?page=2)
