Announcements
Due to scheduled maintenance, the Autodesk Community will be inaccessible from 10:00PM PDT on Oct 16th for approximately 1 hour. We appreciate your patience during this time.
Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to repeat iLogic rule without clicking "run"

2 REPLIES 2
SOLVED
Reply
Message 1 of 3
Jason.Rugg
922 Views, 2 Replies

How to repeat iLogic rule without clicking "run"

I have an external iLogic rule that I use quite often, when the rule runs I am prompted to make two selections and the rule finishes based on those selections. If I want to repeat the rule I right click on the rule and run it again. Is there a way to run it and repeat it until I am finished using it?

2 REPLIES 2
Message 2 of 3
JelteDeJong
in reply to: Jason.Rugg

you can put your code in a loop. And ask the user if he wants to continue. this could be done like this:

Do
    '' put your code here.....
    MessageBox.Show("Random number: " & Rnd()) '<-- example

    If (MessageBox.Show("Do you want to continue?", "Continue", MessageBoxButtons.YesNo) = DialogResult.No) Then
        Exit Do
    End If
Loop

depending on your rule its maby also possible to stop the loop on other conditions. for example you can check if the user selected something if not then you can exit the loop.

Jelte de Jong
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature


Blog: hjalte.nl - github.com

Message 3 of 3
Jason.Rugg
in reply to: JelteDeJong

With some modification this will work for me. Thank you.

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

Post to forums  

Autodesk Design & Make Report