tomhoban Posted April 22, 2015 Share Posted April 22, 2015 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 Quote Link to comment Share on other sites More sharing options...
BIGAL Posted April 22, 2015 Share Posted April 22, 2015 Super simple you have a space on the end of the co-ords just remove it or Line 0,0 1,2 Quote Link to comment Share on other sites More sharing options...
tomhoban Posted April 22, 2015 Author Share Posted April 22, 2015 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 Quote Link to comment Share on other sites More sharing options...
steven-g Posted April 22, 2015 Share Posted April 22, 2015 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. Quote Link to comment Share on other sites More sharing options...
dbroada Posted April 22, 2015 Share Posted April 22, 2015 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! Quote Link to comment Share on other sites More sharing options...
tomhoban Posted April 22, 2015 Author Share Posted April 22, 2015 I have just remembered. My previous scripts were headed "point". When doing point scripts it seems the space is required? Tom Quote Link to comment Share on other sites More sharing options...
SLW210 Posted April 22, 2015 Share Posted April 22, 2015 I moved your thread to the The CUI, Hatches, Linetypes, Scripts & Macros Forum. Please post in the appropriate forums. Quote Link to comment Share on other sites More sharing options...
steven-g Posted April 22, 2015 Share Posted April 22, 2015 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. Quote Link to comment Share on other sites More sharing options...
tomhoban Posted April 22, 2015 Author Share Posted April 22, 2015 Ah! Thank you Steven. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.