Jump to content

create automatic level in metric


Sathya narayanan

Recommended Posts

Can any body convert the below lisp which is in decimal feet system format which i require to be in metric system...?  

The below lisp works for Imperial cad template file well, but I require to function in a Metric template.

 

I want a lisp to convert an elevation text (ex: El. 245.00) to El. 255.00 when I apply this command and move a relative distance of 10 m....? Hope I explained clearly...

 

this would be very useful to me...

 

(Defun c:BT()
  (Setq sst(ssget)
    sset(ssget "p" '((0 . "text")))
    tv (cdr(Assoc 1 (Entget(ssname sset 0)))))
  (command "move" sst "" "@" "@")
  (setq lset (ssget "p" '((0 . "line"))))
    (Setq st 1)
  (while (= 0.0 (ATOF (substr tv st 1)))
    (Setq st (+ 1 st)))
  (Setq et 1)
  (while (/=  "\""  (substr tv et 1))
    (Setq et (+ 1 et)))
  (setq str(distof (substr tv st
            (- et st))))
  (command "copy" sset "" (setq a (getpoint "\n Specify the source point: "))
       (Setq b(getpoint "\n Specify the Desitnation point: " a)))
(if (< (- (cadr a )(cadr b)) 0)
  (command "change" (entlast) "" "" "" "" "" "" (strcat "EL. "(rtos (+ str (- (cadr B )(cadr A)))4 2)""))
  (command "change" (entlast) "" "" "" "" "" "" (strcat "EL. "(rtos (+ str (- (cadr B )(cadr A)))4 2)"")))
  (command "Copy" lset "" a b)
  )
 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...