Posts: 13
Registered: ‎01-24-2007
Message 1 of 5 (329 Views)

Transparent commands during GetPoint?

329 Views, 4 Replies
09-25-2012 11:59 AM

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.


Any ideas?




        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)


        End Using


Valued Mentor
Posts: 382
Registered: ‎03-31-2005
Message 2 of 5 (327 Views)

Re: Transparent commands during GetPoint?

09-25-2012 12:12 PM in reply to: sfinch1

Why not use another palette instead of a form?

Posts: 13
Registered: ‎01-24-2007
Message 3 of 5 (321 Views)

Re: Transparent commands during GetPoint?

09-25-2012 01:29 PM in reply to: fieldguy
Thought about that, but I really need to keep the form modal so that the user has to finish the workflow before launching another command. My only problem is that I know the users are going to need to move around the drawing to locate the point to pick. Unless I can let them do that from the GetPoint prompt or via another method, they will have to have the foresight to make sure the display is zoomed to the correct location every time before launching the command. Thanks
Valued Mentor
Posts: 370
Registered: ‎05-06-2012
Message 4 of 5 (284 Views)

Re: Transparent commands during GetPoint?

09-26-2012 11:51 AM in reply to: sfinch1

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.


Posts: 13
Registered: ‎01-24-2007
Message 5 of 5 (244 Views)

Re: Transparent commands during GetPoint?

10-01-2012 02:31 PM in reply to: sfinch1

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!


Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Do you have 60 seconds to spare? The Autodesk Community Team is revamping our site ranking system and we want your feedback! Please click here to launch the 5 question survey. As always your input is greatly appreciated.