VBA generated Menu disappear when all files are closed

VBA generated Menu disappear when all files are closed

btmsoftware
Advocate Advocate
396 Views
10 Replies
Message 1 of 11

VBA generated Menu disappear when all files are closed

btmsoftware
Advocate
Advocate
Hi there,

I have a VBA starting automatically when I launch AutoCAD (2007). In this VBA, I add my own menu to the main AutoCAD menu bar. So far, so good.
However, If I close all the opened drawings, then my menu disappears. My VBA is still loaded since If open another file (or create a new one), the menu comes back and works fine

Any idea ?
0 Likes
397 Views
10 Replies
Replies (10)
Message 2 of 11

Anonymous
Not applicable
I have an antique version (2004) and that is normal behavior.

If I close all drawings, all menus (including built-in) disappear except for
File, View, Window & Help. None of the other menus/commands would be
applicable without a drawing open. Not sure how that could be any different
in a newer version unless they were left in place and just disabled.
0 Likes
Message 3 of 11

dgorsman
Consultant
Consultant
The DVB is unloaded under zero-document conditions - VBA projects are hosted under a specific document.

As far as I know, there is no way to add customization to the zero-document state due to customizations being hosted in a document.
----------------------------------
If you are going to fly by the seat of your pants, expect friction burns.
"I don't know" is the beginning of knowledge, not the end.


0 Likes
Message 4 of 11

btmsoftware
Advocate
Advocate
Thanx guys, that's what I was afraid about.

Anybody knows if that is feasible in ARX ? or is ARX also 'linked' to drawings ?
0 Likes
Message 5 of 11

Anonymous
Not applicable
Hi,

Why not read Gary's reply?

If there is no drawing open AutoCAD will only display the 4 menus which are
independent of the drawing.

--

Laurie Comerford

wrote in message news:5772414@discussion.autodesk.com...
Thanx guys, that's what I was afraid about.

Anybody knows if that is feasible in ARX ? or is ARX also 'linked' to
drawings ?
0 Likes
Message 6 of 11

btmsoftware
Advocate
Advocate
I did read Gary's reply but since AutoCAD can do it, I was hoping somebody had found a way to do it too

Thanx Laurie, very friendly. Why even bother wasting time replying. I guess next time I'll have a question/problem, I'll find somewhere else to ask it if that's the way you treat people.

And yes, to anyone who might be wondering, I am pissed off by this kind of attitude on a forum. Aren't we supposed to help each others ?
0 Likes
Message 7 of 11

Anonymous
Not applicable
>>If open another file (or create a new one), the menu comes back and works
fine
What are you trying to do? I thought you were erroneously perceiving normal
behavior as a problem. Apparently that is not the case.

Maybe you could add a menu item to one of the menus that still exist in the
zero document state? Don't know if that will do anything for you. Perhaps it
will force Acad to keep your app resident and/or available.

Gary
0 Likes
Message 8 of 11

Anonymous
Not applicable
You'll need to forgive Laurie, he has a bad dysfunction of
jumping in even when he has absolutely no idea or clue
about what is being discussed, and making a complete
fool out of himself.

Since he obviously doesn't care about just how much
that nonsense rubs-off on the organization whose name
he posts in his sig, he should consider buying the entire
company so no one but he has to pay the consequences.

Yes, with ObjectARX you can add items to the 'zero-
document' menu, but it requires some C++/WinAPI
programming.

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD 2008
Supporting AutoCAD 2000 through 2008
http://www.acadxtabs.com

wrote in message news:5772473@discussion.autodesk.com...
I did read Gary's reply but since AutoCAD can do it, I was hoping somebody had found a way to do it too

Thanx Laurie, very friendly. Why even bother wasting time replying. I guess next time I'll have a question/problem, I'll find somewhere else to ask it if that's the way you treat people.

And yes, to anyone who might be wondering, I am pissed off by this kind of attitude on a forum. Aren't we supposed to help each others ?
0 Likes
Message 9 of 11

Anonymous
Not applicable
Another thing you might consider, is using a Palette with
the managed .NET API. A Palette (like the SheetSet Manager),
can remain visible even when there's no documents open.

If you have other UI elements that are related to the menu
items, then they could also be on the palette. IMO, that
would be a far less difficult route than the WinAPI/C++
coding needed to add menu items to the zero-doc menu.

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD 2008
Supporting AutoCAD 2000 through 2008
http://www.acadxtabs.com

wrote in message news:5772473@discussion.autodesk.com...
I did read Gary's reply but since AutoCAD can do it, I was hoping somebody had found a way to do it too

Thanx Laurie, very friendly. Why even bother wasting time replying. I guess next time I'll have a question/problem, I'll find somewhere else to ask it if that's the way you treat people.

And yes, to anyone who might be wondering, I am pissed off by this kind of attitude on a forum. Aren't we supposed to help each others ?
0 Likes
Message 10 of 11

btmsoftware
Advocate
Advocate
Gary,

I'm building an interface between AutoCAD and a Document Management System.

Therefore I created a menu that allows to open files directly from the EDMS and I want to have this option also when no files are opened in AutoCAD as a user should still be able to open a file from the EDMS.

I guess I'll have to go the ARX way because my menu needs to be dynamic, menu entries are enabled/disabled and added/removed depending on the kind of drawing, if the drawing is being edited or viewed only.....

Back to good old C++

Cheers
0 Likes
Message 11 of 11

Anonymous
Not applicable
btmsoftware wrote:
> I did read Gary's reply but since AutoCAD can do it, I was hoping somebody had found a way to do it too
>
> Thanx Laurie, very friendly. Why even bother wasting time replying. I guess next time I'll have a question/problem, I'll find somewhere else to ask it if that's the way you treat people.
>
> And yes, to anyone who might be wondering, I am pissed off by this kind of attitude on a forum. Aren't we supposed to help each others ?

I Couldn't agree with you more.

It's no consolation, but it's even worse in some other ADesk NG's.
Cadmanagers for one. They put themselves on pedestals.

Hang in there, eventually the correct answer will turn up. (usually).

Cheers
Dave F.
0 Likes