Showing a balloon notification using the InfoCenter API in AutoCAD 2009
This post is the latest in the series of closer looks at the new APIs in AutoCAD 2009. It dips into the InfoCenter API, a .NET API allowing you to customize and drive the InfoCenter feature inside AutoCAD.
To make use of this API you need to add Project References to two managed assemblies from the AutoCAD 2009 root folder: AcInfoCenterConn.dll and AdInfoCenter.dll.
Here's some C# code that will display a balloon notification to your users:
using Autodesk.AutoCAD.ApplicationServices;
using Autodesk.AutoCAD.Runtime;
using Autodesk.AutoCAD.AcInfoCenterConn;
namespace InfoCenterApp
{
public class Commands
{
[CommandMethod("icb")]
public void infoCenterBalloon()
{
InfoCenterManager icm =
AcInfoCenterConn.InfoCenterManager;
Autodesk.InfoCenter.PaletteMgr pm =
icm.PaletteManager;
pm.ShowBalloon(
"Custom Application Notification",
"Kean has some information for you...",
null, // Don't provide an icon
new System.Uri(
"http://blogs.autodesk.com/through-the-interface"
),
5, // Show the balloon for 5 seconds
1 // Make it relatively slow to fade in
);
}
}
}
Here's what you see when you run the ICB command:

Subscribe via RSS
Cool, I've been wanting to do that for a while now. Will it work in 2008? I see the DLL's are there.
Posted by: Barry Ralphs | April 16, 2008 at 08:31 PM
Sorry - this is a new API in 2009. I'll post something on TrayItem.ShowBubbleWindow() sometime next week, I hope.
Kean
Posted by: Kean | April 17, 2008 at 06:22 PM
it works in A2008, however, the balloon notificaction is justified to the left hand side of the screen with the 'communication dish' icon residing over the 'draw' menu even though the communication area is on the right hand side
Posted by: Mark | April 21, 2008 at 12:53 AM
Thanks, Mark.
Actually, yes - now that I've tried it in 2008, I see the balloon there, too (and on the right, as in 2009 - not sure what's different about your configuration).
Our internal design docs implied this was 2009 only, but it seems it was there as an undocumented/unsupported API in 2008.
Regards,
Kean
Posted by: Kean | April 21, 2008 at 11:41 AM
Well - it seems it's even documented (and therefore supported) for 2008.
Kean
Posted by: Kean | April 21, 2008 at 01:25 PM