Jump to content

Recommended Posts

Posted

Dear all,

i have one lisp which works for assigning numbers ( e.g. 1, 2, 3)

but i want that assigning in NS01, NS02 Format,

 

Can anybody have any clue to edit it

 

plz reply soon

 

lisp is as follow:-

 

(defun c:AssignNumber(/ nnn muksek a nno)

 

(command "undo" "BEgin")

(GeneralAcadTRKSettings)

 

 

(setvar "cmdecho" 0)

(if (= olcek nil)

(load "olcek")

)

(command "DSETTINGS")

(princ "Initial Number

(if (/= do nil)

(princ do)

)

(princ ">:")

(setq nno (getint))

(if (= nno nil)

(terpri)

(setq do nno))

(princ "Number Height

(princ yuksek)

(princ ">:")

(setq muksek (getreal))

(if (= muksek nil)

(terpri)

(setq yuksek muksek))

(setq do (- do 1))

(while

(/= nnn 1000)

(setq do (+ do 1))

(princ"\nNo:")

(princ do)

(setq a (getpoint " Place: NS"))

 

(if (/= a nil)

(progn

(command "text" a yuksek 100 do)

)

(setq nnn 1000)

))

 

(command "undo" "End")

 

(princ)

)

Posted

Something like this?

(setq aString (strcat "NS" (if (<= do 9) "0" "") (itoa do)))
(command "_TEXT" a yuksek 100  aString)

 

Also, please edit your post to add code tags. Thank you.

Posted

thanks both of you interest

 

@Lee Mac.......... I tried that tool, it really has made my work lot more easier, thank a lot

 

@MSasu............I have edited lisp as your suggestion and lisp is now working perfectly for me....thanks a lot

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...