Anuncios

The Autodesk Community Forums has a new look. Read more about what's changed on the Community Announcements board.

Editing a number

Anonymous

Editing a number

Anonymous
No aplicable

I have about 500 spot elevations on a drainage plan and need to subtract 1.55 from each elevation. Can this be done globally or I am stuck editing each one by hand? HELP

0 Me gusta
Responder
624 Vistas
6 Respuestas
Respuestas (6)

rkmcswain
Mentor
Mentor
What are these 'elevations'? Attributes? Text? Mtext?



R.K. McSwain     | CADpanacea | on twitter
0 Me gusta

Jay_B
Mentor
Mentor

If they have a Z value & all points need to move by -1.55, then the MOVE command will work.

 

Command: MOVE > Select Objects > specify base point > 0,0,0 > Enter > specify second point > 0,0,-1.55 > Enter.

 

C3D 2018.1
C3D 2016 SP4

Win 7 Professional 64 Bit
0 Me gusta

Anonymous
No aplicable
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
0 Me gusta

Jay_B
Mentor
Mentor

Can you post the dwg here?

C3D 2018.1
C3D 2016 SP4

Win 7 Professional 64 Bit
0 Me gusta

3wood
Advisor
Advisor

You can try ALTEXT and get your task done with only a few clicks.

Settings as below:

altext.JPG

 

 

0 Me gusta

rkmcswain
Mentor
Mentor
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

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.

 

R.K. McSwain     | CADpanacea | on twitter
0 Me gusta