Home Search

DriveWorks Pro 21
Info: Impacts of Regional Settings

Send Feedback

Info: Impacts of Regional Settings

This topic explains how DriveWorks works with Regional Settings.

Please note regional settings that use a comma (,) as the decimal separator may experience undesirable behavior when running a DriveWorks project.

Two functions have been added to the DriveWorks-SpecificationPowerPack that will help users experiencing this behavior:

It is important to know that, like many other systems, the underlying culture in DriveWorks Software is invariant (does not change); it will use en-US culture (uses the point, full stop or period (.) as the decimal separator).

Known issues

You will find below a non exhaustive list of known issues related to running DriveWorks on a system with regional settings using something different than point decimal separators.

Importing Data

DriveWorks imports data from external applications as strings, the data isn't formatted but is imported as is.

This means that if an external application uses commas as decimal separators, this data will be imported in DriveWorks using commas instead of points.

This can be experienced with:

  • Data queries with the following functions:
    • QueryData
    • QueryDataValues
    • DbQuery
    • DBExecute
  • Creating Tables with:
    • Excel Data Table Document
    • ODBC Data Table Document
    • SQL Server Data Table Document

Exporting Data

DriveWorks can store data into Specifications but also in created files or in databases.

This data can then be used by DriveWorks or by external applications.

It is important to know that if your system is using commas as decimal separators, exporting data using DriveWorks can be affected and may not produce the expected results.

  • Comma separated strings might not be considered as numbers in the following Documents:
    • Text Document
    • BOM Document
    • HTML Email Document
    • Covering Letter
    • Proposal Document
    • Quote Document
    • Quote Document (Français)
    • XML Document (Simple) Document
    • XML Document (Advanced) Document
    • HTML Quotation Letter
    • Email Document
  • Comma separated strings can be automatically converted to dates in the following Documents:
    • Excel Workbook Document
    • Word Document
  • Comma separated strings may be stored as point separated numbers in the following Documents, no matter what the regional settings are:
    • Export to Calculation Table Document
    • Export to Group Table Document
    • Export to Simple Table Document
    • ODBC Data Export
    • SQL Server Data Export

Using Data

DriveWorks can use data stored in Specifications or data from files or databases.

There can be issues if this data is stored with comma separated formatting.

  • Data used inside a Specification:
    • The functions ValueLocal, NumberLocal, StringLocal and DateTimeLocal all expect the arguments to the functions to be in the current culture.
    • All other functions like Value, Number, String and DateTime expect the arguments to the functions to be invariant, effectively stored as en-US culture.
    • Numeric Table functions that operate on stored data, such as Tables attempt to use the data using the current culture number formatting. These functions include for example TableSum, TableMin or TableMax.
  • Data used to drive a SOLIDWORKS Model:
    • Comma separators will be ignored when driving models, so driving a dimension with the string "1,1" will result in this dimension being driven to 11.

Recommendations

Care must be taken when running DriveWorks in non-English cultures to ensure you have considered number formats.

We would recommend making sure that static imported data is converted using point decimal separators when possible, as this will eliminate the need to convert numbers each time they are used.

Then you can use functions like NumberLocal to display values on your Forms or in Documents using your regional settings number formatting.

Unfortunately, regarding dynamic data such as queried data, there are no built-in solutions to convert the number formatting and you may encounter problems.

Another thing to keep in mind is that exporting numbers to an existing DriveWorks Table containing comma separated values will export them as point separated numbers, so you may end up with inconsistencies in number formatting.

Using the DriveWorks Specification Power Pack

Two functions are included in the DriveWorks Specification Power Pack:

These functions allow numbers to be converted from one culture to another. They can be used to convert comma separated values to point separated values in order to perform DriveWorks calculations, drive models or export documents but can also be used to display values in specific cultures formatting.

These functions can be used in the scenarios described above.

The functions SppConvertNumberCulture and SppConvertNumberCultureInTable can be found in the DriveWorks-SpecificationPowerPack starting from version 15.0.0.15.