Page 1 of 1

Unit of measure

Posted: Thu Jun 11, 2020 1:07 am
by jpestell
Hi Everyone,
I have a couple of MIS's sending XML to switch, one in Australia and New Zealand and the other in America. The issue is the unit of measure AU and NZ are metric and using mm the US is imperial and uses inches. My preflights are using Variable Sets to get the size but am unable to figure our how to set a different unit of measure.

Any assistance would be greatly appreciated
Thanks
John

Re: Unit of measure

Posted: Thu Jun 11, 2020 8:19 am
by freddyp
When you define the value of a variable in a Variable Set in Switch and it is a variable of the type "Length" there is an option to define the unit of the value you are extracting from an XML (or from a database). You do not have to worry about the units that you use in PitStop: if the XML contains inches and your PitStop report uses mm, you will see the result in mm; conversions are done automatically.

Re: Unit of measure

Posted: Mon Jun 15, 2020 1:30 am
by jpestell
Hi Freddyp, thanks for your response. Its not the report that's the issue its the preflight itself, it preflighting against size values that Pitstop thinks are mm and are in fact inches so always failing due to size.

Re: Unit of measure

Posted: Mon Jun 15, 2020 4:29 pm
by mkayyyy
Try passing in the unit of measurement after the measurement to your Variable Set.

For example "20 in" and when the Variable Set is evaluated it will convert the value to mm: https://gyazo.com/31bda5031af3946fa8397c5240540c44

Re: Unit of measure

Posted: Mon Jun 29, 2020 3:02 am
by jpestell
thanks @mkayyyy