ast Posted August 6, 2013 Share Posted August 6, 2013 Hello everyone, Im trying to make an autolisp routine by running a scr file to change text in several drawings. Im using the _change command but at the momment the new value is entered, it recognizes it as a command and not as a value, showing the "unknown command" error, have anyone had this issue? Attached are the SCR files and the DRW template I want to modify Thank you example.dwg test1.SCR Quote Link to comment Share on other sites More sharing options...
dbroada Posted August 6, 2013 Share Posted August 6, 2013 does this give a clue? Command: _CHANGESelect objects: W Specify first corner: 14.86,1.49 Specify opposite corner: 13.51,1.57 0 found Select objects: I don't think your window is picking up text and therefore not finishing the _CHANGE command. On a slight aside, I used to prefer using a crossing window rather than a window as I found it more likely to pick up text. Quote Link to comment Share on other sites More sharing options...
steven-g Posted August 6, 2013 Share Posted August 6, 2013 Make sure all osnaps are turned off. When you are running a script autocad will still snap to osnaps (depending on your zoom level), and your details are close together in the sample. It took me forever to figure out why sometimes a script would fail, till I figured that one out. If it still gives problems, then run the script again, press F2 to get the command history and copy that into a text file and post it here. Quote Link to comment Share on other sites More sharing options...
jdiala Posted August 6, 2013 Share Posted August 6, 2013 Make sure all osnaps are turned off. try this: _CHANGE w [color="red"]_non[/color] 14.25,.28 [color="red"]_non[/color] 14.03,.44 Quote Link to comment Share on other sites More sharing options...
MBSupport Posted August 8, 2013 Share Posted August 8, 2013 Batched your routine on your sample drawing which we had made copies of and it worked fine. The only thing missing was the line Qsave to save the changes. I would agree with dbroada about using a crossing window. If I am testing a routine and have problems I also like to draw a line with the same co-ordinates, this is something visual that I can check against. It is also a good idea to zoom into the area you are changing, sometimes AutoCAD picks the wrong points off screen. To turn off the snap you can set Osmode to 0. If you wish you can use the getvar and setvar commands to reset the osmode command afterwards. Patrick http://www.multi-batch.com/ Quote Link to comment Share on other sites More sharing options...
ast Posted August 23, 2013 Author Share Posted August 23, 2013 Thanks all for your repplies, the script worked by itself, sometimes I just need to press esc before running it, but now I want to make a lsp routine and the same error is going What do you mean with crossed windows, Im new at Autocad so I would appreciate any explanation Regards 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.