Community
Civil 3D Customization
Welcome to Autodesk’s AutoCAD Civil 3D Forums. Share your knowledge, ask questions, and explore popular AutoCAD Civil 3D Customization topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

EVENT VIEWER

5 REPLIES 5
SOLVED
Reply
Message 1 of 6
htls69
2141 Views, 5 Replies

EVENT VIEWER

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

Allen Robberson
Credit where credit is due! Give kudos or accept as solution whenever you can.
5 REPLIES 5
Message 2 of 6
Jeff_M
in reply to: htls69

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_M, also a frequent Swamper
EESignature
Message 3 of 6
bedrya.balema
in reply to: htls69

Thank you bro. 

Message 4 of 6
vandenoosterkamp
in reply to: Jeff_M

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!!

Message 5 of 6
lbinghamZSWSG
in reply to: Jeff_M

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?

Message 6 of 6


@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:

 

https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/create-a-custom-drawing-variable-yes...

 

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."

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Rail Community


 

Autodesk Design & Make Report