See the top rated post in this thread. Click here

Page 2 of 8 FirstFirst 123456 ... LastLast
Results 11 to 20 of 72

Thread: Auto number attribute lisp fix

  1. #11
    I could stop if I wanted to CadDog's Avatar
    Join Date
    2005-06
    Location
    So Ca
    Posts
    439
    Login to Give a bone
    0

    Default Re: Auto number attribute lisp fix

    Quote Originally Posted by oliver_bucog View Post
    Code:
    Command:
    Command: appload
    Increment.lsp successfully loaded.
    
    
    Command:
    Command:
    Command: increment
    *Cancel*
    
    Command: appload
    Increment.lsp successfully loaded.
    Increment.lsp successfully loaded.
    
    
    Command:
    Command:
    Command:
    Command: increment
    *Cancel*
    
    Command: increment
    *Cancel*
    both files had been save on one folder.

    oliver
    Make sure the directory is in the search path in AutoCAD
    that way it knows where to go to find the dcl file.

  2. #12
    Member
    Join Date
    2009-01
    Posts
    47
    Login to Give a bone
    0

    Default Re: Auto number attribute lisp fix

    Great lisp:

    I get this when hitting cancel in dialog box:

    Code:
    Increment ; User warning: assignment to protected symbol: QUIT <- 1

  3. #13
    Member
    Join Date
    2009-01
    Posts
    47
    Login to Give a bone
    0

    Default Re: Auto number attribute lisp fix

    Hmm .. I restarted CAd and now I dont .. I only get the warning when VLIDe open

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

    Default Re: Auto number attribute lisp fix

    Quote Originally Posted by artur.u-s View Post
    Hmm .. I restarted CAd and now I dont .. I only get the warning when VLIDe open
    In VLIDE, go to Tools --> Environment Options ... --> General Options. Then under the General tab, select either Transparent / Print message in the SETQ to protected symbols group. OK, and then Tools --> Save Settings.

    It's not going to do anything bad, it's simply because I used a local variable called quit (which I shouldn't as it's already a standard function name). But due to it being declared locally the LISP only "overrides" the quit function inside the Increment command. If you don't want to have this shown at all, open the LISP in VLIDE. Move the cursor to the very beginning (Ctrl+Home), then do a search & replace (Ctrl+H). Type quit in Find what and stop in Replace with, click Replace All, OK. Press Ctrl+S (for save) and Ctrl+Alt+E (load into AutoCAD).
    Last edited by irneb; 2009-05-08 at 08:53 PM. Reason: Added explanation of fix

  5. #15
    The Silent Type RobertB's Avatar
    Join Date
    2000-01
    Location
    Seattle WA USA
    Posts
    5,859
    Login to Give a bone
    0

    Default Re: Auto number attribute lisp fix

    Quote Originally Posted by artur.u-s View Post
    Great lisp:

    I get this when hitting cancel in dialog box:

    Code:
    Increment ; User warning: assignment to protected symbol: QUIT <- 1
    My guess, without looking at the code, is that the code is doing a bad thing: redefining the AutoLISP quit function as its own variable or function.

    Naughty programmer.
    R. Robert Bell
    Design Technology Manager
    Stantec
    Opinions expressed are mine alone and do not reflect the views of Stantec.

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

    Default Re: Auto number attribute lisp fix

    OK, sorry guys ... consider myself wrapped over the knuckles . Here's the fixed code which doesn't use the quit as a local variable.
    Attached Files Attached Files

  7. #17
    Login to Give a bone
    0

    Default Re: Auto number attribute lisp fix

    Great lisp, I tried this but it generates "Giant" numbers. I am using 2009 with annotative blocks and text.
    regards
    Shaun

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

    Default Re: Auto number attribute lisp fix

    Wlcome to AUGI & congrats on your 1st post.

    Could you please give some more info? Maybe a sample of the block in question? AFAIK you should be able to set the start value. See attached screen capture.
    Attached Images Attached Images

  9. #19
    AUGI Addict
    Join Date
    2008-02
    Posts
    1,141
    Login to Give a bone
    0

    Default Re: Auto number attribute lisp fix

    Quote Originally Posted by shaun.farrell.153759 View Post
    Great lisp, I tried this but it generates "Giant" numbers. I am using 2009 with annotative blocks and text.
    regards
    Shaun
    that's why i stopped using entmod on text and attributes. vla won't do that.

  10. #20
    Woo! Hoo! my 1st post
    Join Date
    2010-05
    Posts
    1
    Login to Give a bone
    0

    Default Re: Auto number attribute lisp fix

    I tried this .... it works pretty well. I just set my "support files" path to point to the DCL file and placed the lsp in my lisp location. Thanks for posting this, big time saver.

Page 2 of 8 FirstFirst 123456 ... LastLast

Similar Threads

  1. Auto Number in AutoCAD
    By congnvc370652 in forum Dot Net API
    Replies: 0
    Last Post: 2014-10-11, 09:06 AM
  2. 2011: Express Tools Auto Number - Skips Number in Multi-line Mtext
    By stusic in forum AutoCAD General
    Replies: 3
    Last Post: 2013-01-29, 02:38 PM
  3. Auto-Number with Grids
    By simon.perkins in forum AutoLISP
    Replies: 3
    Last Post: 2009-08-18, 10:48 AM
  4. auto number title blocks
    By lee.johnson in forum AutoLISP
    Replies: 5
    Last Post: 2009-04-20, 02:50 PM
  5. Auto Re-Number Door/Window Tag V9.0
    By Firmso in forum Revit Architecture - General
    Replies: 3
    Last Post: 2007-04-18, 04:05 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
  •