Skip to content
  • There are no suggestions because the search field is empty.

How do I create and use a Symbol Factory .NET Configuration File?

I need to make some changes to the default operation of Symbol Factory .NET. To this end, I know I need to create a Symbol Factory .NET Configuration file. How do I go about doing this, and how do I use it with my project?

By using a special Symbol Factory .NET Configuration File, you can change some of the default settings that affect the design-time usage of the Symbol Factory .NET.

How the Configuration File is Used

Symbol Factory .NET uses a special "Config" file (that is, a ".config" file) to control the default settings. This file contains XML formatted data which assigns values to the settings specified.

This FAQ doesn't cover how to correctly format nor create XML data. For that, please reference the numerous books and articles available on the web.

To create and use the file, follow this procedure:

  1. Create the Symbol Factory .NET Configuration File
  2. Edit the Configuration File and change any settings you need
  3. Save the Configuration File, and restart your Visual Studio Project
  4. Deploying the Configuration File

You can also get a listing of Available Configuration Items.

Creating the Symbol Factory .NET Configuration File.

As the file is simply an XML file ("eXtensible Markup Language"), this configuration file is a text file, so open up your favorite text editor (like Notepad), and type in the following:

<?xml version="1.0" encoding="utf-8"?>
<SymbolConfig
  xmlns:xsd="http://www.w3.org/2001/XMLSchema"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <Items>
    <!-- Configuration settings go here -->
  </Items>
</SymbolConfig>

You can now save the configuration file, if you wish. Please see the section on Saving the Configuration File for more details.

Edit the Configuration File

Now that you have the configuration file created, you can add configuration items to it. Here are the rules for creating and editing configuration items:

  1. All configuration items belong in the "<Items>" group.
    <?xml version="1.0" encoding="utf-8"?>
    <SymbolConfig
      xmlns:xsd="http://www.w3.org/2001/XMLSchema"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
      <Items>
        <!-- Configuration settings go here -->
      </Items>
    </SymbolConfig>
    Any listing of configuration items you have for Symbol Factory .NET must first be under a group called <Items>, and there can only be one <Items> group per file.
  2. Each configuration item must use the following format:
    <ConfigItems>
      <ItemID>Configuration Item Name</ItemID>
      <Value>Value For The Item</Value>
    </ConfigItems>
    ...where <ConfigItems> begins the declaration, <ItemID> is the name of the configuration setting, and <Value> is the value associated with the configuration item. For a listing of different configuration items, see the section entitled "Available Configuration Items".

    A complete, single item configuration file will now look like this:
    <?xml version="1.0" encoding="utf-8"?>
    <SymbolConfig
      xmlns:xsd="http://www.w3.org/2001/XMLSchema"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
      <Items>
        <ConfigItems>
          <ItemID>ConfigItem</ItemID>
          <Value>ConfigValue</Value>
        </ConfigItems>
      </Items>
    </SymbolConfig>
  3. You can combine multiple items under one "<Items>" group, but only one configuration item can be under a single "<ConfigItems>".
    For example, the following is a valid configuration file because multiple items have been listed under <Items>, but only one item per <ConfigItems> section.
    <?xml version="1.0" encoding="utf-8"?>
    <SymbolConfig
      xmlns:xsd="http://www.w3.org/2001/XMLSchema"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
      <Items>
        <ConfigItems>
          <ItemID>ConfigItem1</ItemID>
          <Value>ConfigValue1</Value>
        </ConfigItems>
        <ConfigItems>
          <ItemID>ConfigItem2</ItemID>
          <Value>ConfigValue2</Value>
        </ConfigItems>
      </Items>
    </SymbolConfig>
    However, the following is not valid because there are multiple items defined for a single <ConfigItems>:
    <?xml version="1.0" encoding="utf-8"?>
    <SymbolConfig
      xmlns:xsd="http://www.w3.org/2001/XMLSchema"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
      <Items>
        <ConfigItems>
          <ItemID>ConfigItem1</ItemID>
          <Value>ConfigValue1</Value>
          <ItemID>ConfigItem2</ItemID> <!-- Not Valid!! -->
          <Value>ConfigValue2</Value> <!-- Not Valid!! -->
        </ConfigItems>
      </Items>
    </SymbolConfig>

     

Saving the Configuration File

Finally, save your file as the file name "SymbolFactoryDotNet.Config", and save it to the directory in which the DLLs for the current Symbol Factory .NET build are located. For example, if the version of the Symbol Factory for which you are working is 2.0.0.217, then the directory to which you save the file will be "C:\Program Files\Software Toolbox\Symbol Factory .NET\2.0.0.217" (this, of course, assumes you took all the defaults when installing your Symbol Factory .NET).

Your final directory may vary based upon the version number you have installed.

Deploying the Configuration File

Some of the settings are not needed when deploying your application, while others are. If you use at least one setting that must be deployed (see Available Configuration Items for more details), then you will need to deploy the configuration file.

Luckily, runtime deployment is very simple. Copy the "SymbolFactoryDotNet.config" file to the safe directory as the Symbol Factory .NET DLLs are located. Normally, this will be the same directory where your executable file resides. Once copied, then any of the settings that affect runtime deployment will take effect.

Available Configuration Items

Here is a listing of available configuration items for the Symbol Factory .NET. Please see the Symbol Factory .NET Help File for a complete and up-to-date list.

Special Runtime Deployment Directions: Each item will be marked with a section called "Needed for Runtime Deployment?". If the answer to this is "Yes", then you will need to Deploy your Configuration File.

Item Description

DefaultBackStyle

Changes the default "BackStyle" of any new symbol placed upon a form, which controls the coloring of the background for that symbol.

Needed for Runtime Deployment? No.

Possible Values:

Value Description
Opaque (default) Color the background of the symbol with the background color specified in the control.
Transparent The background of the symbol is transparent.

Usage:

<ConfigItems>
  <ItemID>DefaultBackStyle</ItemID>
 <Value>Transparent</Value>
</ConfigItems>
RotateFlipOrder

Changes the order in which the control is Rotated and Flipped when both of these properties are set.

Needed for Runtime Deployment? Yes.

Possible Values:

Value Description
RotateFirst The symbol is first rotated then flipped.
Any Other Setting (Default) The symbol is first flipped then rotated.

Usage:

<ConfigItems>
  <ItemID>RotateFlipOrder</ItemID>
  <Value>RotateFirst</Value>
</ConfigItems>