lost selection with select on screen if pan or zoom

lost selection with select on screen if pan or zoom

Anonymous
Not applicable
478 Views
3 Replies
Message 1 of 4

lost selection with select on screen if pan or zoom

Anonymous
Not applicable
if you use a selection set using AutoLisp (Visual Lisp) and you select items and still in selection mode you use the PAN or ZOOM command the selection is still alive and highlighted and ready for more items in the selection.

Why is it that if i do this in VB or VBA i lose the selection.
0 Likes
479 Views
3 Replies
Replies (3)
Message 2 of 4

Anonymous
Not applicable
This is a known problem. There are work-arounds for the getpoint and
getentity methods, but the selectonscreen method throws no errors (or
any info for that matter) to allow you to distinguish between a
transparent command or the esc key, ect. Worse yet, as you have already
noticed, it clears the set, so looping while checking for an esc or
enter doesn't work either. If it's something you have to have, consider
lisp or perhaps an add-in.
-Josh

pschut wrote:

> if you use a selection set using AutoLisp (Visual Lisp) and you select
> items and still in selection mode you use the PAN or ZOOM command the
> selection is still alive and highlighted and ready for more items in the
> selection.
>
> Why is it that if i do this in VB or VBA i lose the selection.
>
0 Likes
Message 3 of 4

Anonymous
Not applicable
In VBA you can start your macro with this:

(vl-load-com)

(defun C:VBARUNEX ()
(vla-runmacro (vlax-get-acad-object) (getstring "\nMacro: "))
(princ)
)

This will work provided you're not getting the selection
set while your form is hidden. If you have a form visible
and want to hide it to get the selection, you have to use
a few tricks to get it to work.

"pschut" wrote in message
news:f0c67e5.-1@WebX.maYIadrTaRb...
> if you use a selection set using AutoLisp (Visual Lisp) and you select
items and still in selection mode you use the PAN or ZOOM command the
selection is still alive and highlighted and ready for more items in the
selection.
> Why is it that if i do this in VB or VBA i lose the selection.
>
>
0 Likes
Message 4 of 4

Anonymous
Not applicable
Thanks Tony.

I know I've seen that solution probably twenty times, but for some reason I
keep forgetting it.

Chuck


"Tony Tanzillo" wrote in message
news:09E53C454EE66ECA9A3551BB7A680044@in.WebX.maYIadrTaRb...
> In VBA you can start your macro with this:
>
> (vl-load-com)
>
> (defun C:VBARUNEX ()
> (vla-runmacro (vlax-get-acad-object) (getstring "\nMacro: "))
> (princ)
> )
>
> This will work provided you're not getting the selection
> set while your form is hidden. If you have a form visible
> and want to hide it to get the selection, you have to use
> a few tricks to get it to work.
>
> "pschut" wrote in message
> news:f0c67e5.-1@WebX.maYIadrTaRb...
> > if you use a selection set using AutoLisp (Visual Lisp) and you select
> items and still in selection mode you use the PAN or ZOOM command the
> selection is still alive and highlighted and ready for more items in the
> selection.
> > Why is it that if i do this in VB or VBA i lose the selection.
> >
> >
>
>
0 Likes