Message 1 of 6

Not applicable
09-05-2016
02:29 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I have declared some variables as inventor parameters like so:
Dim OffsetLeft As Inventor.Parameter = oParams.Item("offsetleft")
Dim OffsetRight As Inventor.Parameter = oParams.Item("offsetright")
Dim ISX As Inventor.Parameter = oParams.Item("isx)
Then a little later I use them in this equation, which is where I get the error "Conversion from string "17.5 mm" to type 'Double' is not valid.
ISX.Expression = (CaseWidth - OffsetLeft.Expression - OffsetRight.Expression - 4) / BayNumberX
17.5 mm being the value of OffsetLeft and OffsetRight. The other parameters are numerical User Parameters.
Do I need to convert OffsetLeft and OffsetRight to numerical values? If so, how do I do it?
Solved! Go to Solution.