Converting 2D Drawings to 3D

I have a number of 2D Autocad Topographical Survey Drawings that require converting into 3D so that they can be imported into a Ground Modelling Package and enable cut/fill calculations to be carried out.

In order to speed up this exercise I am looking for an Autolisp routine that will move "Spot Heights" on the survey drawings to their correct Z value without having to re-type the value.

Is it possible to do this with Autolisp ?

Each "Spot Height" consists of a point (or simple block) and a short piece of text giving the value of the spot height. Ideally the lisp routine would allow selection of each point (or block) together with the text, and then move them both to the Z value depicted by the text. The X and Y values of the point (or block) and the text should remain unchanged.

Any help would be appreciated.

Reply to
Richard Whiteley
Loading thread data ...

I had something like that, Richard. I'll see if I can find it. If not, I can probably whip something up for you, though you will likely have to select each block and it's corresponding text.

Reply to

Quick and dirty version. Tested good for both TEXT and MTEXT lables, on


I'd suggest rotating your viewpoint to make it easy to see what's been changed.

(defun C:FIXSPOT ( / eslb blk eslt txt zc ) (while (not (setq eslb (entsel "\nSelect block: ")))) (setq blk (car eslb)) (while (not (setq eslt (entsel "\nSelect label: ")))) (setq txt (car eslt) zc (cdr (assoc 1 (entget txt))) );setq (princ (strcat "\nElevation: " zc)) (command ".CHANGE" blk txt "" "P" "E" zc "") (princ) );defun

Reply to

PolyTech Forum website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.