# Place face based opening on Structural Column Element

**URL:** https://forum.dynamobim.com/t/place-face-based-opening-on-structural-column-element/90429
**Category:** Revit
**Tags:** revit, python, geometry, dynamo
**Created:** [June 6, 2023, 11:52am UTC](https://forum.dynamobim.com/t/place-face-based-opening-on-structural-column-element/90429 "2023-06-06T11:52:04Z")
**Posts on this page:** 12
**Page:** 1

<div class="post-metadata">

### Author: ![diptajit](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/diptajit/32/130445_2.png) [@diptajit](https://forum.dynamobim.com/u/diptajit)
#### Post date: [June 6, 2023, 11:52am UTC](https://forum.dynamobim.com/t/place-face-based-opening-on-structural-column-element/90429/1 "2023-06-06T11:52:05Z")

</div>

![2](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/f/8/f83679fa4627aff9f399bd745cc12212985a035f.jpeg)

I am trying to create a face based opening on the intersection of the model line and the structural member. Can any one suggest any solution with python or API.

---

<div class="post-metadata">

### Author: ![staylor](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/staylor/32/94307_2.png) [@staylor](https://forum.dynamobim.com/u/staylor)
#### Post date: [June 6, 2023, 12:26pm UTC](https://forum.dynamobim.com/t/place-face-based-opening-on-structural-column-element/90429/2 "2023-06-06T12:26:03Z")

</div>

One option would be to select the face of the column. Get the intersection point of the line to that face. Then you can use the Springs.FamilyInstance.ByFacePoints node to insert the opening based on the face and the intersection point.

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

---

<div class="post-metadata">

### Author: ![diptajit](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/diptajit/32/130445_2.png) [@diptajit](https://forum.dynamobim.com/u/diptajit)
#### Post date: [June 6, 2023, 4:39pm UTC](https://forum.dynamobim.com/t/place-face-based-opening-on-structural-column-element/90429/3 "2023-06-06T16:39:28Z")

</div>

Placing the opening family is not much of a issue.

 ![3](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/e/7/e7160f61f987725f53f63ad5c3d43ce4538f8eff.jpeg)

Getting the type of opening is the main problem here. Also I could not find any API that create this structural opening on Structural Columns or Beams.  
What I am actually want to achieve is  
 ![2](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/e/3/e3b73003d011908350fa96dcf9edc373235a85f3.jpeg)  
on structural elements. I am quite sure, there must be something in API can do the job as Metal Wood Framing Plugin is doing the same for MEP punch outs.

---

<div class="post-metadata">

### Author: ![staylor](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/staylor/32/94307_2.png) [@staylor](https://forum.dynamobim.com/u/staylor)
#### Post date: [June 6, 2023, 5:44pm UTC](https://forum.dynamobim.com/t/place-face-based-opening-on-structural-column-element/90429/4 "2023-06-06T17:44:26Z")

</div>

Apologies for misunderstanding your intent. Look at NewOpening in the API. This has the option for inserting an opening into a column.

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

---

<div class="post-metadata">

### Author: ![diptajit](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/diptajit/32/130445_2.png) [@diptajit](https://forum.dynamobim.com/u/diptajit)
#### Post date: [June 7, 2023, 5:31pm UTC](https://forum.dynamobim.com/t/place-face-based-opening-on-structural-column-element/90429/5 "2023-06-07T17:31:27Z")

</div>

![2](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/b/4/b43cee4bda1b92422da9246d0bcfccbc45b9d271.jpeg)

Thanks @staylor I have prepared a script for the same but not sure why it is saying that the curve loops are not closed If someone can help me to understand the issue that would be great.

```auto
import clr

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

clr.AddReference("System")
from System.Collections.Generic import List

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

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

import math

doc = DocumentManager.Instance.CurrentDBDocument

openings = []

beams = IN[0]
loops = IN[1]

for i in range(0,len(beams)):
		
	el = doc.GetElement(ElementId(beams[i].Id))
		
	ca = CurveArray()
		
	for c in loops[i]:
		
		curve1 = c.ToRevitType(True)
		ca.Append(curve1)
						
	TransactionManager.Instance.EnsureInTransaction(doc)
	opening = doc.Create.NewOpening.Overloads[Element, CurveArray, eRefFace](el, ca, eRefFace.CenterY)
	TransactionManager.Instance.TransactionTaskDone()	
					
	openings.append(ca)

OUT = openings

```

I tested out this script on non-circular geometry. It’s working fine. It seems like I am only getting the error when I am trying to create a circular opening.

---

<div class="post-metadata">

### Author: ![Marcel\_Rijsmus](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/marcel_rijsmus/32/8539_2.png) [@Marcel\_Rijsmus](https://forum.dynamobim.com/u/Marcel_Rijsmus)
#### Post date: [June 8, 2023, 7:51am UTC](https://forum.dynamobim.com/t/place-face-based-opening-on-structural-column-element/90429/6 "2023-06-08T07:51:12Z")

</div>

Reply to post 3:  
Try Element.ElementType

---

<div class="post-metadata">

### Author: ![sovitek](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/sovitek/32/116237_2.png) [@sovitek](https://forum.dynamobim.com/u/sovitek)
#### Post date: [June 8, 2023, 8:56am UTC](https://forum.dynamobim.com/t/place-face-based-opening-on-structural-column-element/90429/7 "2023-06-08T08:56:12Z")

</div>

Hi @diptajit could it work if you split the curves ? nice one btw:) thx

