1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
| Quintiq file version 2.0
| #parent: #root
| Method AppendConvertObjectNVT (
| String fromtype,
| String totype,
| NamedValueTree objectnvt,
| output NamedValueTree basenvt_o
| )
| {
| Description: 'Generic method to build object NVT by appending to base NVT, including some conversion of types, if any'
| TextBody:
| [*
| objnv := objectnvt.Root().Child( objectnvt.GetHandle( fromtype ) );
|
| // Below is mainly to convert the handle used in NVT for the objects for easier mapping in Integration editor e.g. from Forecast to IOForecast
| if( fromtype <> totype )
| {
| newobjnv := objectnvt.Root().AddChild( objectnvt.GetHandle( totype ) );
| traverse( objnv.Children(), Elements, childnv )
| {
| childnv.Move( newobjnv, true );
| }
| objnv := newobjnv;
| }
|
| // Append to base NVT
| objnv.Move( basenvt_o.Root(), true );
| *]
| }
|
|