Function Syntax: 3DF2PL Version: 1.0 Date: 20.06.2026 2:44:37PM https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/3d-face-to-polylines-macro/td-p/7585662 short_description: 🚀 3DF_to_3DPoly is an AutoCAD and Civil 3D AutoLISP utility that converts selected 3DFACE entities into closed 3D polylines while preserving vertex elevations. The main benefit is faster CAD cleanup, easier 3D geometry editing, and better Civil 3D production preparation. command: 🧰 Load the LISP with APPLOAD or (load "3DF_to_3DPoly.lsp"). 🚀 Run 3df2pl to start the conversion command. 📌 Select one or more 3DFACE objects from the active drawing. 🧩 The routine creates a closed 3DPOLY using DXF vertex codes 10, 11, 12, and 13. description: 📘 This AutoLISP program converts AutoCAD 3DFACE geometry into normal closed 3D Polyline objects. 🔍 The user runs the command, selects the faces, and the tool reads the original vertex coordinates directly from the entity data. 📐 Each source face is recreated as a closed 3D polyline, making the geometry easier to edit, inspect, export, or reuse in Civil 3D workflows. Because the source X, Y, and Z points are reused, the generated 3D polylines retain the elevation information from the original faces. helper_function: 🚀 Command entry point - c:3df2pl defines the main AutoCAD command. 🔍 Selection filter - ssget limits selection to 3DFACE objects. 📐 DXF vertex extraction - entget reads entity data and LI_item extracts vertex codes 10, 11, 12, and 13. 🧩 3D polyline creation - the command ._3dpoly creates the converted geometry and _Close closes the boundary. 🔒 System variable restoration - CMDECHO and OSMODE are restored through the local error handler. 🧹 Civil 3D-safe header - the LISP includes guarded Visual LISP COM loading and safer command behavior notes. functionalities: 🚀 Convert 3DFACE to 3D Polyline - turns selected face entities into editable closed 3D polylines. 📐 Preserve elevations - keeps the original Z values from the source vertices. 🔍 Batch selection - converts multiple 3DFACE objects in one command run. 🧩 Closed geometry output - automatically closes each generated 3D polyline. 🧠 Direct entity data workflow - uses DXF data instead of manual point picking. 📘 Civil 3D cleanup support - helps prepare legacy DWG geometry for production drafting and terrain-related workflows. result: ✅ The final result is a lightweight AutoCAD and Civil 3D conversion tool that produces closed 3D polylines from selected 3DFACE entities. It reduces manual tracing, improves 3D drawing cleanup, and makes legacy face-based geometry easier to manage in CAD production. additional_info: 📌 The routine converts only 3DFACE entities and does not create Civil 3D surfaces, feature lines, alignments, corridors, or section views. 🔴 Triangular faces with repeated vertices may create a closed 3D polyline with overlapping points. 🔐 The command saves and restores CMDECHO and OSMODE for safer drafting behavior.