question

Axel Kohonen avatar image
1 Like"
Axel Kohonen asked Phil BoBo commented

Possible to use locale setting in FlexSim?

Hi,

Is it or will it some time in the future be possible to use a locale setting with FlexSim? That is set the decimal separator etc. to the ones used in a certain country? Generally most people have Excel in their local locale so importing and exporting data might need a bit of special handling if FlexSim only uses the American locale.

Thank you!

Kind regards,

Axel

FlexSim 18.2.2
languagedecimal separatorlocale
· 4
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

martin.j avatar image martin.j commented ·

I second this option! A minor war is about to break out in our office evey time I send my colleagues an exported csv file. We cant agree on the format so it has to go through a conversion.

It would be cool if I could choose to use US local settings when exporting even though I have a Scandinavian operating system, and vise versa.

1 Like 1 ·
Phil BoBo avatar image Phil BoBo ♦♦ martin.j commented ·

This is a separate issue from the display locale of the application.

I can add an issue to the dev list to consider adding a global preference for customizing the decimal and thousands separator for CSV import/export instead of always using the system separators.

Excel has an option for customizing the decimal and thousands separators:

In Excel, the option defaults to using the system separators, but you can specify a custom decimal separator and thousands separator if you want. It doesn't let you customize the list separator though; it always uses the system locale's setting for that.

The Excel option also affects the display of numbers in cells and formulas, and I've added an answer below that discusses my concerns with doing that in FlexSim.

1 Like 1 ·
separators.png (41.9 KiB)
Axel Kohonen avatar image Axel Kohonen Phil BoBo ♦♦ commented ·

Hi @phil.bobo and @martin.jensen

Thank you for the answers/comments.

For me the important thing would be to be able to set the import/export settings as you suggest. Then I could match the Finnish locale in FlexSim and import and export would work without having to change in the locale in Excel. Editing the locale in Excel is not a problem for me, but every time someone else uses a model/Excel made by me then they need to set the same custom settings for it to work. And within some organisations the user themselves cannot even do this, but they need to contact IT and so on.

Inside FlexSim it works fine for me to leave FlexSim as it is.

Kind regards,

Axel

0 Likes 0 ·
Show more comments

1 Answer

Phil BoBo avatar image
1 Like"
Phil BoBo answered Axel Kohonen commented

The external communication mechanisms in FlexSim already have special handling for the system's locale settings. That's not a problem.

The main concern with doing this is the discrepancy between code and other numbers. Number literals within programming languages are typically not localized. In code, every character has a precise meaning, including periods and commas.

In Excel, there's a clear delineation between formulas and VBA. Formulas and cell text can be displayed in the user's locale setting just fine, but as far as I can tell, VBA is always displayed using the English decimal separator (period).

FlexScript numbers and the FlexScript code editor are embedded all over the FlexSim software, such as the Process Time field.

I think it may be more confusing if we localized the edit fields, tables, and tree view, but not code fields. For example, on an Operator's properties, the Max Speed would be localized but the Load Time would not:

I think it would be more confusing that way than just leaving FlexSim as it is.

I welcome more comments from any users or distributors regarding this subject, especially those who use FlexSim on systems with different decimal, digit grouping, and list separators.

Also, in Excel, the cells store the actual value of the cell using English separators. For example, if you enter "=4,5+5,1" into Excel using German settings, and then you use VBA to get the value of the cell's formula, it returns "=4.5+5.1". This transformation happens transparently to the user, but in FlexSim, getting and setting the actual data directly is more common and this could become another source of confusion if we were able to somehow localize number literals in code windows. It would definitely cause a problem/confusion for executing strings, such as distributions stored in global tables as text data.


· 1
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Axel Kohonen avatar image Axel Kohonen commented ·

Hi @phil.bobo

As said in my comment above, leaving the internals of FlexSim as they are is just fine for me if the import and export works with a custom locale. Someone else might have different view.

And yes VBA seems to always use the English locale regardless of the locale otherwise.

Kind regards,

Axel

0 Likes 0 ·