+ Reply to Thread
Results 1 to 2 of 2
  1. #1
    Forum Newbie
    Using
    not specified
    Join Date
    Dec 2005
    Posts
    2

    Default Autolisp that Counts from 001

    Registered forum members do not see this ad.

    I am writing a lisp routine that counts up, but i need the routine to count from "001" not "1", any ideas?

  2. #2
    Super Member David Bethel's Avatar
    Discipline
    Multi-disciplinary
    David Bethel's Discipline Details
    Discipline
    Multi-disciplinary
    Details
    Commercial Food Service
    Using
    AutoCAD pre 2000
    Join Date
    Dec 2003
    Location
    Newport News, Virginia
    Posts
    1,926

    Default

    Registered forum members do not see this ad.

    Code:
      (setq i "10")
      &#40;setq i &#40;cond &#40;&#40;< &#40;atoi i&#41; 10&#41;  &#40;strcat "00" i&#41;&#41;
                    &#40;&#40;< &#40;atoi i&#41; 100&#41; &#40;strcat "0" i&#41;&#41;
                    &#40;T i&#41;&#41;&#41;

    This doesn't take into account for negative numbers. -David
    R12 (Dos) - A2K

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts