Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

Hull and Outfitting

Customize Using PML Variables

  • Last UpdatedNov 07, 2025
  • 8 minute read

You can set PML variables to customize. They are set in the file called bocuserdata.pmlfnc found in the bocad\dflts\user\bocpml\functions folder in the user data area of the application.

The template user modifiable function bocuserdata.pmlfnc is found in bocad\dflts\user\bocpml\functions

If you customize the AVEVA Bocad Steel Interface forms, you must reload the base product's user interface from macros in order to rebuild it. If the user changes variables in the user data area, the user can use the Re-initialize option on the main Import or Export forms.

Alternatively, you may reload the AVEVA Bocad Steel Interface system variables and rebuild the forms using the following command, after the user have saved the bocuserdata.pmlfnc file:

call !!bocImpExp( )

However, if you find that the user interface forms are damaged, reload the UI from macros. A typical message indicating this condition might be:

Object does not have a member .targetlist

Note:
You must also load the AVEVA Bocad Steel Interface UI from macros if the user make any changes to the internal mapping files

Color Code

The user can change the colours of the objects on the screen using the variables listed below. If the user wants to change them, the list of colour numbers is given in the Model Reference Manual. The default settings are:

!!bocColChanged     = ( 12 )  $* Mauve

!!bocColAdded       = ( 5 )   $* Green

!!bocColDuplicate   = ( 6 )   $* Cyan

!!bocColDeleted     = ( 2 )   $* Red

!!bocColExported    = ( 3 )   $* Orange

!!bocColDefault     = ( 1 )   $* Grey

The duplicate colour is used when the import system searches for items with duplicated mark numbers.

Tolerance Settings

You can modify the distance tolerance (the separation, in millimeters, below which two points are considered coincident), the minimum Plate thickness, and the minimum length of Linear Members. The minimum tolerance is used as a fine tolerance value in vector comparisons, such as for angles.

-- Set distance tolerance

!!bocDistTol        = ( 1 )

!!bocMinTol         = ( 0.01 )

Waiting Time

The system wait time represents a unit of time which the application will wait while the external program is executing. If there is no response within this time, the application may assume that the external program has stopped for some reason. This may not be the case - it may just be working hard! The user will be asked whether they want to wait for another unit period. This variable is nominally measured in seconds, but it is also dependent on how busy the computer is on other tasks as well.

-- Set wait time

!!bocWaitTime      = ( 10 )

!!bocNoOfTries     = ( 5 )

There is also a variable, !!bocNoOfTries, which is used to determine how many iterations of the waiting loop the application goes through before prompting the user for further information.

Ignore Material Flag

You can choose to ignore any errors caused by different material mappings by using this flag. What this means is that on comparing the original model with the imported model, any difference in material is not raised as an error.

-- Ignore Material changes

!!BOCIgnoreMatl  = false

External Mapping File Separator

The separator character for the external mapping files may be either a space or a comma. Using the variables below, the user can indicate their choice.

Note:
All the files of the same type (either Material, Orientation or Profile) must use the same separator consistently: the user cannot have some Material files space separated, while others are comma separated.

-- Mapping File separators

!!bocProfSep         = !!bocSpaceSep

!!bocMatSep          = !!bocCommaSep

!!bocOriSep          = !!bocSpaceSep

Pre- and Post-processing Macros

You can write their own macros to be run before and after the both the Export and Import processes have taken place. This lets the user build a model in the base product which then needs some sort of pre- or post-processing. This is performed using the variables below:

-- Pre/Post Export User Defined Macros

!!bocPreExpMac  = |bocpreexport|

!!bocPostExpMac = |bocpostexport|

!!bocPreImpMac = |bocpreimport|

!!bocPostImpMac = |bocpostimport|

The above syntax defines the names of macros which are to be found in the folder structure below the %PMLLIB% environment variable. They are named as above with the PML suffix, '.pmlfnc'.

These macros will be called before and after the process has been executed. These macros should have no arguments and return no value.

Note:
It is for the user to handle all internal errors within the macros. Errors that are not handled could cause the transfer process to crash.

User-definable Material Macro

If the material information is not contained in the MATR or :FABMGRADE attributes, it may be extracted from the database using a user-definable macro. This macro is identified using the following global variable:

