@michaelZCXYL wrote:
.... I do not need to do something in each of them separately, do the same thing for all the drawings. ....
That's what I don't understand. What is "the same thing"? Do you mean it would hide or reveal the same object(s) in all drawings? Do they all have the same object(s) in them? What defines what's the same object?
It can't use entity names, because those change from one drawing session to another.
It might only under very restricted lucky circumstances be able to use handles, requiring that all drawings involved were made using SAVE or SAVEAS from the same source drawing, so the handles will be the same, and that all the desired same objects in all drawings were already present at the time those drawings were all created. That's the only chance you would have of the same objects having the same handles that a routine could use to find them.
Again, what would a User do to achieve what you're after, if a command can be defined? Call the command while in one of the drawings in question, and then.... ? Would all the other drawings involved need to be open at the time? [AutoLisp won't be able to move from one to another.] Would they all be in the same folder location? [I believe something like ScriptPro could run a Script in all of them, which could call the AutoLisp routine in each if it doesn't require User input, but then it wouldn't be called as a command in one of the drawings.] Etc.
Kent Cooper, AIA