# Dimension not visible in SectionView

**URL:** <https://forum.dynamobim.com/t/dimension-not-visible-in-sectionview/94655>\
**Category:** Revit\
**Created:** [October 17, 2023, 8:29pm UTC](https://forum.dynamobim.com/t/dimension-not-visible-in-sectionview/94655 "2023-10-17T20:29:26Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mclough](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/mclough/32/134664_2.png) [@mclough](https://forum.dynamobim.com/u/mclough)\
**Post date:** [October 17, 2023, 8:29pm UTC](https://forum.dynamobim.com/t/dimension-not-visible-in-sectionview/94655/1 "2023-10-17T20:29:26Z")

</div>

I’m running into a problem when creating Dimensions in a Section view where the dimension gets created, but is not visible in the view. I’ve read through a number of posts reporting a similar behavior, but none of them explain the issue or point at a solution that makes sense to me.

I extract the references from the element and calculate the placement line perpendicular between the reference surfaces. I use Genius Loci nodes to extract the references and construct the dimension. The way the API describes it seems pretty straightforward. I’ve attached the script.  
[test\_constructDimension\_try-again.dyn](https://forum.dynamobim.com/uploads/short-url/yNMssF4sl4MogIq5hyFGldLo74S.dyn) (104.0 KB)

 ![test_constructDimension_try-again_2023-10-17_03-25-55](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/4/2/4287a243e1f2f1221e2588cc21444b18c524772b.png)

a weird thing that stands out is that the BoundingBox property of the created Dimension is empty, but it registers on the active view’s workset.

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/1/d/1d2a97582768335fbaf5d5f3f826bb0605b457bd.png)

I compared the snoop against a manually created dimension and the stable representations of the references look right, but the positioning information is off by quite a bit. I tried transforming the lines into the crop box CS, but that didn’t resolve the issue.

I’ve seen a couple of posts reference having to set the sketch plane, but this doesn’t seem to be supported in the API documentation? I tried it and it didn’t seem to have an effect.

What am i doing wrong?

---

<div class="post-metadata">

**Author:** ![mclough](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/mclough/32/134664_2.png) [@mclough](https://forum.dynamobim.com/u/mclough)\
**Post date:** [October 17, 2023, 9:48pm UTC](https://forum.dynamobim.com/t/dimension-not-visible-in-sectionview/94655/2 "2023-10-17T21:48:54Z")

</div>

Digging a bit further, i guess it’s somehow an issue with the specific families i’m trying to use this on. The ‘view x’ and ‘view y’ dimensions of Generic Model as desired:  
 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/8/d/8d5b81f328274b3d7c724bed27a7ecf0a493ff26.png)

I reworked some elements to more generically pull ‘furthest’ references according to view orientation, and changed to OOTB node because the GL one was failing to construct references from surfaces.

 ![test_constructDimension_try-again_2023-10-17_04-38-39](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/4/c/4c0cdec67617c7ebdff79b7231be200d74cb54d3.png)

This functions as expected with Generic Models, but fails on the Windows i was trying to build this script for. I guess this technically works (?) but Revit prompts the dimension construction with a warning  
 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/f/4/f4f0003c1a699302b8e2e142f93be0604cd2b7a9.png)

The visual inspection in Dynamo looks as expected:

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/3/2/321c688645216e701b1e6d6ebaccb649adfd8da7.png)  
i guess i need to check the stable representations, but it looks like ElementFaceReference doesn’t convert with UnwrapElement(?). I guess i need to figure out why these collections of references are invalid 😑

---

<div class="post-metadata">

**Author:** ![mclough](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/mclough/32/134664_2.png) [@mclough](https://forum.dynamobim.com/u/mclough)\
**Post date:** [October 24, 2023, 2:21pm UTC](https://forum.dynamobim.com/t/dimension-not-visible-in-sectionview/94655/3 "2023-10-24T14:21:31Z")

</div>

following up: i ended up just porting this all to python. Managing surfaces and reference objects seems a bit more straightforward just using the API.

I did identify some odd behavior involving the map between ProtoGeometry `Surfaces` generated from `Face` classes in the API, and the References they’re supposed be associated with. In my test case i was considering this window family:

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

Inspecting the Dimension’s References, we expect to find these two references as the references required to construct the overall height:

- 1ed7dd28-adf3-4e26-8664-7e00cc0b5fd7-0023209c:0:INSTANCE:f3d45ece-f0d0-4661-a3c0-f67ded99c031-0023093c:86:SURFACE
- 1ed7dd28-adf3-4e26-8664-7e00cc0b5fd7-0023209c:0:INSTANCE:f3d45ece-f0d0-4661-a3c0-f67ded99c031-0023093c:82:SURFACE

so, surface Id 82 and 86.

I use either the node `Surface Reference` from Genius Loci, or `RevitFaceReference.FromDynamoSurface` from Clockwork to get the Reference associated with the ProtoGeometry Surfaces, then get the stable representation using python. We can see the references of interest in positions 13 and 15.

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/2/6/267d796dcd10f9c393552cb8e8b800e1861e11e1.jpeg)

But when I get those indices, these are the ProtoGeometry surfaces we see in Dynamo:

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

So this would explain why Dimensions are not able to be constructed, but I’ve very curious if this is intended behavior? I’ve looked at extracting geometry with Element.Geometry \> Explode \> Filter instead of Element.Faces. It’s possible that the nodes that fetch the References don’t function, but they both give the same result.  
I did try using the Reference classes from Dynamo Core using ElementFaceReference.BySurface, but I didn’t find a way to check the stable references from those objects.

Thoughts?  
[test\_constructDimension\_try-again.dyn](https://forum.dynamobim.com/uploads/short-url/qApyIbb706ZIH48eDT6jzpRvKe2.dyn) (162.8 KB)
