Results 1 to 5 of 5

Thread: AutoLISP command causes script to stop...

  1. #1
    100 Club FWSchreck's Avatar
    Join Date
    2000-12
    Posts
    177
    Login to Give a bone
    0

    Post AutoLISP command causes script to stop...

    Hello:

    I've got a large group of drawing files that contain a block definition that needs updating. I've written an AutoLISP routine to update the block definition from a disk file. This file works correctly from the command line. Here's the AutoLISP code to update the block definition:
    Code:
    (defun C:BLOCKUPDATE ( )
         ((progn (command "._insert" "blockname=c:/path/blockname" "_Y")(command))
    );defun
    The trouble is, when I use this AutoLISP command in a script, the script stops after the first drawing. Here's the a sample script:

    OPEN DrawingFile1 BLOCKUPDATE QSAVE CLOSE
    OPEN DrawingFile2 BLOCKUPDATE QSAVE CLOSE
    OPEN DrawingFile3 BLOCKUPDATE QSAVE CLOSE
    ...

    Any ideas on how to keep the script from bombing out?

    Thanks,
    Last edited by Opie; 2007-01-17 at 11:15 PM. Reason: [CODE] tags added

  2. #2
    Administrator Opie's Avatar
    Join Date
    2002-01
    Location
    jUSt Here (a lot)
    Posts
    9,103
    Login to Give a bone
    0

    Default Re: AutoLISP command causes script to stop...

    It currently has an extra open parenthesis.
    Code:
    ((progn
    If you have a technical question, please find the appropriate forum and ask it there.
    You will get a quicker response from your fellow AUGI members than if you sent it to me via a PM or email.
    jUSt

  3. #3
    AUGI Addict kennet.sjoberg's Avatar
    Join Date
    2002-05
    Posts
    1,707
    Login to Give a bone
    0

    Default Re: AutoLISP command causes script to stop...

    OPEN and CLOSE is tricky to use nowadays

    search and find the solution in this forum. . . it is here somewhere

    : ) Happy Computing !

    kennet

  4. #4
    I could stop if I wanted to
    Join Date
    2006-04
    Posts
    466
    Login to Give a bone
    0

    Default Re: AutoLISP command causes script to stop...

    I think you should exclude CLOSE

  5. #5
    Login to Give a bone
    0

    Default Re: AutoLISP command causes script to stop...

    Try this with only one drawing open, and that's not the first DrawingFile1 of the script.

    QSAVE
    FILEOPEN DrawingFile1 BLOCKUPDATE QSAVE
    FILEOPEN DrawingFile2 BLOCKUPDATE QSAVE
    FILEOPEN DrawingFile3 BLOCKUPDATE QSAVE

    Note: Regarding Path and Filenames that can contain spaces, it is important to enclose the Path and Filenames within quotes. i.e. “D:\Customer Drawings\Acme Robots\R2-D2.dwg”
    This way your Script, or other applications such as Startapp or Shell commands, will interpret the Path and Filename as one item to evaluate.
    Last edited by Terry Cadd; 2007-01-21 at 02:25 AM.

Similar Threads

  1. Stop Autodave during command
    By Wish List System in forum AutoCAD Wish List
    Replies: 9
    Last Post: 2012-06-26, 05:04 PM
  2. Block command in an AutoLISP script.
    By identity4 in forum AutoLISP
    Replies: 3
    Last Post: 2012-05-22, 04:48 AM
  3. cancel or escape command in a script or menu command?!
    By jcooke96119 in forum AutoCAD Customization
    Replies: 7
    Last Post: 2007-10-31, 01:28 PM
  4. I want to stop BEDIT command
    By rajat_bapi_mallick in forum AutoCAD General
    Replies: 1
    Last Post: 2007-10-12, 05:34 AM
  5. Dimension style text color not updating after AutoLisp script
    By thomas.glasgow in forum AutoCAD General
    Replies: 12
    Last Post: 2007-07-17, 10:28 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
  •