Jump to content

Problem with a script


kong0781

Recommended Posts

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

Link to comment
Share on other sites

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")

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...