+ Reply to Thread
Results 1 to 4 of 4
  1. #1
    Forum Newbie
    Using
    AutoCAD 2007
    Join Date
    Aug 2009
    Posts
    2

    Default Problem with a script

    Registered forum members do not see this ad.

    Hello I am a new user of Autocad and now have a problem with the script. This is my script

    (command "._insert" "myblock=myblock.dwg" nil)
    save

    this command will update the existing block in the drawing with the block that is saved in DWG.
    the problem is when I run this script. The save command doesnot execute. Actually It stop after"(command "._insert" "myblock=myblock.dwg" nil) " this command. Anybody here know what is the reason?
    Thank you in advanced






    K0781

  2. #2
    Forum Deity NBC's Avatar
    Using
    AutoCAD 2009
    Join Date
    Aug 2007
    Location
    Manchester, UK
    Posts
    2,109

    Default

    look at how you are using the command to insert your block. you will need to follow a similar syntax in order to perform the command save e.g.
    (command "qsave")
    Life's constantly changing - keep up or get left behind

  3. #3
    Forum Newbie
    Using
    AutoCAD 2007
    Join Date
    Aug 2009
    Posts
    2

    Default

    Thank you for your answer NBC. I changed my script to
    (command "._insert" "myblock=myblock.dwg" nil)
    (command "qsave")
    however It also doesnot work. are there another way to write the script?

  4. #4
    Luminous Being
    Using
    Civil 3D 2013
    Join Date
    Dec 2005
    Location
    GEELONG AUSTRALIA
    Posts
    5,228

    Default

    Registered forum members do not see this ad.

    if your running it as a script you dont need command thats lisp.

    ._insert myblock=myblock.dwg
    qsave

    You need to pay attention to end of lines in a script you need extra spaces to equal "Enter" presses I add blank lines (nothing in them !!!) to give an Enter answer two spaces in between commands can be where you need say press Enter twice.

    ._insert myblock=myblock.dwg

    qsave

    or

    ._insert
    myblock=myblock.dwg

    qsave

    You need sometimes to write down every key press or whats typed, its like evrything practice makes perfect.

Similar Threads

  1. Script
    By mapman1 in forum Civil 3D & LDD
    Replies: 3
    Last Post: 5th Jun 2009, 02:35 pm
  2. Script problem
    By feargt in forum AutoCAD General
    Replies: 8
    Last Post: 31st Mar 2009, 12:18 pm
  3. Script problem
    By Rooster in forum AutoCAD General
    Replies: 8
    Last Post: 2nd May 2008, 06:39 pm
  4. Sub script and Super script Text
    By edwin in forum AutoCAD Beginners' Area
    Replies: 2
    Last Post: 1st Aug 2007, 08:07 pm
  5. funny problem about command "section" in a script
    By phymilton in forum AutoLISP, Visual LISP & DCL
    Replies: 4
    Last Post: 18th Jan 2006, 03:36 am

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