ErrorManager Object
Description
The ErrorManager object contains methods and properties to get errors and warnings that occurred during an API call, add to Inventor's errors or to display them.
Methods
| AddMessage |
Method that adds a new message at the current level in the message tree. |
| Clear |
Method that clears all errors and warnings. This method returns a failure if there are any active message sections (indicated by the IsMessageSectionActive property). |
| Show |
Method that displays the current error/warning or the stack of errors/warnings to the user. |
| StartMessageSection |
Method that starts a message section and returns a MessageSection object which can be used to clear, adopt or retain error/warning messages created during the section. |
Properties
| AllMessages |
Property that returns an XML string containing all messages (errors and warnings). |
| Application |
Returns the top-level parent application object. When used the context of Inventor, an Application object is returned. When used in the context of Apprentice, an ApprenticeServer object is returned. |
| HasErrors |
Property that returns whether there are any recorded errors. |
| HasWarnings |
Property that returns whether there are any recorded warnings. |
| IsMessageSectionActive |
Property that returns whether there is any message section active. |
| LastMessage |
Property that returns the last recorded error/warning message. If there is a tree of errors/warnings, this property returns the most recent leaf error/warning. |
| Parent |
Property that returns the parent Application object. |
| Type |
Returns an ObjectTypeEnum indicating this object's type. |
Accessed From
Application.ErrorManager,
InventorServer.ErrorManager,
InventorServerObject.ErrorManager,
MessageSection.Parent
Samples
Version
Introduced in version 2010