Author Topic: Close an AutoCAD Dialogue through VBA  (Read 9158 times)

0 Members and 1 Guest are viewing this topic.

Matt__W

  • Seagull
  • Posts: 12955
  • I like my water diluted.
Re: Close an AutoCAD Dialogue through VBA
« Reply #15 on: September 08, 2008, 11:17:13 AM »
Any idea how to turn off the dialogue that pops up the "You are opening a drawing with custom MEP objects?"

Isn't there a toggle to "not show again"?  If there is, check it once and you should be all set.
Autodesk Expert Elite
Revit Subject Matter Expert (SME)
Owner/FAA sUAS Pilot @ http://skyviz.io

mlabell

  • Guest
Re: Close an AutoCAD Dialogue through VBA
« Reply #16 on: September 08, 2008, 11:58:00 AM »
Completely correct, but I could never guess as to what every single machine in our entire corporation is set at on the display of that dialogue.  Default is on, and most people probably havent checked the "Don't display again".  There should be a variable for that dialogue it would seem, since everything else is that way...

Matt__W

  • Seagull
  • Posts: 12955
  • I like my water diluted.
Re: Close an AutoCAD Dialogue through VBA
« Reply #17 on: September 08, 2008, 12:29:08 PM »
Completely correct, but I could never guess as to what every single machine in our entire corporation is set at on the display of that dialogue.  Default is on, and most people probably havent checked the "Don't display again".  There should be a variable for that dialogue it would seem, since everything else is that way...
I believe there's a registry key for that.

You might also want to look into AECFILEOPENMESSAGE.
Autodesk Expert Elite
Revit Subject Matter Expert (SME)
Owner/FAA sUAS Pilot @ http://skyviz.io

mlabell

  • Guest
Re: Close an AutoCAD Dialogue through VBA
« Reply #18 on: September 08, 2008, 02:04:03 PM »
Right before you posted
Quote
I believe there's a registry key for that.
I started hacking the registry...

Here is my findings...
Registry value for MEP...
[HKEY_CURRENT_USER\Software\Autodesk\AutoCAD\R17.1\ACAD-6001:409\AEC\5.5\AecbBldSrv55\Preferences] "HideAecbWarningFlags" and set the key to 2
Registry value for C3D (I am making an assumption on this part, since I havent found a drawing with civil 3d objects to completely test...)
[HKEY_CURRENT_USER\Software\Autodesk\AutoCAD\R17.1\ACAD-6001:409\AEC\5.5\AeccvBase50\Preferences] "HideAeccvWarningFlags" and set the key to 2
Now I need to integrate this into the code, which shouldn't be too hard. 
« Last Edit: September 08, 2008, 02:11:59 PM by mlabell »

JohnF

  • Guest
Re: Close an AutoCAD Dialogue through VBA
« Reply #19 on: September 08, 2008, 06:37:16 PM »
What about using the API to loop through the Window Caption names of the ones that are open and close any Windows that cause problems?

I have done this before and if I remember correctly it is the "GetWindowTextA".

This is the Declare:

Declare Function GetWindowText Lib "user32" Alias "GetWindowTextA" (ByVal hWnd As Long, ByVal lpString As String, ByVal cch As Long) As Long

Now i'm no API expert and there are plenty on this forum however this may trigger a better solution.