Creating AutoLISP to edit multiple open documents w/ attribute block

Creating AutoLISP to edit multiple open documents w/ attribute block

Anonymous
Not applicable
1,078 Views
3 Replies
Message 1 of 4

Creating AutoLISP to edit multiple open documents w/ attribute block

Anonymous
Not applicable

Let me start off by saying I am just now trying to learn AutoLISP right now and my question is far and above my skill set. Hopefully one of you may be able to help me with this LISP routine, but I understand if I m asking too much.

Right now I have multiple standard panel drawings that have fields attached to an attribute block. I can go in and update the block in each drawing to update all the fields. Right now doing that for 20 or so drawings is time consuming. All the panel drawings will have the same block and field data.

What I want to know is it possible to create an AutoLISP to where I can have multiple drawings open and once I edit the first drawing's attribute block and fields, it goes through a script and updates all the other drawings blocks and fields without having to do it myself?

Thanks for any help you can provide

0 Likes
1,079 Views
3 Replies
Replies (3)
Message 2 of 4

maratovich
Advisor
Advisor

Need an example of your file.

---------------------------------------------------------------------
Software development
Automatic creation layouts and viewport. Batch printing drawings from model.
www.kdmsoft.net
0 Likes
Message 3 of 4

dbhunia
Advisor
Advisor

Something like This.......

 

If so then give details......(In post with drawing in Autocad 2007 format)


Debashis Bhunia
Co-Founder of Geometrifying Trigonometry(C)
________________________________________________
Walking is the First step of Running, Technique comes Next....
0 Likes
Message 4 of 4

roland.r71
Collaborator
Collaborator

@Anonymous wrote:

Let me start off by saying I am just now trying to learn AutoLISP right now and my question is far and above my skill set. Hopefully one of you may be able to help me with this LISP routine, but I understand if I m asking too much.

Right now I have multiple standard panel drawings that have fields attached to an attribute block. I can go in and update the block in each drawing to update all the fields. Right now doing that for 20 or so drawings is time consuming. All the panel drawings will have the same block and field data.

What I want to know is it possible to create an AutoLISP to where I can have multiple drawings open and once I edit the first drawing's attribute block and fields, it goes through a script and updates all the other drawings blocks and fields without having to do it myself?

Thanks for any help you can provide


Yes & No.

As you write it, the answer is "No". You can not have a lisp edit any or all open drawings, just like that.

Lisp runs 'inside' a drawing and can not go beyond it's 'borders'.

 

...but it can be done (using just AutoLISP), with some extra steps.

You can retrieve all the open drawings (filenames).

Close all those drawings but the active one.

Have the user supply his/her info to write to the drawings & then sequentially process all the drawings (using SDI-mode (on) & lispinit (off))

 

If you have a lisp function that works for one drawing, you could also use my tool for file selection & executing that function on all drawings. (it will even allow you to add all open drawings and close them for you when starting the process.)

0 Likes