- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I have been attempting to follow this AutoCAD DEVBlog article on formatting rollover tooltips and I am running into issues. Below is the exact code that I am using. I have referenced accoremgd, acmgd, and acdbmgd.
using Autodesk.AutoCAD.ApplicationServices; using Autodesk.AutoCAD.EditorInput; using Autodesk.AutoCAD.Runtime; namespace ToolTipFormatting { public class Class1 : IExtensionApplication { void IExtensionApplication.Initialize() { Document activeDoc = Application.DocumentManager.MdiActiveDocument; activeDoc.Editor.PointMonitor += new PointMonitorEventHandler(Editor_PointMonitor); } void Editor_PointMonitor(object sender, PointMonitorEventArgs e) { if (e.Context.GetPickedEntities().Length > 0) { e.AppendToolTipText("Iam]]><LineBreak/><Bold>BOLD</Bold><LineBreak/>" + "<![CDATA[Iam]]><LineBreak/><Italic>Italic</Italic>" + "<LineBreak/><![CDATA[Iam Normal"); } } void IExtensionApplication.Terminate() { Document activeDoc = Application.DocumentManager.MdiActiveDocument; if (activeDoc != null) { activeDoc.Editor.PointMonitor -= new PointMonitorEventHandler(Editor_PointMonitor); } } } }
When i try this code in straight vanila AutoCAD that is started from a desktop shortcut it works fine. If i start AutoCAD MEP or AutoCAD Architecture it fails and instead of displaying the tooltip it displays the text string inside of the e.appendtooltiptext method, If i start AutoCAD MEP and switch to the AutoCAD profile it will not work. So it seems to me that something that is loaded when MEP and ACA is loaded is keeping the tooltip from formatting correctly. Has anyone else ran into this? Does anyone know of a workaround to fix this? Hopefully it is just a format change to the text string.
Thanks!
Solved! Go to Solution.