# How to remove corridor.surface?

**URL:** <https://forum.dynamobim.com/t/how-to-remove-corridor-surface/81259>\
**Category:** Civil 3D\
**Created:** [September 20, 2022, 3:53pm UTC](https://forum.dynamobim.com/t/how-to-remove-corridor-surface/81259 "2022-09-20T15:53:41Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![javi\_lapina](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/javi_lapina/32/113822_2.png) [@javi\_lapina](https://forum.dynamobim.com/u/javi_lapina)\
**Post date:** [September 20, 2022, 3:53pm UTC](https://forum.dynamobim.com/t/how-to-remove-corridor-surface/81259/1 "2022-09-20T15:53:41Z")

</div>

How can I remove in the properties of the corridor, corridor.surfaces that I do not need.  
Thanks

---

<div class="post-metadata">

**Author:** ![hosneyalaa](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/hosneyalaa/32/100865_2.png) [@hosneyalaa](https://forum.dynamobim.com/u/hosneyalaa)\
**Post date:** [September 20, 2022, 7:00pm UTC](https://forum.dynamobim.com/t/how-to-remove-corridor-surface/81259/2 "2022-09-20T19:00:42Z")

</div>

Hi  
Search in the combar package can you find it

> [@Create corridor surface (python)](https://forum.dynamobim.com/t/create-corridor-surface-python/49010/11):
>
> @ozanunsal if you’re interested in a non-Python solution, there are nodes for Corridor surfaces in the Camber package.

---

<div class="post-metadata">

**Author:** ![javi\_lapina](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/javi_lapina/32/113822_2.png) [@javi\_lapina](https://forum.dynamobim.com/u/javi_lapina)\
**Post date:** [September 21, 2022, 9:07am UTC](https://forum.dynamobim.com/t/how-to-remove-corridor-surface/81259/3 "2022-09-21T09:07:04Z")

</div>

Hi, thank you very much, but I can’t find anything about it in the Camber package

---

<div class="post-metadata">

**Author:** ![hosneyalaa](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/hosneyalaa/32/100865_2.png) [@hosneyalaa](https://forum.dynamobim.com/u/hosneyalaa)\
**Post date:** [September 21, 2022, 10:16am UTC](https://forum.dynamobim.com/t/how-to-remove-corridor-surface/81259/4 "2022-09-21T10:16:05Z")

</div>

TRY  
PYTHON

 ![Annotation 2022-09-21 131617](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/3/3/3357ff33dd84136dac5cf31d58a194353edd1625.png)

---

<div class="post-metadata">

**Author:** ![javi\_lapina](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/javi_lapina/32/113822_2.png) [@javi\_lapina](https://forum.dynamobim.com/u/javi_lapina)\
**Post date:** [September 21, 2022, 11:47am UTC](https://forum.dynamobim.com/t/how-to-remove-corridor-surface/81259/5 "2022-09-21T11:47:50Z")

</div>

thanks so much, I don’t know python but I will investigate  
good job

---

<div class="post-metadata">

**Author:** ![hosneyalaa](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/hosneyalaa/32/100865_2.png) [@hosneyalaa](https://forum.dynamobim.com/u/hosneyalaa)\
**Post date:** [September 21, 2022, 12:03pm UTC](https://forum.dynamobim.com/t/how-to-remove-corridor-surface/81259/6 "2022-09-21T12:03:09Z")

</div>

look at code from

> [@Python wrapped in custom node returns "Function"](https://forum.dynamobim.com/t/python-wrapped-in-custom-node-returns-function/49607/20):
>
> @Anton_Huizinga @Kulkul @Michael_Kirschner2 Thank you for your help. I think I have something that is working. Here is my final python script. I ended up putting in a check for the corridor surface name input list length. If the length is 1, then I sublist the feature line and link lists. I also followed @Michael_Kirschner2 advice and pulled out the civil node call. I don’t think that was the issue in this case, but I did it as a precaution anyway. I’m just returning the corridor surfac…

```auto
import clr

# Add Assemblies for AutoCAD and Civil 3D APIs
clr.AddReference('acmgd')
clr.AddReference('acdbmgd')
clr.AddReference('accoremgd')
clr.AddReference('AecBaseMgd')
clr.AddReference('AecPropDataMgd')
clr.AddReference('AeccDbMgd')
clr.AddReference('AeccPressurePipesMgd')
clr.AddReference('acdbmgdbrep')
clr.AddReference('System.Windows.Forms')

# Add standard Python references
import sys
sys.path.append('C:\Program Files (x86)\IronPython 2.7\Lib')
import os
import math

# Add references to manage arrays, collections and interact with the user
from System import *
from System.IO import *
from System.Collections.Specialized import *
from System.Windows.Forms import MessageBox

# Create an alias to the Autodesk.AutoCAD.ApplicationServices.Application class
import Autodesk.AutoCAD.ApplicationServices.Application as acapp

# Import references from AutoCAD
from Autodesk.AutoCAD.Runtime import *
from Autodesk.AutoCAD.ApplicationServices import *
from Autodesk.AutoCAD.EditorInput import *
from Autodesk.AutoCAD.DatabaseServices import *
from Autodesk.AutoCAD.Geometry import *

# Import references for Civil 3D
from Autodesk.Civil.ApplicationServices import *
from Autodesk.Civil.DatabaseServices import *

adoc = acapp.DocumentManager.MdiActiveDocument
ed = adoc.Editor
civdoc = CivilApplication.ActiveDocument

def add_featurelines_links(name, fName, lName):
	"""
	This method adds feature lines and links to an existing corridor surface.
	:param Fnames: List of corridor feature lines to add
	:param Lnames: List of corridor links to add
	:return: corridor surface name
	"""
	global adoc
	global ed
	global civdoc

	# Get the active document in the AutoCAD session:
	with adoc.LockDocument():
		with adoc.Database as db:
			with db.TransactionManager.StartTransaction() as t:
				# Get the corridor and corridor surface
				corridorId = civdoc.CorridorCollection[corridorName]
				corridor = t.GetObject(corridorId, OpenMode.ForWrite)
				if len(name) == 1:
					fName = [fName]
					lName = [lName]
				try:
					for n, f, l in zip(name, fName, lName):
						corridorSurface = corridor.CorridorSurfaces[n]

					# Add feature lines and links
						for i in f:
							corridorSurface.AddFeatureLineCode(i)
						for j in l:
							corridorSurface.AddLinkCode(j, True)

					if rebuild:
						corridor.Rebuild()

					t.Commit()
				except Exception() as ex:
					MessageBox.Show(ex.message)

	return corridorSurfaceName
	
corridorName = IN[0]
corridorSurfaceName = IN[1]
fNames = IN[2]
lNames = IN[3]
rebuild = IN[4]

if not isinstance(corridorSurfaceName, list):
	corridorSurfaceName = [corridorSurfaceName]

if not isinstance(fNames, list):
	fNames = [fNames]

if not isinstance(lNames, list):
	lNames = [lNames]

OUT = add_featurelines_links(corridorSurfaceName, fNames, lNames)

```

---

<div class="post-metadata">

**Author:** ![javi\_lapina](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/javi_lapina/32/113822_2.png) [@javi\_lapina](https://forum.dynamobim.com/u/javi_lapina)\
**Post date:** [September 21, 2022, 12:20pm UTC](https://forum.dynamobim.com/t/how-to-remove-corridor-surface/81259/7 "2022-09-21T12:20:51Z")

</div>

thanks, it’s very good for me to start
