Correcting Calculations

<< Click to Display Table of Contents >>

Navigation:  PlantExpressTools > How to use > Calculations > Additional Information >

Correcting Calculations

Previous pageReturn to chapter overviewNext page

When loading a project in Plant 3D or PlantDataManager, the calculations will be checked if the file name and the Class Name in the calc file match. There are also cases where a calculation is defined for the same class and property, but with different file names.

The following cases will be considered:

1.A calculation shows a different file name then the class name inside the calc file
For example: File Name = PID-PipeLineGroup-Gasket.calc, Class Name = <ClassName>PipeLines</ClassName>.
 
The class name in the calc file is leading. In this case the file will be backed up to PID-PipeLineGroup-Gasket.calc.bak and then renamed from PID-PipeLineGroup-Gasket.calc to PID-PipeLines-Gasket.calc. The new file name will be adapted in the CalculationConfiguration.Collection.xml. There is also a line in the log file mentioning the renaming.

2.Two calculations with different file names but with the same expression in the calc files exist
For Example: File Name 1 = PID-PipeLineGroup-Gasket.calc, File Name 2 = PID-PipeLines-Gasket.calc,
both use Class Name = <ClassName>PipeLines</ClassName>, and the expression is the same.
 
The class name in the calc file is leading. Since the PID-PipeLines-Gasket.calc is correct, the file PID-PipeLineGroup-Gasket.calc will be backed up to PID-PipeLineGroup-Gasket.calc.bak and then deleted. The file name PID-PipeLineGroup-Gasket.calc will be removed in the CalculationConfiguration.Collection.xml. There is also a line in the log file mentioning the removal.

3.Two calculations with different file names but with different expression in the calc files exist
For Example: File Name 1 = PID-PipeLineGroup-Gasket.calc, File Name 2 = PID-PipeLines-Gasket.calc,
both use Class Name = <ClassName>PipeLines</ClassName>, but expression is different.
 
In this case, the following dialog appears and informs you, that you have to fix the duplicate calculations.
 
Calculations 71
 
In the Calculation dialog you see the double calculations in magenta (the probably wrong calculation) and orange (the probably correct calculation.
 
You also see tool tips with the file name. So you know which line is what calculation. As you can see from the file name it is using PipeLineGroup, but the line in the dialog shows Pipe Line Segments  And therefore the calculation is marked as potentially wrong.
 
Calculations 72
 
In the orange line you see from the file name it is using PipeLines, and the line in the dialog shows Pipe Line Segments  And therefore the calculation is marked as potentially correct.
 
Those two different color make a easier for you to decide which one to delete.
 
Calculations 73
 
After deleting one of the duplicates, the remaining calculation becomes blue.

Next Chapter: Additional Functions