I’m guessing you want
Read this
@anton.opanasenko
Because I’m on vacation I can’t help you well but you need Make a new python script
And add borders through the link
It looks like, it should be the right way, but to be honest, i never did anything in python.
Here’s a Python script for you to try. I did it quickly and did not do extensive testing, so use at your own risk.
IN[0] = surface
IN[1] = boundary elements (e.g. Polylines)
IN[2] = mid-ordinate distance for curves
IN[3] = boundary type as a string, can be “Show”, “Hide”, “Outer”, or “DataClip”
IN[4] = boolean for whether to use non-destructive breaklines or not
import System
import clr
clr.AddReference('AcMgd')
clr.AddReference('AcDbMgd')
clr.AddReference('AeccDbMgd')
from Autodesk.AutoCAD.ApplicationServices import *
from Autodesk.AutoCAD.DatabaseServices import *
from Autodesk.Civil.ApplicationServices import *
from Autodesk.Civil.DatabaseServices import *
from Autodesk.Civil import *
adoc = Application.DocumentManager.MdiActiveDocument
def AddSurfaceBoundaries(surface, boundaries, midOrdinateDistance, boundaryType, useNonDestructiveBreakline):
global adoc
if not isinstance(boundaries, list):
boundaries = [boundaries]
with adoc.LockDocument():
with adoc.Database as db:
with db.TransactionManager.StartTransaction() as t:
surfId = surface.InternalObjectId
surf = surfId.GetObject(OpenMode.ForWrite)
surfBoundaries = surf.BoundariesDefinition
# Create collection of boundary entity IDs
boundaryEntities = ObjectIdCollection()
for object in boundaries:
boundaryEntities.Add(object.InternalObjectId)
# Parse enumeration
boundaryType = System.Enum.Parse(SurfaceBoundaryType, boundaryType)
# Add boundary entities to surface boundary collection
surfBoundaries.AddBoundaries(boundaryEntities, midOrdinateDistance, boundaryType, useNonDestructiveBreakline)
surf.Rebuild()
t.Commit()
pass
return surface
OUT = AddSurfaceBoundaries(IN[0], IN[1], IN[2], IN[3], IN[4])
this option is very useful to me I am new to python & dynamo so kindly help me with How to load this python script.
I have pasted it directly in python script it is not working in my dynamo for civil3d
hi
The problem is in the word I put “Outer”
Could you please upload exp drawing file
no (3)
yes it is working changed 2 to 3 thank you
is there option for volume surface and quantity in dynamo for civil3d
This script works for me, thanks mzjensen for yet another solution. Can you add this to Camber?
I’ll add it to the list. No guarantees on timeline.