See the top rated post in this thread. Click here

Results 1 to 3 of 3

Thread: Idea for Lisp Routine

  1. #1
    Certifiable AUGI Addict robert.1.hall72202's Avatar
    Join Date
    2004-07
    Location
    Detroit Michigan
    Posts
    2,508
    Login to Give a bone
    0

    Default Idea for Lisp Routine

    Im wondering if somebody can create lisp for the following
    (Im still a newbie with lisp):

    Often I need to create pictures that can be used on
    inspection documentation. What I need to do is change the
    dimensions of a part to read dim 1, dim 2, dim 3, etc.
    Would it be possible to create a lisp routine where you could
    pick the dimensions one at a time and end up changing them
    in this fashion? The first dim that gets picked changes to Dim 1,
    the second picked changes to Dim 2, and continues until the
    command is canceled........it could be written to only create
    up to Dim 10, but can be stopped at any time. I rarely use
    more than 10 dimensions, imagine being the inspector :-p

  2. #2
    I could stop if I wanted to tyshofner's Avatar
    Join Date
    2004-03
    Location
    Dallas, Tx
    Posts
    229
    Login to Give a bone
    1

    Default Re: Idea for Lisp Routine

    This will do it, enjoy!
    Code:
    (defun C:DIMNUMBER ( / dim_cnt ent elist)
    (initget 1)
    (setq dim_cnt (getint "\nSpecify starting number: "))
    (while (setq ent (car (entsel "\nSelect dimension to change: ")))
    	(setq elist (entget ent))
    	(setq elist (subst (cons 1 (strcat "DIM " (itoa dim_cnt))) (assoc 1 elist) elist))
    	(entmod elist)
    	(entupd ent)
    	(setq dim_cnt (1+ dim_cnt))
    )
    (princ)
    )
    Ty

  3. #3
    Certifiable AUGI Addict robert.1.hall72202's Avatar
    Join Date
    2004-07
    Location
    Detroit Michigan
    Posts
    2,508
    Login to Give a bone
    0

    Default Re: Idea for Lisp Routine

    Sweet, thanks for hooking me up......a few other people might benefit from this one as well. I think sometimes its tough enough just to think of ideas for lisp routines.

Similar Threads

  1. Wishlist - Got an idea for a new function for LISP?
    By peter in forum Bridging the Gap: LISP -> .NET -> LISP
    Replies: 6
    Last Post: 2014-01-30, 02:39 PM
  2. Need help making a triangle lisp and have no idea.
    By lukasz.sosnowski391019 in forum AutoLISP
    Replies: 6
    Last Post: 2013-06-17, 08:30 PM
  3. file creation lisp idea
    By LSElite in forum AutoLISP
    Replies: 7
    Last Post: 2013-01-17, 11:20 PM
  4. Help with a lisp routine to add a 12" line to this routine
    By Orbytal.edge341183 in forum AutoLISP
    Replies: 3
    Last Post: 2012-11-14, 10:33 PM
  5. Good idea for lisp routine
    By robert.1.hall72202 in forum AutoLISP
    Replies: 4
    Last Post: 2005-02-14, 03:20 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
  •