Use YES od NO rune to rune a runle

Anonymous

Use YES od NO rune to rune a runle

Anonymous
Not applicable

Hello guys, and thank you for your help from my posts!

 

I have an another problem

 

I need to run a rule, with a messege box, that say "send email, yes or no"

 

Wenn i say "yes", i run the rule, and when" no" than shouldt nothing happend

 

 

0 Likes
Reply
Accepted solutions (1)
566 Views
4 Replies
Replies (4)

MechMachineMan
Advisor
Advisor
Accepted solution

r = MsgBox("Would you like to send an email?", MsgBoxStyle.YesNo, "E-MAIL")

If r = MsgBoxResult.Yes

      'Run Rule here

End if


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

Justin K
Inventor 2018.2.3, Build 227 | Excel 2013+ VBA
ERP/CAD Communication | Custom Scripting
Machine Design | Process Optimization


iLogic/Inventor API: Autodesk Online Help | API Shortcut In Google Chrome | iLogic API Documentation
Vb.Net/VBA Programming: MSDN | Stackoverflow | Excel Object Model
Inventor API/VBA/Vb.Net Learning Resources: Forum Thread

Sample Solutions:Debugging in iLogic ( and Batch PDF Export Sample ) | API HasSaveCopyAs Issues |
BOM Export & Column Reorder | Reorient Skewed Part | Add Internal Profile Dogbones |
Run iLogic From VBA | Batch File Renaming| Continuous Pick/Rename Objects

Local Help: %PUBLIC%\Documents\Autodesk\Inventor 2018\Local Help

Ideas: Dockable/Customizable Property Browser | Section Line API/Thread Feature in Assembly/PartsList API Static Cells | Fourth BOM Type
0 Likes

Anonymous
Not applicable

thaks for ypur reply

 

now i hane a message box and this rule:

 

question = MessageBox.Show("Wollen Sie die Glashalter und das Glas per Email versenden", "iLogic Question",MessageBoxButtons.YesNo,MessageBoxIcon.Question)
If question = vbYes Then
iLogicVb.RunRule("Email versand Glashalter")
End If

If param_val = Parameter("Mittel_Fosten_2")=0 Then
iLogicVb.RunRule("Email versand Glas")
Else
iLogicVb.RunRule("Email versand wenn Mittelfosten vorhanden ist")
End If

 

When I say yes, i run two rules and bekomme two windows, but when i hit NO than the window (rule) "Email versand Glashalter" ist closed and one is still open. What can i du, to close it both?

0 Likes

MechMachineMan
Advisor
Advisor

Uh. Put both of them in your initial if statement?


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

Justin K
Inventor 2018.2.3, Build 227 | Excel 2013+ VBA
ERP/CAD Communication | Custom Scripting
Machine Design | Process Optimization


iLogic/Inventor API: Autodesk Online Help | API Shortcut In Google Chrome | iLogic API Documentation
Vb.Net/VBA Programming: MSDN | Stackoverflow | Excel Object Model
Inventor API/VBA/Vb.Net Learning Resources: Forum Thread

Sample Solutions:Debugging in iLogic ( and Batch PDF Export Sample ) | API HasSaveCopyAs Issues |
BOM Export & Column Reorder | Reorient Skewed Part | Add Internal Profile Dogbones |
Run iLogic From VBA | Batch File Renaming| Continuous Pick/Rename Objects

Local Help: %PUBLIC%\Documents\Autodesk\Inventor 2018\Local Help

Ideas: Dockable/Customizable Property Browser | Section Line API/Thread Feature in Assembly/PartsList API Static Cells | Fourth BOM Type
0 Likes

Anonymous
Not applicable

whats wrong with the code?

 

0 Likes