Jump to content

script problem autocad 2015


tomhoban

Recommended Posts

Hello all

 

 

I am having a problem running scripts. I have used before with no problem but a few years back.

 

 

It runs the line command but responds to the first coordinates with "unknown command"

 

 

I have added a sample file.

 

 

Thanks in advance.

test.scr

Link to comment
Share on other sites

Super simple you have a space on the end of the co-ords just remove it or Line 0,0 1,2

 

 

Thank you. That was it. I seem to remember that the space was the equivalent of pressing enter...

 

 

Thanks again

Link to comment
Share on other sites

Thank you. That was it. I seem to remember that the space was the equivalent of pressing enter...

It is, but in a script so is a newline, so it looks to Autocad as though you are pressing enter twice which was causing the problem.

Link to comment
Share on other sites

I often ended my longer scripts with a RESUME statement which prevented several blank lines going off at tangents.

 

I can't actually remember what the command does but it worked for me!

Link to comment
Share on other sites

I have just remembered. My previous scripts were headed "point".

When doing point scripts it seems the space is required?

 

 

Tom

Link to comment
Share on other sites

I have just remembered. My previous scripts were headed "point".

When doing point scripts it seems the space is required?

Tom thats a different issue, in the case of point it only takes a single coordinate and the command finishes, when you have that extra space autocad reads that as the equivalent of the enter key and actually restarts the last command (point) and then reads the next coordinate.

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...