.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Transparent commands during GetPoint?

4 REPLIES 4
Reply
Message 1 of 5
sfinch1
612 Views, 4 Replies

Transparent commands during GetPoint?

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

 

4 REPLIES 4
Message 2 of 5
fieldguy
in reply to: sfinch1

Why not use another palette instead of a form?

Message 3 of 5
sfinch1
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
Message 4 of 5
DiningPhilosopher
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.

 

Message 5 of 5
sfinch1
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!

 

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost