form focus and acadview help

form focus and acadview help

Anonymous
Not applicable
259 Views
4 Replies
Message 1 of 5

form focus and acadview help

Anonymous
Not applicable
how do you figure out if the view is for modelspace or paperspace??

i have this setup so when you dblclk on a name it changes your view to that
name. but i also want the form to give autocad focus. any suggestions? (vba)

Jaime
0 Likes
260 Views
4 Replies
Replies (4)
Message 2 of 5

Anonymous
Not applicable
Jaime had this to say:

> how do you figure out if the view is for modelspace or paperspace??

One way would be to use VLAX to query the entity data for your view:
http://code.acadx.com/visualbasic/024.htm

Another would be to use vbXtender's ViewEx class (use the link in my
signature to get a copy):

Dim vx As ViewEx
Set vx = Application.GetInterfaceObject("vbXtender.ViewEx")
Set vx.View = myView
Debug.Print vx.PaperSpace

> i have this setup so when you dblclk on a name it changes your view
> to that name. but i also want the form to give autocad focus. any
> suggestions? (vba)

Are you using the AcFocusCtrl library on your form? If so, set KeepFocus to
false and AutoCAD will take the focus back all by itself. Otherwise, try
AppActivate.

--
"If you want to be somebody else change your mind"
http://www.acadx.com
http://vbxtender.sourceforge.net
0 Likes
Message 3 of 5

Anonymous
Not applicable
was hoping there was away to do it without creating alot of support code 😕
maybe ill just rewrite the whole thing in vlisp.

Jaime
0 Likes
Message 4 of 5

Anonymous
Not applicable
Jaime had this to say:

> was hoping there was away to do it without creating alot of support
> code 😕 maybe ill just rewrite the whole thing in vlisp.

I'm not sure a DCL file would not qualify as "alot of support code".

--
"If you want to be somebody else change your mind"
http://www.acadx.com
http://vbxtender.sourceforge.net
0 Likes
Message 5 of 5

Anonymous
Not applicable
well my goal here was to do it ALL in vba altho i do use
thisdrawing.sendcommand for some stuff and that just bugs the (edited)outta me
:)


Jaime
0 Likes