![Revit_Jr42BHuPjL](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/d/1/d17da14eb7dac25d3fc05a98872afc5c7482d30b.gif)

---

<div class="post-metadata">

### Author: ![diptajit](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/diptajit/32/130445_2.png) [@diptajit](https://forum.dynamobim.com/u/diptajit)
#### Post date: [June 8, 2023, 11:00am UTC](https://forum.dynamobim.com/t/place-face-based-opening-on-structural-column-element/90429/8 "2023-06-08T11:00:25Z")

</div>

Thanks @sovitek 👏 👏 👏 splitting the curve resolves the issue. But don’t you think it’s a little counter-intuitive? There should be a straightforward way to create a face base round opening. I tried to input a list of lists to the curve loop but still, it is giving the same error.

---

<div class="post-metadata">

### Author: ![sovitek](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/sovitek/32/116237_2.png) [@sovitek](https://forum.dynamobim.com/u/sovitek)
#### Post date: [June 8, 2023, 11:03am UTC](https://forum.dynamobim.com/t/place-face-based-opening-on-structural-column-element/90429/9 "2023-06-08T11:03:26Z")

</div>

allright…i havent go deep into it ;)…could you show your graph with the error ?? is it a beam or column you try on ?..if it columns it will only work on one side as i saw ref is set to refY, thats probably why

 ![Capture](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/c/1/c1c6d7c354f4b5529adf521d08613e4fec983aa8.png)

PS… its rare i do that kind i would say never …my structural engineers dont like it 😉 what is the reason ?

---

<div class="post-metadata">

### Author: ![diptajit](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/diptajit/32/130445_2.png) [@diptajit](https://forum.dynamobim.com/u/diptajit)
#### Post date: [June 8, 2023, 2:48pm UTC](https://forum.dynamobim.com/t/place-face-based-opening-on-structural-column-element/90429/10 "2023-06-08T14:48:30Z")

</div>

I am trying it on Structural Framing. The top image kind of shows the error which is saying the curve is not closed. I think it is expecting a list of curves. So it is working with all other geometry where it has more than one curve but not working with the circle as it have a single curve. Splitting it kind of resolves the issue but there must be something we are missing.

---

<div class="post-metadata">

### Author: ![Marcel\_Rijsmus](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/marcel_rijsmus/32/8539_2.png) [@Marcel\_Rijsmus](https://forum.dynamobim.com/u/Marcel_Rijsmus)
#### Post date: [June 8, 2023, 3:24pm UTC](https://forum.dynamobim.com/t/place-face-based-opening-on-structural-column-element/90429/11 "2023-06-08T15:24:03Z")

</div>

Maybe you could try a faceted circle with 80 facets  
No sure, haven’t tested

---

<div class="post-metadata">

### Author: ![diptajit](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/diptajit/32/130445_2.png) [@diptajit](https://forum.dynamobim.com/u/diptajit)
#### Post date: [June 9, 2023, 9:47am UTC](https://forum.dynamobim.com/t/place-face-based-opening-on-structural-column-element/90429/12 "2023-06-09T09:47:06Z")

</div>

@Marcel_Rijsmus thanks for your input but I believe we have to sacrifice the flexibility of using a single curve circle if we use a faceted circle. The current solution of splitting the curve is working for me. But I was just curious, why a single curve circle is not working or what modification is required to make it work with the newOpening object.
