.NET

Reply
Contributor
sfinch1
Posts: 12
Registered: ‎01-24-2007
Message 1 of 5 (311 Views)

Transparent commands during GetPoint?

311 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?

 

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

 

Valued Mentor
fieldguy
Posts: 367
Registered: ‎03-31-2005
Message 2 of 5 (309 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?

Contributor
sfinch1
Posts: 12
Registered: ‎01-24-2007
Message 3 of 5 (303 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
DiningPhilosopher
Posts: 370
Registered: ‎05-06-2012
Message 4 of 5 (266 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.

 

Contributor
sfinch1
Posts: 12
Registered: ‎01-24-2007
Message 5 of 5 (226 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!

 

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community