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-how to make an error message using numaric parameter
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
I have a text parameter "ARM_TYPE" that kicks out a numaric parameter "ARM_ANGLE" through an ilogic rule. My problem is i need to have the rule kickout an error when (ARM_TYPE= "none"). I can do this by changing the "ARM_ANGLE" parameter from a Numaric to Text format (see below). The problem here is that "ARM_ANGLE" is used in several more ilogic rule calculations generating other parameter values which also need to kick out an "error"
I hope this makes sense
Thanks for the help,
Steve
If Parameter("ARM_TYPE") = "A995" Then
Parameter("ARM_ANGLE") = -12
ElseIf Parameter("ARM_TYPE") = "A1023" Then
Parameter("ARM_ANGLE") = -3.7
ElseIf Parameter("ARM_TYPE") = "A1081" Then
Parameter("ARM_ANGLE") = -44.1
ElseIf Parameter("ARM_TYPE") = "NONE" Then
Parameter("ARM_ANGLE") = "####"
End If
Solved! Go to Solution.
Re: ilogic-how to make an error message using numaric parameter
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
I hope i understand your question correctly, here is some code you can try.
I changed your if's to a select case. For me this works easier.
Select Case Parameter("ARM_TYPE")
Case "A995"
Parameter("ARM_ANGLE") = -12
Case "A1023"
Parameter("ARM_ANGLE") = -3.7
Case "A1081"
Parameter("ARM_ANGLE") = -44.1
Case "NONE"
'if ARM_TYPE IS NONE then show messagebox with an warning message
MessageBox.Show("ARM_TYPE = NONE", "Error text",MessageBoxButtons.OK,MessageBoxIcon.Warning)
'this is some extra code to choose an other arm_length value
Parameter("ARM_TYPE") = InputListBox("Prompt", MultiValue.List("ARM_TYPE"), Parameter("ARM_TYPE"), Title := "Title", ListName := "List")
End Select
If you need more help, let me know.
Rob.
Software in use: Inventor 2013, SolidWorks 2011
Also experience with: Solid Edge untill ST4,
Re: ilogic-how to make an error message using numeric parameter
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Rob thanks for the help. I need the parameter "ARM_ANGLE" to read a non numeric value such as #### or show an empty box. I have other parameters that use the "ARM_ANGLE" to calculate their values such as the "WELD_ANGLE" which also need to show #### or an empty box if no arm is selected or no value for "ARM_ANGLE" is entered.
I think I can do this by changing all the parameters to a text format instead of numeric.
I did like the idea of a message box but I can have it ask to enter an "ARM_ANGLE" value.
Thanks again for the help,
Steve
