Transparent commands during GetPoint?

Anonymous

Transparent commands during GetPoint?

Anonymous
Not applicable

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?

 

Thanks

 

        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

 

0 Likes
Reply
783 Views
4 Replies
Replies (4)

fieldguy
Advisor
Advisor

Why not use another palette instead of a form?

0 Likes

Anonymous
Not applicable
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
0 Likes

DiningPhilosopher
Collaborator
Collaborator

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.

 

0 Likes

Anonymous
Not applicable

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!

 

0 Likes