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: 

Issues with programming functional YesNo message box

2 REPLIES 2
SOLVED
Reply
Message 1 of 3
Anonymous
467 Views, 2 Replies

Issues with programming functional YesNo message box

Hello!

i'm trying to program a message box that activates a second rule if  "yes" i selected, and disregards the rule if "No" is selected. so far i have this, but no matter what button i press, it generates the PDF.. what exactly am i missing ?

 

SyntaxEditor Code Snippet

i = MessageBox.Show("Save current drawing as PDF?", "Save as", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button1)
If vbYes Then iLogicVb.RunRule("auto pdf") 
If vbno 
End If

 

2 REPLIES 2
Message 2 of 3
rhasell
in reply to: Anonymous

 

i = MessageBox.Show("Save current drawing as PDF?", "Save as", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button1)
If i=vbYes Then iLogicVb.RunRule("auto pdf") 
If i = vbNo
End If

 

Try this.

 

Reg
2025.1.2
Please Accept as a solution / Kudos
Message 3 of 3
Anonymous
in reply to: rhasell

Completely fixed my issues, thanks !


@rhasell wrote:

 

i = MessageBox.Show("Save current drawing as PDF?", "Save as", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button1)
If i=vbYes Then iLogicVb.RunRule("auto pdf") 
If i = vbNo
End If

 

Try this.

 


 

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

Post to forums  

Autodesk Design & Make Report