Autodesk Inventor
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
iLogic. Define next action based on OK or Cancel Button from Message Box
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Hi I have created a size rule which first fires a warning message with an option of selecting ok or cancel.
I would like the ok option to then set the model to the min allowable value as specified in my code, however, if the user chooses Cancel that portion of the rule must not run and the size parameter which was changed resulting in the firing of the messagebox should be set back to what it was.
Thanks
If TEDCD - 7 < TECID Then
MessageBox.Show("Endcap and Energy Diffuser Ring DS8 non-conformance. Select OK to automatically reset the Energy Diffuser Ring Ø to the minimum allowable value or CANCEL to go back and select a smaller Endcap ID.", "Energy Diffuser Ring Warning", MessageBoxButtons.OKCancel, MessageBoxIcon.Warning, MessageBoxDefaultButton.Button1)
End If
If TEDCD - 7 < TECID Then
TEDCD = TECID + 7
End If
Solved! Go to Solution.
Re: iLogic. Define next action based on OK or Cancel Button from Message Box
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Hi wseaston,
You might consider using a Yes/No message to gather an answer from the user, rather than the default OK/Cancel message. If you combine this with a variable to capture the current state of the parameter, before the user changes it, then you can recall that value to use later in the rule if the user choose the No option.
I've provided a sample rule here:
http://inventortrenches.blogspot.com/2011/03/using
This is just one approach, but I think the use of Yes/No buttons will help you with this rule.
Best of luck to you in all of your iLogic and Inventor pursuits,
Curtis
http://inventortrenches.blogspot.com/

Did you find this reply helpful ? If so please use the Accept as Solution or Kudos button below.
