Cristallo
Guest
I made a chaplaint: I need to get a rough dtm, starting from polylines of level curves that are all at altitude z 0,00. one by one I brought them to the elevation they should have, except to realize that the starting design was scale 1:2000, while my elevations I put them all to 100.At this point I should scale all the elevations of the 100/2000 ratio.
I wrote an ad hoc lisp
Code:
(defun c: elevscale ()
(princ "\nselezionare polilinee:")
(setq entit (ssget '(0 . "polyline")))))
(setq number (sslength entit))
(setq scalaxy (getreal "\nscala di disegno lungo x-y: "))
(setq scalaz (getreal "\nscala di disegno lungo z: "))
(setq rapporto (/ scalaz scalaxy))
(setq count 0)
(repeat number
(setq emod (ssname entit count))
(setq elev (asc '38 (enget emod))))
(setq act-elev (cdr (assoc '38))))
(setq new-elev (* act-elev rapporto))
(setq el-nw (cons '38 new-elev)))
(setq emodif (subst el-nw elev))
(setq modi (cdr))
(entupd mod)
(setq count (+ count 1)
);;chiusura repeat
);;chiusura defun
Is there any saint who tells me where I'm wrong?