|
When storing electrical devices into a catalog, an
attribute mapping is automatically performed if:
- The storing catalog is organized in families with keywords
- The electrical devices to be stored have the corresponding attribute
specified in their Properties.
- The property value is strictly equal to the keyword value for the
storage family, together with an identical type (Boolean, integer, etc.).
The system then will automatically set the keyword value equal to the
attribute value.
Before the comparison of the names is done, spaces - blank characters -
at the beginning and at the end of the word are removed, but those
between words are kept.
Else, no keyword mapping is done. |
|
This task explains how to take advantage of this
functionality.
Moreover, with these keywords set in catalogs, you will be
able to perform powerful queries in the catalog browser. |
|
You can use the Demo.catalog to store the electrical
devices.
It is already made up of:
- A chapter: Electrical Devices
- A family: Contacts
|
|
In the Tools > Options... > Equipment & Systems >
Electrical Mapping tab:
Refer to
Mapping
Definition. |
|
-
Open the Demo.catalog.
-
Click Add Family
to add a family of Connectors.
-
Click Add Keyword
to add a keyword
defined as follows:
Name: iswaterproof
Type: Boolean
Default Value: false. |
|
Name: pinnumber
Type: Integer
Default Value: 5 |
|
-
Validate the entries made and save the catalog.
-
Open the document containing the device you want to store
to the catalog:
a jack for example.
-
Select the Edit > Properties... menu item.
The dialog box opens: |
|
-
Click Define other properties...
The Define other properties dialog box
opens.
To do so: |
- Select Boolean in the drop-down list and click
New Parameter of Type.
- Change the name and value:
iswaterproof
and false.
|
Create another property: |
- Select Integer in the drop-down list and click
New Parameter of Type.
- Change the name and value: pinnumber and 5.
|
- Validate the entries made.
The Properties dialog box is updated: |
|
|
- Click OK to validate the added properties.
|
|
The document must be saved before being stored to the
catalog. |
-
Click Store Device
.
-
If need be, click the Browse button to select
the catalog.
Here select Demo.catalog.
-
Select the Connectors family using the combo
list.
The light turns to green.
-
Optional - Select Use
Catalog/Electrical Objects Predefined Mapping, to take advantage of
the mapping previously defined in the Tools > Options....
|
In the Tools > Options... > Equipment & Systems
> Electrical Mapping tab:
- Select
...\online\elbug_C2\samples\Demo.catalog
as the working catalog.
- Define the mapping for the electrical objects:
Connectors mapped to Single Insert Connector type.
Refer to
Mapping Definition. |
|
Note that this option is only available if
electrical behavior has been added to the device reference, and not
to an instance. |
-
Click OK to validate.
The device has been added to the catalog taking into account the
correct keyword values. |
|
-
If you modify the value of a property, then use
Store Device
again, the keyword value is updated in the catalog.
|
|
This mapping is taken into account if there is no mapping to the Part
Number.
Otherwise, the mapping to the Part Number takes priority. |