Unit of measure

Post Reply
jpestell
Newbie
Posts: 4
Joined: Tue May 16, 2017 11:24 am

Unit of measure

Post by jpestell » Thu Jun 11, 2020 1:07 am

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

freddyp
Advanced member
Posts: 495
Joined: Thu Feb 09, 2012 3:53 pm

Re: Unit of measure

Post by freddyp » Thu Jun 11, 2020 8:19 am

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.

jpestell
Newbie
Posts: 4
Joined: Tue May 16, 2017 11:24 am

Re: Unit of measure

Post by jpestell » Mon Jun 15, 2020 1:30 am

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.

mkayyyy
Member
Posts: 26
Joined: Mon Nov 21, 2016 6:31 pm
Location: UK

Re: Unit of measure

Post by mkayyyy » Mon Jun 15, 2020 4:29 pm

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

jpestell
Newbie
Posts: 4
Joined: Tue May 16, 2017 11:24 am

Re: Unit of measure

Post by jpestell » Mon Jun 29, 2020 3:02 am

thanks @mkayyyy

Post Reply