![](../icons_C2/common/atarget.gif) |
This task shows
how to compare the V4 and V5
classes and attributes. This task should be performed after you
have exported the V4 project registration model and the V5 feature
dictionary. |
![](../icons_C2/common/ainfo.gif) |
Your goal is to have a mapping
table that shows the V4 classes and attributes you want to import and
their corresponding V5 classes and attributes. Once you have converted and
exported the V4 and V5 classes and attributes, the two must be compared to
determine which ones do not exist in V5. This is done by a tool developed
for the purpose. Once you have run this tool it will produce three files
which tell you: which classes have problems (do not exist in the mapping
table or the XML file of V5 classes), which classes need to be added to V5
and an overall report of what the tool has performed.
This step is not needed if you did
not define new classes and attributes in V4.
Before you begin this process you must set the directory path - this
tells the tool the directory path in your installation. Open a command
prompt and move to the directory intel_a\code\bin.
- In Windows, press Enter after typing: set AECMIGR_DIRECTORYPATH=
XXX\startup\EquipmentandSystems\MigrationDirectory where XXX is
the directory path to your installation.
- Do the same in Unix, but replace "set" with
"export".
- The user can check the current path by executing the comparator, or
executing CATAecDictionaryComparator -h. The comparator will show the
path as the first line of output.
|
|
1. |
To run the tool open a
command prompt, change to the directory ...intel_a\code\bin, and enter the
following: CATAecDictionaryComparator -i (V4file) (V5file) -m (name
of mapping table) -o (name for output)
Where:
- (V4file) is the XML file which
contains the V4 classes. It must include the XML extension.
- (V5file) is the XML file which
contains the V5 classes. It must include the XML extension.
- (name of mapping
table) is the name of the mapping table against which you want to
compare. The default mapping table provided with this application is
V4ToV5ObjectMapping.csv. You must include the .csv extension. The
mapping table is in the following directory: intel_a\startup\EquipmentAndSystems\MigrationDiretory\Dictionary\Mapping
Table.
- (name for output) is the name
for the three output files. If you enter the name MAR, for instance,
then three files will be produced: MAR.html, MAR.xml and MAR.csv.
An entry may look like this: CATAecDictionaryComparator
-i Preg_ALL.xml catpiping.xml -m V4toV5ObjectMapping.csv -o MAR |
|
2. |
When the tool (called Comparator) has finished running it
will produce three reports and place them in the following directories:
XML and CSV files in intel_a\startup\EquipmentandSystems\MigrationDirectory\Dictionary\DDL_Files
and the HTML file in ...\Reports.
Open the HTML file in a Web browser to see a full report. The
report begins with a table of contents that is hyperlinked to the entries.
(The names in parentheses are internal names.) The entries in the report
are color coded as follows:
- Green: No action was taken. The V4 class appears in the mapping
table and the XML file of V5 classes.
- Blue: The V4 class appears in the mapping table, but not in the V5
XML file.
- Red: The V4 class was not found in the mapping table or V5 XML file.
- Orange: V5 mapping does not exist in the mapping table ("no
mapping"), or is badly mapped.
![](images/AT0804A_NLS.gif)
|
|
3. |
Open the XML file (using a text editor like Wordpad) to see
a list of the classes that do not exist in the V5 feature dictionaries and
can be imported.
<Class
Name="PipingPartFunc"
DisplayName="Piping Part Function"
Superclass="Component_Function"
Creator="System"
Domain="PIP"
UUID="b7acacd1_83_3a707981_10"> |
|
4. |
Open the CSV file using Microsoft Excel. It will look
similar to the image below, except that it will not have the entries shown
in the first line (shaded red).
![](images/AT0804B_NLS.gif)
In the first three columns this table displays existing classes in V4.
You should fill in the 4th, 5th and 6th columns with whatever you
want the corresponding entry to be in V5. In column 7 you should enter the
domain, or application. (PIP=Piping Design, PID= Piping and
Instrumentation Diagrams, EQT= Equipment Design, HVA=HVAC Design, etc.)
An asterisk in the Attribute column indicates that the entry is a
class. If it has attributes then the lines that follow it will list the
attributes under the same class name. In the example above, Line 2 shows a
class. Lines 3, 4 and 5 show that the entries are attributes of the class
Piping Line and are called Size, Part Description and Design Speed.
NOTE: V5 entries should refer to the internal name of the class
or parent. The internal name is the name within the application and is not
the one the user sees. Frequently it is similar, though, and the class
name Piping Line may have the internal name PipingLine. You can find the
internal name by looking at the V5 XML file where it's referred to as Name
and Superclass. |
|
5. |
Once you have entered the information you need to copy and
paste it into the mapping table - in the current example it is V4ToV5ObjectMapping.csv,
found in intel_a\startup\EquipmentandSystems\MigrationDirectory\Dictionary\MappingTable.
However, you should not directly modify the table the table with the .csv
extension. In this same directory you will find a table with the same
name but with the extension .xls. Modify this table, save it, and then
save it again as a .csv file also. It is faster for this application to
read .csv files.
![](images/AT0804C_NLS.gif)
|
|
6. |
If you have V4 classes and attributes that do not have
equivalent classes and attributes in V5 then you must repeat the steps
explained in Importing the XML Output.
You can repeat these steps as many times as you want - until you are
satisfied that your mapping table has all the V4 classes and attributes
you want and the corresponding V5 classes and attributes. |
![](../icons_C2/common/aendtask.gif)
|