|
Welcome, Guest.
|
||||||
| AutoLISP AutoLISP or Visual LISP, learn both here! |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
All AUGI, all the time
Join Date: 2003-10
Posts: 525
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Is there a way to access how many drawings are open in the Multiple Design Environment with a lisp routine or is there a system variable or environment variable that changes when a new drawing is called up in MDE and then can I access or query that?
__________________
COOLMO If = 0 then End If |
|
|
|
|
|
#2 |
|
Administrator
Join Date: 2000-11
Location: Turlock, CA
Posts: 3,411
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Lisp has some limitations when it comes to "working" with multiple dwgs, since the lisp namespace is active only in the current dwg. The only part that bridges dwgs is the blackboard. But, using the ActiveX api, you can certainly find out about other dwgs. Have a look at the AcadApplication.Documents collection. The Count prop will tell you how many are open, and you can use For Each to iterate the collection and examine ead doc's Name prop.
__________________
──□ Ed □── |
|
|
|
|
|
#3 |
|
All AUGI, all the time
Join Date: 2003-10
Posts: 525
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
The only thing I need to know is just how many are open in the MDE. I'd like for a small proggy to load with the acaddoc.lsp (which I assume will reload everytime a new drawing is opened up in the MDE) that will check the number of drawings open and give an "alert" when more than 2 are open. I need to write and load this in lisp so I can simply add it to the acaddoc.lsp file and have it work companywide. Ideas?
__________________
COOLMO If = 0 then End If |
|
|
|
|
|
#4 |
|
Administrator
Join Date: 2000-11
Location: Turlock, CA
Posts: 3,411
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
That's no problem. When I said "have a look", I was referring to the ActiveX developer's guide. It has examples too. However, I might question your program's logic. First, poping an alert in that case may get annoying. If you are trying to prevent them from oping more than one dwg, just set sdi=1, or create a reactor that watches for that sysvar to change and reset it.
__________________
──□ Ed □── |
|
|
|
|
|
#5 |
|
All AUGI, all the time
Join Date: 2003-10
Posts: 525
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Even though LDD doesn't allow for multiple drawings to be open, it's still a good tool if you use it with consideration for others that might need to get into the files. The problem we're having is too many people get into 7-10 files at a time because they don't release them whenever they make the slightest change. I was trying to get a box to come up to suggest closing some of the ones they weren't using at the time. Merely a reminder that gets them in the habit of closing files after they're done with them. I'll check out the ActiveX stuff you suggested though.
__________________
COOLMO If = 0 then End If |
|
|
|
![]() |
|
||||||
| Thread Tools | |
| Display Modes | |
|
|