01-21-2016
04:29 AM
- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Denunciar
01-21-2016
04:29 AM
communitysciences wrote:
The elevations are text. I do not need to move them i need to minus out 1.55 from each. For example if the elevation is 10.6 it will change to 9.05
The elevations are text. I do not need to move them i need to minus out 1.55 from each. For example if the elevation is 10.6 it will change to 9.05
Give this a shot.
;;;
(defun c:addval ( / inc ss ent obj str num i)
(setq inc (getreal "\n Enter increment: "))
(setq ss (ssget '((0 . "MTEXT,TEXT"))) i 0)
(repeat (sslength ss)
(setq ent (ssname ss i))
(setq obj (vlax-ename->vla-object ent))
(setq str (vla-get-TextString obj))
(setq num (distof str))
(vla-put-TextString obj (rtos (+ num inc) 2 2))
(setq i (1+ i))
)
(princ)
)
;;;
It will accept a negative value for the increment.
If you are not sure what to do with lisp code, see this.