I was wondering if there is a way using a dll file to turn off the event viewer that i can add to my start up lisp routine
To do this, go to the settings tab of prospector, right click on your
drawing name, select Edit Drawing Settings. The last tab in the
resulting dialog box is the Ambient Settings tab. The first group is
general there, expand that and select NO for show event viewer.
Do this in your drawing template if you want to turn it off forever -
it's a drawing-specific setting.
I cant have it turned off in the template cause some people that work with out template need to have it open when certain things happen
thanks in advance
Allen
Solved! Go to Solution.
Solved by Jeff_M. Go to Solution.
Throw the following code in your acaddoc.lsp file and it will turn off the event viewer.
(defun noeventviewer (/ ambient c3d c3ddoc dwgsettings eviewer gensettings settings) (vl-load-com) (setq C3D (strcat "HKEY_LOCAL_MACHINE\\" (if vlax-user-product-key (vlax-user-product-key) (vlax-product-key) ) ) C3D (vl-registry-read C3D "Release") C3D (substr C3D 1 (vl-string-search "." C3D (+ (vl-string-search "." C3D) 1)) ) C3D (vla-getinterfaceobject (vlax-get-acad-object) (strcat "AeccXUiLand.AeccApplication." C3D) ) ) (setq c3ddoc (vlax-get c3d 'activedocument)) (setq settings (vlax-get c3ddoc 'settings)) (setq dwgsettings (vlax-get settings 'drawingsettings)) (setq ambient (vlax-get dwgsettings 'ambientsettings)) (setq gensettings (vlax-get ambient 'generalsettings)) (setq eviewer (vlax-get gensettings 'showeventviewer)) (vlax-put-property eviewer 'value :vlax-false)
(vlax-release-object c3d) (princ) ) (noeventviewer)
Jeff, you are my hero! Awesome that from now on I will never be bothered with it again.
Of course still waiting for autodesk to come up with the 'viewevent' sysvar so I can turn stuff like this off myself by adding a simple line in my startuplisp but unfortunately they are busy inventing / buying more things we don't need.
Autodesk: Please start adding sysvars so we do not need to learn code for turning things off!!
So, it's reachable. Is there any way to access the eventviewer and export the event list programmatically?
When I'm building a surface, the eventviewer throws any warnings about breakline crossings, etc. . I'd like to be able to read these and deal with them without the viewer. Any ideas?
@vandenoosterkamp wrote:Jeff, you are my hero! Awesome that from now on I will never be bothered with it again.
Of course still waiting for autodesk to come up with the 'viewevent' sysvar so I can turn stuff like this off myself by adding a simple line in my startuplisp but unfortunately they are busy inventing / buying more things we don't need.
Autodesk: Please start adding sysvars so we do not need to learn code for turning things off!!
Autoloader supports custom sysvars since 2015 version:
I too dislike EventViewer showing all the time, so back in 2018 I came up with a custom 'EventViewerMode' sysvar for this, which can be used with LISP, C#, etc:
<?xml version="1.0" encoding="utf-8"?>
<ApplicationPackage <!-- Your info here --> >
<Components <!-- Your info here --> >
<RuntimeRequirements <!-- Your info here --> />
<SystemVariables>
<!-- EVENTVIEWERMODE
0 - Use the drawing-saved value (OOTB)
1 - Disable 'Show Event Viewer' on drawing open.
2 - Enable 'Show Event Viewer' on drawing open. -->
<SystemVariable Flags="Create|OpenOnce|Chatty" Name="EVENTVIEWERMODE" Owner="" PrimaryType="Int16" StorageType="Profile" Value="1" ></SystemVariable>
</SystemVariables>
<RegistryEntries>
<RegistryEntry Key="Variables\EVENTVIEWERMODE" Name="LowerBound" Value="0" Type="REG_DWORD" Flags="Create|Open" ></RegistryEntry>
<RegistryEntry Key="Variables\EVENTVIEWERMODE" Name="UpperBound" Value="2" Type="REG_DWORD" Flags="Create|Open" ></RegistryEntry>
</RegistryEntries>
</Components>
</ApplicationPackage>
"How we think determines what we do, and what we do determines what we get."