Saturday, November 21, 2009
Home   |   Search   |   About AUGI   |   My AUGI   |   Join Now

Go Back   AUGI Forums > AUGI Technical (English) > Programming > AutoLISP
 Welcome, Guest. 

Login

Join Now FAQ Members List Calendar Search Today's Posts Mark Forums Read

AutoLISP AutoLISP or Visual LISP, learn both here!

Reply
 
Thread Tools Display Modes
Old 2004-06-23, 03:51 PM   #1
Coolmo
All AUGI, all the time
 
Coolmo's Avatar
 
Join Date: 2003-10
Posts: 525
Coolmo is glowing brightlyCoolmo is glowing brightlyCoolmo is glowing brightlyCoolmo is glowing brightlyCoolmo is glowing brightlyCoolmo is glowing brightlyCoolmo is glowing brightlyCoolmo is glowing brightlyCoolmo is glowing brightlyCoolmo is glowing brightlyCoolmo is glowing brightly
Default MDE and lisp

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
Coolmo is offline   Reply With Quote
Old 2004-06-23, 04:53 PM   #2
Ed Jobe
Administrator
 
Ed Jobe's Avatar
 
Join Date: 2000-11
Location: Turlock, CA
Posts: 3,411
Ed Jobe is a shining starEd Jobe is a shining starEd Jobe is a shining starEd Jobe is a shining starEd Jobe is a shining starEd Jobe is a shining starEd Jobe is a shining starEd Jobe is a shining starEd Jobe is a shining starEd Jobe is a shining starEd Jobe is a shining star
Default

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 ──
Ed Jobe is offline   Reply With Quote
Old 2004-06-23, 05:15 PM   #3
Coolmo
All AUGI, all the time
 
Coolmo's Avatar
 
Join Date: 2003-10
Posts: 525
Coolmo is glowing brightlyCoolmo is glowing brightlyCoolmo is glowing brightlyCoolmo is glowing brightlyCoolmo is glowing brightlyCoolmo is glowing brightlyCoolmo is glowing brightlyCoolmo is glowing brightlyCoolmo is glowing brightlyCoolmo is glowing brightlyCoolmo is glowing brightly
Default RE: MDE and lisp

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
Coolmo is offline   Reply With Quote
Old 2004-06-23, 05:37 PM   #4
Ed Jobe
Administrator
 
Ed Jobe's Avatar
 
Join Date: 2000-11
Location: Turlock, CA
Posts: 3,411
Ed Jobe is a shining starEd Jobe is a shining starEd Jobe is a shining starEd Jobe is a shining starEd Jobe is a shining starEd Jobe is a shining starEd Jobe is a shining starEd Jobe is a shining starEd Jobe is a shining starEd Jobe is a shining starEd Jobe is a shining star
Default

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 ──
Ed Jobe is offline   Reply With Quote
Old 2004-06-23, 05:45 PM   #5
Coolmo
All AUGI, all the time
 
Coolmo's Avatar
 
Join Date: 2003-10
Posts: 525
Coolmo is glowing brightlyCoolmo is glowing brightlyCoolmo is glowing brightlyCoolmo is glowing brightlyCoolmo is glowing brightlyCoolmo is glowing brightlyCoolmo is glowing brightlyCoolmo is glowing brightlyCoolmo is glowing brightlyCoolmo is glowing brightlyCoolmo is glowing brightly
Smile RE: MDE and lisp

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
Coolmo is offline   Reply With Quote
Reply


Go Back   AUGI Forums > AUGI Technical (English) > Programming > AutoLISP

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off


All times are GMT +1. The time now is 11:19 AM.