Message 1 of 4
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I have rule to create a machine run time which did work well with one exception if your were to hit cancel on the inputbox you get an error :
Error in rule: Stock Sheet Metal Selection List - Test4, in document: CadTalk_Test_3.ipt
Conversion from string "" to type 'Double' is not valid.
I have tried multiple combinations with no success most ending in an endless loop.
The Value for machine run time can't be 0 or nothing
A positive value lets you move on, and cancel can't let you skip to the next rule.
iProperties.Value("Custom", "Operation" & Space(1) & (oOperation) & Space(1) & "Run Time" & Space(1) & (oOperation)) = CObj(InputBox("Enter Machine Run Time" & Space(1) & "(Enter 0 if no value is available)", "Run Time", 0)) If iProperties.Value("Custom", "Operation" & Space(1) & (oOperation) & Space(1) & "Run Time" & Space(1) & (oOperation)) = 0 Or Nothing Then MessageBox.Show("ENTER RUN TIME VALUE", "A VALUE IN THIS FIELD IS REQUIRED", MessageBoxButtons.OK, MessageBoxIcon.Exclamation) GoTo MachineRunTime End If
Solved! Go to Solution.