station numbering lisp routine??

Discussion in 'AutoCAD' started by cbaxley2003, Dec 28, 2004.

  1. cbaxley2003

    cbaxley2003 Guest

    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
     
    cbaxley2003, Dec 28, 2004
    #1
  2. cbaxley2003

    Fatty Guest

    (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)
     
    Fatty, Dec 28, 2004
    #2
  3. cbaxley2003

    cbaxley2003 Guest

    Sorry, but I dont have enough experience with lisp to get this to work.
     
    cbaxley2003, Dec 28, 2004
    #3
  4. cbaxley2003

    cbaxley2003 Guest

    Thanks. Didnt know that 2004 had a text numbering command.....
     
    cbaxley2003, Dec 28, 2004
    #4
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.