station numbering lisp routine??
CADForums.net Forum Index CADForums.net
Discussion of AutoCAD and other CAD software.
 
 FAQFAQ   MemberlistMemberlist     RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Google
 
Web cadforums.net
station numbering lisp routine??

 
Post new topic   Reply to topic    CADForums.net Forum Index -> Customization
Author Message
cbaxley2003
Guest





Posted: Wed Dec 29, 2004 2:15 am    Post subject: station numbering lisp routine?? Reply with quote

I have to station (number in increments of 100) polylines quite often. I would be EXTREMELY helpful if I could get it to do this automatically. Right now I have been creating a block and using measure command on a polyline to do this, then going back and editing text. Is it possible to do this? It doesnt have to be this way, but an example of the format is: 1+00, 2+00, 3+00, etc., in 100' increments. I do have a routine that will put the + in.

Thanks in advance

Back to top
Fatty
Guest





Posted: Wed Dec 29, 2004 2:41 am    Post subject: Re: station numbering lisp routine?? Reply with quote

(setq lst '(1 2 3 4 5 6 ... 100))
(setq str (apply 'strcat (mapcar (function (lambda (x)
(strcat (itoa x)"+00,"))) lst)))
; Return string: "1+00,2+00,3+00,4+00,5+00,6+00,....100+00"
(setq new_list (read (strcat "(" str ")")))
; Return list:(1+00,2+00,3+00,4+00,5+00,6+00,....100+00)
Back to top
cbaxley2003
Guest





Posted: Wed Dec 29, 2004 2:49 am    Post subject: Re: station numbering lisp routine?? Reply with quote

Sorry, but I dont have enough experience with lisp to get this to work.

Back to top
cbaxley2003
Guest





Posted: Wed Dec 29, 2004 3:10 am    Post subject: Re: station numbering lisp routine?? Reply with quote

Thanks. Didnt know that 2004 had a text numbering command.....
Back to top
 
Post new topic   Reply to topic    CADForums.net Forum Index -> Customization All times are GMT
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum




Windows Server DSP VoIP Electronics New Topics
Powered by phpBB