@pbejse wrote:
@ВeekeeCZ wrote:
Simple version to start with... if you have any questions just ask.
(defun c:CopyAltimetric (/ e l y b d p)
...
(setq l (entlast))
...
(while (setq l (entnext l))
...
(princ)
)
Nice idea. 👍
Thanks, @pbejse
Actually, I like yours for changing the values each step... but the ESC exit?! Grrrrrrrrrr!
(defun c:CopyAltimetric (/ e b d p)
(if (and (setq e (car (entsel "\nSelect 'Altimetric' block: ")))
(setq b (getpropertyvalue e "ALT"))
(setq d (getvar 'dimzin))
(setvar 'dimzin 4)
)
(while (progn
(setq p (cdr (assoc 10 (entget e))))
(initcommandversion)
(command "._copy" e "" "_non" p "_non" p)
(entdel (entlast))
(command pause)
(if (> (getvar 'cmdactive) 0)
(not (command ""))))
(setpropertyvalue (setq e (entlast)) "ALT" (setq b (rtos (/ (+ (* (atof b) 1000) (- (caddr (assoc 10 (entget e))) (cadr p))) 1000) 2 3)))))
(if d (setvar 'dimzin d))
(princ)
)
Unfortunately, this way is impossible to retrieve the LASTPOINT sysvar, so no other way around than use the insertion point. I like it better this way anyway. 😎