-- Material macro

!!bocMaterialMac = |bocgetusermatl|

This would enable the user to configure the system to extract material information in a manner different from the default system. Refer to for further information.

The above defines a reference to a macro which is to be found in the folder structure below the %PMLLIB% environment variable. This macro takes no arguments and returns a string.

Note:
It is for the user to handle all internal errors within the macro.

Maximum File Size

For reading many files, such as the mapping files, log files or even some internal files, there is a current size limit of 500000 lines. This may be modified by changing the lines below.

-- Maximum file size in lines

!!bocMaxFileSize = ( 500000 )

Profile Mapping Files

The user can export profile names using either the base product Specification Component or the Catalogue Component. This is a significant decision the user will have to make before starting the project.

In the bocuserdata.pmlfnc function there is a variable, !!bocProfMapRef, which the user can set to determine whether to use the Specification or Catalogue Component. By default the lines are as follows, with the second line commented out:

-- Profile Map Table Ref

!!bocProfMapRef = |SPRE|

--  !!bocProfMapRef = |CATR|

Should the user want to use the Catalogue Component, comment out the first line and uncomment the second, thus:

-- Profile Map Table Ref

--  !!bocProfMapRef = |SPRE|

!!bocProfMapRef = |CATR|

Refer to for further information on profile mapping file structure.

Replacement of SCTNs with GENSECs on Import

The base product structural user interface creates GENSEC elements for all structural members, whether they are straight or curved. However, the connectivity features for the new elements are not as advanced as for the old SCTN elements. Therefore, it would be difficult to build a structurally connected model with GENSECs.

In the first phase of import, all straight structural members are imported as SCTN elements, and all curved ones are imported as GENSECs. The user has the option of replacing these straight SCTNs with GENSECs by modifying the following line in the bocuserdata.pmlfnc file. The default is not to replace the SCTNs.

-- Flag to replace imported SCTNs with GENSECs

!!bocSCTNtoGENSEC = false

If the user is importing to update and existing model, the database type of elements is not changed, but all new elements will be replaced or not as required.

File Headers

The user can select whether the file will contain listings of all the mapping files or just the section count table. This is done by the !!bocBriefHdr variable in the bocuserdata.pmlfnc file. By default the files have brief headers, but if the user wants to include details of all the files used for the translation, the variable can be switched to 'false'.

-- Brief/Verbose Bocad Interface file header

!!bocBriefHdr = true

Local User Configuration

As has been described above, the file bocuserdata.pmlfnc can be modified by hand to provide a degree of customization. This overwrites the system variables in bocsystemdata.pmlfnc.

Note:
This latter function must not be modified.

System Configuration

There is a third level of customization available that is accessible by a graphical user interface. This window has access to versions of all the variables in the bocuserdata.pmlfnc function, but it does not modify that function at all. Therefore, at this point, the user is working with a local set of configuration data. This file also stores the settings on the attribute comparison window that drives the Compare/Merge operation.

The System Configuration window is accessible from either the main Import or Export window using Control > Configure.

The System Configuration window has five tabs Run Parameters, Model Parameters, Display Colours, Environment Parameters and Macros. The detail of the attributes can be read above. The forms do have some data validation, where appropriate.

By default, the system looks for a file ABSI.xml in the user's work area. If present, this file is accessed when this window, and even when the whole system, is initialized. If this file is not available, then the default values that are used are set in bocsystemdata.pmlfnc and subsequently overwritten by bocuserdata.pmlfnc. The user can save the window, settings to this default file using the Control > Save option. To save the settings to another file, use the Control > Save as... option.

To load any settings file other than the default one use Control > Load... option. A file browser is displayed allowing the user to choose where to locate the new file.

To restore the main default settings at window initialization, just delete the ABSI.xml file.

Click Reset to reset the values using the normal form initialization process with the current variables and any saved ABSI.xml file.

The Re-Initialise option goes right back to the source variables in the system and user data and the default ABSI.xml files.

Click OK to transfer the settings to the main Import/Export system for use in that session. Once the window is displayed again, any unsaved attributes will be lost.

In This Topic
Related Links
TitleResults for “How to create a CRG?”Also Available in