Results 1 to 3 of 3

Thread: Add counter to existing command

  1. #1
    Active Member
    Join Date
    2007-08
    Posts
    81
    Login to Give a bone
    0

    Default Add counter to existing command

    Is there a way to add an auto counter to an existing command? The command I have does the following:
    CommandX
    select object
    enter number

    then repeats select object and enter number until you exit command.

    I would like to use the existing command, but enter a number and then the lisp to auto count by 1 from there.
    lisp
    CommandX
    select object
    enter number "n"
    select object
    n+1
    ...

  2. #2
    Certifiable AUGI Addict ccowgill's Avatar
    Join Date
    2004-08
    Location
    Iron Station, NC
    Posts
    3,198
    Login to Give a bone
    0

    Default Re: Add counter to existing command

    Quote Originally Posted by OCD View Post
    Is there a way to add an auto counter to an existing command? The command I have does the following:
    CommandX
    select object
    enter number

    then repeats select object and enter number until you exit command.

    I would like to use the existing command, but enter a number and then the lisp to auto count by 1 from there.
    lisp
    CommandX
    select object
    enter number "n"
    select object
    n+1
    ...
    you would have to undefine the original command, then create a lisp that redefines it, you could use repeat and input the user specified number of times to repeat. If you are trying to increment some number by one, use:
    Code:
    (setq n (1+ n))
    within the repeat or a while loop.

  3. #3
    Certifiable AUGI Addict
    Join Date
    2015-11
    Location
    Jo'burg SA
    Posts
    4,512
    Login to Give a bone
    0

    Default Re: Add counter to existing command

    Are you looking for something like an incrementer? If so try the one in this thread: http://forums.augi.com/showthread.php?t=97069

Similar Threads

  1. Replies: 3
    Last Post: 2014-07-11, 06:53 PM
  2. disable / override existing Revit command
    By Ning Zhou in forum Revit - API
    Replies: 2
    Last Post: 2010-06-23, 07:20 PM
  3. Purge: The existing purge command misses some stuff that could be purged from a file.
    By revit.wishlist1942 in forum Revit Architecture - Wish List
    Replies: 1
    Last Post: 2010-03-12, 12:28 PM
  4. Replies: 0
    Last Post: 2009-06-01, 08:24 PM

Posting Permissions

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