Jump to content

Recommended Posts

Posted

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)

Posted

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.

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

Posted

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?

Posted

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

Posted
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 :D

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

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