Converting the DBAR File
- Last UpdatedFeb 08, 2023
- 1 minute read
In order to use an existing application, the DBAR file must be converted from the existing format. If the DBAR file contains only PML 1 syntax for creating menu items, the object CONVERTDBAR can be used to create the corresponding add-in object.
To convert an existing DBAR file, create a CONVERTDBAR object with the following parameters:
!convert = object CONVERTDBAR(!module is STRING, !appNameStr is STRING, !outputDir is STRING, !addinFileDir is STRING)
where !module is the name of the module in which the add-in is used, !appNameStr is the name of the application (for example, ‘PIPE’), !outputDir is the directory in which to put the add-in object and !addinFileDir is the directory in which to put the add-in file.
Then run the .convert() method of the object to perform the conversion:
!convert.convert().
This creates the add-in object and corresponding add-in file. Information about the existing application is stored in the %PDMSUI%\module\DFLTS\APPLICATIONS file. This information is read and used to create the add-in file. Therefore, the application being converted must have an entry in the APPLICATIONS file in the current PDMSUI path.