Inventor Customization

Reply
*Keller, Kent
Message 1 of 5 (93 Views)

Selection Loops

93 Views, 4 Replies
05-13-2003 07:45 AM
I have three buttons

Button 1 starts a selection loop. When something is selected it is closed and button 2
gets selected automatically

Button 2 starts a selection loop. When something is selected it does something inside of
a transaction so it can be undone and redone.

Button 3 starts a loop that in itself starts a selection loop. Multiple picks are
processed individually.

At this point I want to be able to go through the buttons in order again.

Press button 1, and it automatically starts button one loop from button 3's do events
selection loop.

Press button 2, and it runs button 2's selection loop. When something is selected button
3's loops finish which causes the variable I set in button 2's selection to be lost

That isn't normally a problem, unless I use the transaction to undo the things that were
done with button 2's selection and put them back together with a different variable. It
fails because the variable set in the button 2 selection pick has been lost.

Between button 3 and Button 1 I need to kill the do loops that are active in button 3, but
can't seem to figure out how.

Or am I going about this all wrong?

PS If it sounds confusing here, you ought to see it in my code. LOL.

--
Kent
Assistant Moderator
Autodesk Discussion Forum Moderator Program
*Thompson, Ed
Message 2 of 5 (93 Views)

Re: Selection Loops

05-13-2003 10:59 AM in reply to: *Keller, Kent
Kent,

Wow! I can't imagine what you are attempting to do, and it seems like too
obvious of a question, but is the variable that is being lost a global
variable? One thing that you could try is to place a text box on the form
and load and unload the box. That way you can watch there results as the
different buttons are being pressed.

Hope this helps

EdT

"Kent Keller" wrote in message
news:CD1C84C771E1A4D26B898E6BC51BE61F@in.WebX.maYIadrTaRb...
> I have three buttons
>
> Button 1 starts a selection loop. When something is selected it is closed
and button 2
> gets selected automatically
>
> Button 2 starts a selection loop. When something is selected it does
something inside of
> a transaction so it can be undone and redone.
>
> Button 3 starts a loop that in itself starts a selection loop. Multiple
picks are
> processed individually.
>
> At this point I want to be able to go through the buttons in order again.
>
> Press button 1, and it automatically starts button one loop from button
3's do events
> selection loop.
>
> Press button 2, and it runs button 2's selection loop. When something is
selected button
> 3's loops finish which causes the variable I set in button 2's selection
to be lost
>
> That isn't normally a problem, unless I use the transaction to undo the
things that were
> done with button 2's selection and put them back together with a different
variable. It
> fails because the variable set in the button 2 selection pick has been
lost.
>
> Between button 3 and Button 1 I need to kill the do loops that are active
in button 3, but
> can't seem to figure out how.
>
> Or am I going about this all wrong?
>
> PS If it sounds confusing here, you ought to see it in my code. LOL.
>
> --
> Kent
> Assistant Moderator
> Autodesk Discussion Forum Moderator Program
>
>
>
*Dotson, Sean
Message 3 of 5 (93 Views)

Re: Selection Loops

05-13-2003 08:20 PM in reply to: *Keller, Kent
I'm going to tag onto Kent's post here and ask if anyone has a very simple
example of how to *interactively* select multiple objects, sketches etc..
(with a filter) and then pass this collection to a sub for processing.

Kent has looked at my code and I think we are kind of on the same page.
Kent has gotten his to work further than mine but maybe there is a
straightforward example that will help up both...?

thread...>

--
Sean Dotson, PE
http://www.sdotson.com
Check the Inventor FAQ for most common questions
www.sdotson.com/faq.html
----------------------------------------------------------------------------
------
"Kent Keller" wrote in message
news:CD1C84C771E1A4D26B898E6BC51BE61F@in.WebX.maYIadrTaRb...
> I have three buttons
>
> Button 1 starts a selection loop. When something is selected it is closed
and button 2
> gets selected automatically
>
> Button 2 starts a selection loop. When something is selected it does
something inside of
> a transaction so it can be undone and redone.
>
> Button 3 starts a loop that in itself starts a selection loop. Multiple
picks are
> processed individually.
>
> At this point I want to be able to go through the buttons in order again.
>
> Press button 1, and it automatically starts button one loop from button
3's do events
> selection loop.
>
> Press button 2, and it runs button 2's selection loop. When something is
selected button
> 3's loops finish which causes the variable I set in button 2's selection
to be lost
>
> That isn't normally a problem, unless I use the transaction to undo the
things that were
> done with button 2's selection and put them back together with a different
variable. It
> fails because the variable set in the button 2 selection pick has been
lost.
>
> Between button 3 and Button 1 I need to kill the do loops that are active
in button 3, but
> can't seem to figure out how.
>
> Or am I going about this all wrong?
>
> PS If it sounds confusing here, you ought to see it in my code. LOL.
>
> --
> Kent
> Assistant Moderator
> Autodesk Discussion Forum Moderator Program
>
>
>
*Keller, Kent
Message 4 of 5 (93 Views)

Re:

05-14-2003 02:06 AM in reply to: *Keller, Kent
Sean

I kind of figured you would tack on 8^) I was going to ask about yours also, but figured
you could do it if you wanted.

The basic question is .... is there any way to kill a selection loop (the standard
clsSelect class module) before a new selection loop is started without resorting to a
button or something that does nothing but kill it.


Ed

Thanks for the response. Yes it is a global variable. Wish it was that simple. (It
probably is that simple but I am just to dense to see the answer)



--
Kent
Assistant Moderator
Autodesk Discussion Forum Moderator Program


"Sean Dotson" wrote in message

> > thread...>
*Thompson, Ed
Message 5 of 5 (93 Views)

Re:

05-14-2003 03:26 AM in reply to: *Keller, Kent
Ohhh, I think that I see what the question is...:-)

This "continuous" loop issue is kind of a classic problem. Similar
questions came up in ACAD on a number of occasions. If a command was ran
one time, (if it were a copy, move, select or whatever) the operator would
have to keep reinitiating the command. The alternative was for the command
to keep recycling through. But, then the operator had to make some action
that would stop the operation. ACAD essentially provided the option to do a
single command or to perform it multiple times, which is essentially two
different commands. But, when the multiple command was selected, a third
"button" was require to exit the operation. "Escape", "Right mouse click",
or a button is probably going to be needed to stop they "multiple"
selections.

I hope this is what the real question is.

EdT


"Kent Keller" wrote in message
news:1CF32041BC77E4FFEA3055B55043FFAB@in.WebX.maYIadrTaRb...
> Sean
>
> I kind of figured you would tack on 8^) I was going to ask about yours
also, but figured
> you could do it if you wanted.
>
> The basic question is .... is there any way to kill a selection loop (the
standard
> clsSelect class module) before a new selection loop is started without
resorting to a
> button or something that does nothing but kill it.
>
>
> Ed
>
> Thanks for the response. Yes it is a global variable. Wish it was that
simple. (It
> probably is that simple but I am just to dense to see the answer)
>
>
>
> --
> Kent
> Assistant Moderator
> Autodesk Discussion Forum Moderator Program
>
>
> "Sean Dotson" wrote in message
>
> > your
> > thread...>
>
>
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 or visit the Installation and Licensing Forum to get help installing your software.