Wipeout from Polyline

I already created a few polylines in Dynamo but I need to create wipeouts from those polylines.
Is there a way to create a Wipeouts from a Polyline in Civil 3D with Dynamo?

Data that the node could ask:
Layer?
delete the polyline?

1 Like

Anyone who know what I’m asking for?
Please help me with some guide.

I do not think there is a directt way to acomplish your aim.
Since there is no polyline in CAD, you may need first to import Dynamo polyline into CAD (without curve segment). then call CAD command to convert the imported polygon into wipeout.

An alternative solution is to calculate the wipeout vertice in dynamo, then call an AutoLISP function to directly make a wipeout from the vertices.
Following is the lisp code to create wipeout from vertices for your reference:
(Defun ENTMAKE-WIPEOUT (ptx / _Kernel)
(Defun _Kernel (VTX / CEN D10 D14 DST NOR P)
(setq nor '(0 0 1)
D10 (list (apply 'min (mapcar 'car VTX))
(apply 'min (mapcar 'cadr VTX))
(caddar VTX)
)
DST (float
(apply 'max
(mapcar '- (apply 'mapcar (cons 'max VTX)) D10)
)
)
cen (mapcar '+ D10 (list (/ DST 2) (/ DST 2) 0.))
D14 (mapcar
(function
(lambda (p)
(mapcar '/ (mapcar '- p cen) (list DST (- DST) 1.))
)
)
VTX
)
D14 (reverse (cons (car D14) (reverse D14)))
)
(append (list (cons 10 (trans D10 nor 0))
(cons 11 (trans (list DST 0. 0.) nor 0))
(cons 12 (trans (list 0. DST 0.) nor 0))
(list 13 1. 1. 0.)
(cons 70 7)
(cons 280 1)
(cons 71 2)
(cons 91 (length D14))
)
(mapcar (function (lambda (p) (cons 14 p))) D14)
)
)
(or (member “acismui.arx” (arx))
(arxload “acismui.arx”)
)
(if (entmake
(append (list (cons 0 “WIPEOUT”)
(cons 100 “AcDbEntity”)
(cons 100 “AcDbWipeout”)
(cons 90 0)
(cons 62 “Wipeout LayerName here”)
)
(_Kernel ptx)
)
)
(entlast)
)
)

1 Like

Thanks @Koz_Jono_Yeoh,

I already created those closed polylines whitout curves in Dynamo and import it into Autocad Civil 3D, the next step could be convert those polylines into wipeouts, but with the same script in Dynamo, is there a way to call your LISP with Dynamo?

If I have a list of points and I want to create a wipeout from those list of points, how can I write that comand in your node @mzjensen?

Could you give me some tips?

Best to start a new topic as this is adjacent but not the same.

Likely send command isn’t the best path forward for your task.

2 Likes

For other readers, this is referring to the Document.SendCommand node in the Camber package.

@henrybajana in theory this should be possible, but I would not recommend going this route. I would instead use a Python node and work with the AutoCAD API. Here’s the relevant documentation.

2 Likes