DgnPlatformNet |
This article is for C# developers who want to write an AddIn for MicroStation CONNECT. It is an introduction to the coding required to enumerate graphic elements in a DGN model.
If you want to ask questions about C# development for MicroStation CONNECT, post your question to the MicroStation Programming Forum.
The Message Center provides a scrolling list of messages from MicroStation to the user. You can send your own messages programmatically to the Message Center via the Notification Manager.
For a developer, one of the useful features of the Message Center is the debug message. A debug message is visible to the user only if they have enabled the Display Debug Messages option in the Message Center Properties dialog …
The screenshot below shows a variety of message types (Bentley.DgnPlatformNET.NotifyMessageDetails
) …
The NotificationManager
controls the interaction with the user for prompts, error messages, and alert dialogs.
Implementations of the NotificationManager
may present the information in different ways. For example, in non-interactive sessions,
these messages may be saved to a log file or simply discarded.
The NotificationManager
lives in the Bentley.DgnPlatformNET
namespace.
To post a message to the Message Center, follow these steps …
NotifyMessageDetails
object
NotifyMessageDetails
OutputMessagePriority
OutputMessageAlert
)
NotificationManager.OutputMessage (messageDetails)
Here's an example. You can see more in the ElementEnumerator project …
StringBuilder s = new StringBuilder(); s.AppendFormat("NotificationManager example"); NotifyMessageDetails messageDetails = new NotifyMessageDetails(OutputMessagePriority.Debug, s, s, NotifyTextAttributes.None, OutputMessageAlert.None); Bentley.DgnPlatformNET.NotificationManager.OutputMessage(messageDetails);
Post questions about MicroStation programming to the MicroStation Programming Forum.