MicroStation .NET: Notification Manager

  • Products
  • Services
  • All Publications
  • CONNECT Publications
  • Links
  • WishList
  • LA Solutions
LA Solutions
tel: +44 1398 361 800
DgnPlatformNet

Introduction

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.

Be Communities

If you want to ask questions about C# development for MicroStation CONNECT, post your question to the MicroStation Programming Forum.

Message Center

Message Center dialog

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 …

Message Center Properties

The screenshot below shows a variety of message types (Bentley.DgnPlatformNET.NotifyMessageDetails) …

Message Center Alert

NotificationManager

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 …

  1. Create a NotifyMessageDetails object
  2. Set the properties of NotifyMessageDetails
    • OutputMessagePriority
    • terse and verbose messages
    • Whether to pop a modal dialog (OutputMessageAlert)
  3. Call the static method 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);

Questions

Post questions about MicroStation programming to the MicroStation Programming Forum.


Bentley Technology Partner

Trademarks

All trademarks are acknowledged. Trademarks may be registered in some jurisdictions.
e-mail Contact LA Solutions using this enquiry form.

Home
Home
Updated on 17-Feb-2020 Copyright © 2016…2025 Jon Summers