In the festo.cfg file, which is located in the ..\<Version number>\cfg directory, you define the Festo part properties that are to be imported. The assignment of the Festo parts to EPLAN macros or symbols is also done here. You can also define your own assignments for the properties.
The configuration file is divided into different sections: In the "Festo-Settings" section, you define the property assignments. This allows you, for example, to configure how the part numbers are constructed. The "Festo-MacroMapping" section defines the assignment of the macros to the Festo parts.
The following rules apply to editing of the configuration file:
- The maximum size of the file is 400000 bytes (including comments).
- The end of a data line is terminated with \r\n (line break).
- A maximum of 255 operations can be processed on a single data line (+ | - | * | /).
- The data is calculated using the format (String, Double, Long, Bool) supported by the assigned property (i.e., the property to which the values are assigned).
- Only one pair of properties can be compared using the IF condition.
- The following comparison operators may be used in an IF condition: (==; !=; <; >; <=; >=).
- Upper / lower case sensitivity is important when evaluating IF conditions.
- There is no ELSE branch. The configuration file is processed sequentially.
- A Boolean value is defined as follows: 0 = FALSE, >0 = TRUE.
- Comment lines are marked with "; " (; and space).
- A string is defined by "...".
- Placeholders for properties are defined by [#<Property name>].
- You can use the index to access indexed properties.
- Variables are defined by [$<Variable name>]
- The EPLAN display language at the time of import can be queried.
Import mode
In the "DataImportSetting" section of the configuration file, you define the import mode using the following syntax:
ImportMode=<Number>
The import mode defines whether parts overwrite, or are appended to existing data when importing into the EPLAN internal parts management. The following import modes are possible:
- 0 = Append new records only: This is the default behavior. Existing parts remain unchanged. Only new parts that do not currently exist are imported.
- 1 = Update existing records only: Existing parts are overwritten with the new values. New parts are not imported.
- 2 = Update existing records and create new ones: Existing parts are overwritten with the new values. New parts are also imported.
Assign properties
Properties are assigned in the "Festo-Settings" section of the configuration file, according to the following syntax:
<Property number> = "<value>"
Warning:
You should not change the default properties in the "Festo Settings" section, since these are used to ensure that a functioning EPLAN part is created after the import.
22007 = "FESTO"
22008 = "FESTO"
22132 = 1
22135 = 1
22022 = 1
22138 = 2
22041 = 30
22023 = 1
This defines the following properties:
Number |
Name |
Type |
Value |
---|---|---|---|
22007 |
Manufacturer |
String |
FESTO |
22008 |
Supplier |
String |
FESTO |
22132 |
Fluid power trade |
Bool |
1, i.e., check box selected |
22135 |
Trade: Pneumatics |
Bool |
1, i.e., check box selected |
22022 |
Mounting site |
Long |
1, i.e., Mounting panel |
22138 |
Generic product group |
Long |
2, i.e., Fluid |
22041 |
Product group |
Long |
30, i.e., Power units / Plants |
22023 |
Record type |
Long |
1, i.e., Component |
You can define additional properties according to the rules specified above. Since the configuration file is processed sequentially, we recommend that you add your own definitions at the end of the section.
Defining the Festo properties to be imported
The Festo properties to be imported are specified via xDKI–PlaintextName (this is the language-independent name of the Festo property), whereby the name is case-sensitive.
The following Festo part data can be imported:
-
Benennung -
Typ -
VPE -
ME -
KTN -
XHUB -
XHUBMin -
XHUBMax -
PRICE -
TOTALPRICE -
Text -
Prod_Txt -
REMARKS -
Menge -
Teilenummer -
SymbolId.
Placeholders for properties are designated by a preceding "#'" character.
Syntax: [#<Property name>]
For Festo properties: [#<xDKI clear name>]
The following entry imports the contents of the remarks field ("REMARKS" Festo property) into the Description <22009> EPLAN property:
The Type field from Festo is to be imported into the EPLAN Part number field, whereby the part number should begin with the text "FESTO_".
The Type field should also be imported into the EPLAN Order number field but without additional text.
To do this, the following entry is required in the festo.cfg file:
22003 = [#Typ]
Note:
If new Festo properties are added to new Festo product catalogs in the future, then these can also be imported by specifying the corresponding xDKI–PlaintextName.
Indexed properties
It is possible to access indexed properties (e.g., the "Free properties").
Syntax: <EPLAN Property number>.<Index>
The following entry imports the contents of the remarks field ("REMARKS" Festo property) into the EPLAN property Free properties: Description <22146> with Index "1":
Other customization
You can make a number of import customizations in the configuration file. Among others, you can use the following commands and elements for this. Be sure to observe the rules at the beginning of the configuration file.
IF conditions
IF conditions can be used within the assignment file. Only one pair of properties can be compared using the IF condition. Upper / lower case sensitivity is important when evaluating IF conditions. The following comparison operators are available:
- == (equal)
- != (not equal)
- < (less than)
- > (greater than)
- <= (less than or equal)
- >= (greater than or equal).
Hyperlinks
Hyperlinks in the parts data provide access to the Festo website, which contains current documentation and technical data of the parts. On import, hyperlinks are automatically entered into the File / Hyperlink 1 field on the Documents tab of the Parts management module.
Displayed language
You can use the #EPLAN.Lng placeholder to display properties in a particular language. On import, this placeholder is filled with the current display language.
Syntax: long=[#EPLAN.Lng]
Warning:
The display language at the time of import is permanently entered into the properties and is not updated when the display language is changed. The language can only be changed by re-importing the parts with the changed display language. The old parts must be deleted when doing this.
You can also enter a language directly using the lang=<Language> entry (for example lang="en_US").
Variables
10 variables of type "String" are available for temporary storage of values within the configuration (without misusing EPLAN properties for this purpose). Variables are designated by a preceding "$" character.
Syntax: [$EPLAN.Str0] … [$EPLAN.Str9]
The values assigned to variables are only temporarily available during the import, and do not change any values of the Festo part properties to be imported.
The EPLAN.Str0 variable is used in the configuration file to assign an alternative display language that is not offered by the Festo website.
if ([$EPLAN.Str0] == "da_DK") [$EPLAN.Str0] = "en_US"
The first entry stores the value of the current EPLAN display language in the EPLAN.Str0 variable. If the current display language is Danish, then this is changed to English for the import.
In this example, the sales price is calculated based on the purchase price. Since the variables can only be strings, a suitable EPLAN property must be "misused" for the calculation. The $EPLAN.Str1 variable is used to temporarily store the contents of this property and restore it after the calculation. This means that no data is lost.
[$EPLAN.Str1] = 22110
if (22109 > "0") 22110 = 22109 / 100 * 25 + 22109
if (22109 >= "50") 22110 = 22109 / 100 * 15 + 22109
if (22109 >= "100") 22110 = 22109 / 100 * 10 + 22109
22107 = 22110
22110 = [$EPLAN.Str1]
Line 1: The content of the Festo "PRICE" property is stored in the EPLAN property Purchase price/Price unit Currency 1 <22109> .
Line 2: The value of the property Purchase price/price unit Currency 2 <22110> is stored in the $EPLAN.Str1 variable.
Lines 3 to 5: The value of the property Purchase price/price unit Currency 1 <22109> is compared and – depending on the figure – increased by 25%, 15%, or 10%. The new value is stored in the property Purchase price/price unit Currency 2 <22110>.
Line 6: The value of the property Purchase price/price unit Currency 2 <22110> is stored in the property Sales price Currency 1 <22107>.
Line 7: The value stored in the $EPLAN.Str1 variable is written back to the property Purchase price/price unit Currency 2 <22110>.
Assign macros or symbols
Macros or symbols are assigned to the Festo parts in the "Festo-MacroMapping" section of the configuration file, according to the following syntax:
For macros:
if ([#SymbolId] == "<Order number>") 22145 = "<Subdirectory>\<Macro name>.EMA"
or
if ([#SymbolId] == "<Order number>") 22145 = "<Subdirectory>\<Macro name>.EMS"
For symbols:
if ([#SymbolId] == "<Order number>") 22146 = "<Subdirectory>\<Symbol name>.ESY"
if ([#SymbolId] == "00991001") 22145 = "FESTO\P_V_0100.EMS"
if ([#SymbolId] == "00991002") 22145 = "FESTO\P_V_0101.EMS"
...
This assigns the EPLAN Order number <22003> property to the Festo "SymbolId" property; <22145> is the EPLAN Macro property.
See also