Hi.
I need to convert a bunch of spot elevations in a survey from english to metric. Does anybody have a quick lisp routine or other command that might do this?
Thanks,
Matthew Kuehl
Hi.
I need to convert a bunch of spot elevations in a survey from english to metric. Does anybody have a quick lisp routine or other command that might do this?
Thanks,
Matthew Kuehl
Wow! Check out what I found...
********TeXt Math********
(defun c:txm ( / texts func xx n text textentget textent oldtext textreal result
newtext)
(princ "\nSelect texts you want to operate mathematically upon:")
(setq texts (ssget))
(princ "\nWhat function do you wish to
apply<Add,Subtract,Multiply,Divide,sQuare,Root>?")
(setq func (strcase (getstring)))
(cond
((= func "A")
(princ "\nAdd what number:")
(setq xx (getreal))
)
((= func "S")
(princ "\nSubtract what number:")
(setq xx (getreal))
)
((= func "M")
(princ "\nMultiply by what number:")
(setq xx (getreal))
)
((= func "D")
(princ "\nDivide by what number:")
(setq xx (getreal))
)
)
(setq n 0)
(while
(setq text (ssname texts n))
(setq textentget (entget text))
(setq textent (assoc 1 textentget))
(setq oldtext (cdr textent))
(setq textreal (atof oldtext))
(cond
((= func "A")
(setq result (+ textreal xx))
)
((= func "S")
(setq result (- textreal xx))
)
((= func "M")
(setq result (* textreal xx))
)
((= func "D")
(setq result (/ textreal xx))
)
((= func "Q")
(setq result (* textreal textreal))
)
((= func "R")
(setq result (sqrt textreal))
)
)
(setq newtext (rtos result 2 3))
(setq textentget (subst (cons 1 newtext) textent textentget))
(entmod textentget)
(setq n (1+ n))
)
(princ)
)
;********TeXt Math********
Enjoy!
Matthew Kuehl
What does that have to do with metric conversion?
Matthew Kuehl <nospam@address.withheld> wrote in message
news:13829825.1100020357517.JavaMail.jive@jiveforu m1.autodesk.com...
Wow! Check out what I found...
********TeXt Math********
(defun c:txm ( / texts func xx n text textentget textent oldtext textreal
result
newtext)
(princ "\nSelect texts you want to operate mathematically upon:")
(setq texts (ssget))
(princ "\nWhat function do you wish to
apply<Add,Subtract,Multiply,Divide,sQuare,Root>?")
(setq func (strcase (getstring)))
(cond
((= func "A")
(princ "\nAdd what number:")
(setq xx (getreal))
)
((= func "S")
(princ "\nSubtract what number:")
(setq xx (getreal))
)
((= func "M")
(princ "\nMultiply by what number:")
(setq xx (getreal))
)
((= func "D")
(princ "\nDivide by what number:")
(setq xx (getreal))
)
)
(setq n 0)
(while
(setq text (ssname texts n))
(setq textentget (entget text))
(setq textent (assoc 1 textentget))
(setq oldtext (cdr textent))
(setq textreal (atof oldtext))
(cond
((= func "A")
(setq result (+ textreal xx))
)
((= func "S")
(setq result (- textreal xx))
)
((= func "M")
(setq result (* textreal xx))
)
((= func "D")
(setq result (/ textreal xx))
)
((= func "Q")
(setq result (* textreal textreal))
)
((= func "R")
(setq result (sqrt textreal))
)
)
(setq newtext (rtos result 2 3))
(setq textentget (subst (cons 1 newtext) textent textentget))
(entmod textentget)
(setq n (1+ n))
)
(princ)
)
;********TeXt Math********
Enjoy!
Matthew Kuehl
The elevations are probably in whole feet, so it's a simple mathematical conversion for him.
Jerry wrote:
What does that have to do with metric conversion?
Matthew Kuehl <nospam@address.withheld> wrote in message
news:13829825.1100020357517.JavaMail.jive@jiveforu m1.autodesk.com...
Wow! Check out what I found...
Actually, it turns out that one doesn't work so well. Any other ideas? Thanks,
Matt
What format are your spot elevations in? Is it a 2D CAD file? Are they
survey points in a txt or CSV format? If they are in 3D CAD, all you would
have to do is scale them.
If you have Land Desktop, export your points. Bring them into Excel, insert
columns between the northings, eastings and elevations. Multiply the
northings, eastings and elevations by the conversion factor in the new
columns, and then save them back as a txt or csv. Close the file and then
reopen so that you are working with the saved txt or csv. Delete the
English value columns. Save again as a txt or csv file. Erase all the
points you have modified from your original Land Desktop file. Import the
updated points.
--
Brad Yarger
"Matthew Kuehl" <nospam@address.withheld> wrote in message
news:10907629.1100019051509.JavaMail.jive@jiveforu m1.autodesk.com...
do this?Hi.
I need to convert a bunch of spot elevations in a survey from english to
metric. Does anybody have a quick lisp routine or other command that might
Thanks,
Matthew Kuehl
Search the help for cvunit. It may help.
JOB: Bilingual (English/Mandarin) AutoCAD Drawer, Queens, NY
how do you change a drawing from metric to English
Metric Piping