[CONNECT .NET] DgnTool tool name

How do I set the tool name of a primitive tool that ultimately inherits from DgnTool?  The tool name is useful, for example, because it appears in the Undo/Redo edit menu.

Perversely, there's DgnTool.GetToolName, but no method that I see that implements SetToolName.

Parents Reply
  • No: that fixes the symptom but not the underlying problem.  Consider the VBA CommandState.CommandName read/write property.  It tells the primitive state engine to use that name when referring to the current command.  That's how the command name is entered into the under buffer queue.

    How about overriding GetToolName() method in DgnTool class?

       class DgnToolDemo : DgnElementSetTool
        {
            protected override string GetToolName()
            {
                return "MyTool";
            }
            public override StatusInt OnElementModify(Element element)
            {
                return StatusInt.Error;
            }
            ...
        }



Children
No Data