Writing a Custom Format String

Writing a Custom Format String

Writing a Custom Format String

There may be times when it is necessary to write a custom Format String for use with MUS. If you do not see the name of the your application listed in the Select Format portion of the Format Strings tab you will most likely need to create a custom Format String. The following steps will guide you through this simple process.

Determining Information Needed to Write a Format String

  1. Figure out how the application you are using accepts 2D or 3D data.

    If you were to manually type in XYZ values at the command line or another appropriate area of the application, how do the values need to be formatted? The technical term for this is "delineation". There are four standard types of delineation in MUS - space, comma, tab, and enter.

    Consult the user guide for your software if you are not sure how to delineate your values. This determination is the key to successfully writing a format string.

  2. Determine additional keys needed before or after XYZ values are typed in.

    Some programs require an Enter or tab key to "send" values to the target application. Or, tab keys to correctly change focus between fields for entering XYZ values.

  3. Decide how many decimal points of precision you would like recorded.

    You have the option of specifying to MUS how many numbers past the decimal point you would like to record. Choosing two would mean that values such as 1.23 would be recorded. Choosing three means data would be formatted like this: 1.234.

  4. Decide if you want to have the stylus approach vector (IJK) included.

    With the release of MUS 6.0 you can also include the stylus approach vector, also referred to as IJK, to your format string. To do this, simply add three more value formats to the format string. See Sample Format Strings for an example.

How to Write a Custom Format String

After determining the above you will be ready to write your Custom Format String.

Anatomy of a Format String:



How data is formatted:

Spaces = spacebar key here
Commas = ,
Tabs = \t

Adding keys to the beginning or ending of the string:

Enter = \n
Enter on the numeric portion of the keyboard = \M
Tab = \t

Specifying how many decimal points:
One decimal point of precision = .1f
Two decimal points of precision = .2f
Three decimal points of precision = .3f
And so on…

    • Related Articles

    • Adding a Format String

      Adding a Format String This feature allows users to add custom format strings for applications not currently listed in the Format Strings tab. How to add a Format String: If you do not see the name of your application listed in the Select Format ...
    • Sample Format Strings

      Sample Format Strings Here are some sample Format Strings to use as reference when writing your own: %.2f,%.2f,%.2f Enters XYZ values using 2 decimal points of precision and separates the values with commas. %.3f,%.3f,%.3f Enters XYZ values using 3 ...
    • Additional Help with Custom Format Strings

      Additional Help with Custom Format Strings If you are unsure of how to write a Format String for your application, please feel free to e-mail contactus@revware.net for additional help.
    • Restoring a Format String

      Restoring a Format String This feature allows users to revert back to the preset Format Strings of MUS. Any custom Format Strings a user added are deleted and any Default Format Strings a user deleted are restored. How to Restore Default Format ...
    • About Format Strings

      About Format Strings This feature formats the XYZ data from the MicroScribe properly so that the application you are using is able to accept it. The Target Format Display Field of the main MUS interface shows the format currently selected in the ...