I'm using Application.ShowModalDialog to display a modal form to the user launched from a button on a tab in a PaletteSet. The modal dialog lets the user click a button to select a point. Is there any way that I can let the user run transparent commands and still return to the modal dialog?
The ideal would be for the user to be able to zoom and pan transparently from the GetPoint prompt. I could also provide a button to allow the user to reposition the drawing.
Using edUsrInt As EditorUserInteraction = ed.StartUserInteraction(Me.Handle) ' Get the insertion point from the user Dim prPtOpts As New PromptPointOptions(vbLf & "Select center point: ") prPtRes = ed.GetPoint(prPtOpts) transientGraphic = DrawTransientGraphic(prPtRes.Value, BlockScale) edUsrInt.End() Me.Focus() End Using
What AutoCAD release are you using?
AFAIK, transparent commands like ZOOM, etc. are available at a prompt from GetPoint() and most other GetXxxxx() methods.
If you are not able to issue transparent commands, what exactly happens when you try?
I've also used modal dialogs launched from event handlers of controls on PalleteSets and used GetPoint(), etc. from the click handler of a button on the modal form, and as far as I can recall, transparent commands are available .
It might also interest you to know that mouse wheel pan/zoom is usually always available when the editor is in an interactive state (e.g., polling for mouse and keyboard input), and I don't recall the last time I used the ZOOM or PAN commands transparently, because I always use the mouse wheel to zoom or pan.
I think I've got it all working now. By using an object reference to the PaletteSet from the original CommandMethod class, I can communicate the updates back to the PaletteSet from the modal form when the user clicks Ok or Cancel.
Yes, I was really referring to mousewheel zooming and panning, at the prompt, although some users might want to use a specific Zoom command as well, so I was trying to anticipate that as well.
Getting the modal form call off of the paletteset and back from the CommandMethod was the answer.
Thanks very much for your help!
Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.