samoos Posted May 29, 2012 Posted May 29, 2012 I'm trying to write a script that will do the same things to a large number of drawings. It currently does the following: -attedit N N then the autocad text window pops up and stops the rest of the script. Is there a way to not have the text window pop up? Or an alternate way to use this command that I can use in a script? (Also, I am using Autocad 2011 LT, so can't use LISP etc) Quote
dbroada Posted May 29, 2012 Posted May 29, 2012 try chaging the first response to Y. You will have to step through watching the command line to get all the correct answers but I have used this in scripts often so I know it works. Quote
samoos Posted May 29, 2012 Author Posted May 29, 2012 try chaging the first response to Y. You will have to step through watching the command line to get all the correct answers but I have used this in scripts often so I know it works. Well, that kind of works, but it requires me to make a selection, which I can do, but if any of the drawings I want to run this script on are even slightly off then the selection will miss... If I do the following manually: -attedit n n * * * thing1 thing2 It does exactly what I want, and will replace thing1 anywhere in the drawing but that text box popping up breaks the script. Was hoping there was a setting or variation or something that would let me do this without the text box. Quote
dbroada Posted May 29, 2012 Posted May 29, 2012 what sort of thing are you selecting and how big is your slightly off? you do know if you select from right to left you get a crossing window which will take care of some slightly offs don't you? Quote
samoos Posted May 29, 2012 Author Posted May 29, 2012 Well, some of the drawings are up to around 8 years old, the template used has been switched/updated several times over the years. So slightly off can be significant enough to select another nearby field. But thanks for the help, at least that way works in a script. Quote
Blackfish Posted May 29, 2012 Posted May 29, 2012 Well, some of the drawings are up to around 8 years old, the template used has been switched/updated several times over the years. So slightly off can be significant enough to select another nearby field. The older drawing the more off Quote
Blackfish Posted May 29, 2012 Posted May 29, 2012 try chaging the first response to Y. You will have to step through watching the command line to get all the correct answers but I have used this in scripts often so I know it works. I use something like the below script, where the most important in my case was the first zoom extend, because I don't know with what view the drawing was saved/closed, and then following zoom to close enough to use window polygon for selection. A few tries and it flies! The only advantage in my case was that all layouts were the same and all attributes were exactly in the same location. -layout set layout_name _zoom e w x1,y1 x2,y2 -attedit y w x3,y3 x4,y4 v new_value _zoom p PS. x1,y1 to x4,y4 are suitable x and y coordinates. Quote
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.