Scheme Handling
- Last UpdatedJan 07, 2026
- 4 minute read
The exceptions kcs_InterpretationError and kcs_GenerationError are special scheme generation exceptions that can be raised by some of the functions described below. For these exceptions additional information can be fetched by the functions kcs_hullpan.nerr (see nerr() below), kcs_hullpan.err_code (see err_code(error_ind) below) and kcs_hullpan.err_mess (err_mess(error_ind) below) described below.
|
pan_init(scheme,ident) |
||
|
Initialize a new panel. This function also starts a new scheme with the given name and adds an 'ident' statement first in the scheme. The directory path need not be given. It is then fetched from the global variable SB_SHIPSCH. If another scheme is already active a control question appears. |
||
|
Input Parameters: |
||
|
scheme |
string |
name of scheme. |
|
ident |
string |
the ident statement in the schema |
|
Returned value: |
||
|
none |
||
|
Exceptions: |
||
|
kcs_ArgumentError |
Incorrect number of, or type of parameters |
|
|
kcs_SystemError |
MDS error |
|
|
kcs_InterpretationError |
Hull Planar Scheme interpretation error |
|
|
kcs_GenerationError |
Hull Planar Scheme generation error |
|
|
kcs_Error |
Other error |
|
|
pan_modify(panel,mode) |
||
|
Activate an existing panel. As for kcs_hullpan.pan_init the belonging scheme is also activated. |
||
|
Input Parameters: |
||
|
panel |
string |
giving the name of the panel |
|
mode |
integer |
1: create new 2: update existing |
|
Returned value: |
||
|
none |
||
|
Exceptions: |
||
|
kcs_ArgumentError |
Incorrect number of, or type of, parameters |
|
|
kcs_SystemError |
MDS error |
|
|
kcs_InterpretationError |
Hull Planar Scheme interpretation error |
|
|
kcs_GenerationError |
Hull Planar Scheme generation error |
|
|
kcs_Error |
Other error |
|
|
stmt_exec(group,statement) |
||
|
Add the statement given as input to current scheme and run it. The components are generated into the current panels. |
||
|
Input Parameters: |
||
|
group |
integer |
number of the group to replace. For addition the group number should be set to zero. |
|
statement |
string |
containing the statement to be executed. |
|
Should be in standard Hull Plane Modelling format. |
||
|
Returned value: |
||
|
none |
||
|
Exceptions: |
||
|
kcs_ArgumentError |
Incorrectnumber of, or type of, parameters |
|
|
kcs_SystemError |
MDS error |
|
|
kcs_InterpretationError |
Hull Planar Scheme interpretation error |
|
|
kcs_GenerationError |
Hull Planar Scheme generation error |
|
|
kcs_Error |
Other error |
|
|
stmt_exec_single(group,statement,panel) |
||
|
Add the statement given as input to the scheme of the given panel and run it. The components are generated into the given panel |
||
|
Input Parameters: |
||
|
group |
integer |
(as stmt_exec) |
|
statement |
string |
(as stmt_exec) |
|
panel |
string |
the name of the panel |
|
Returned value: |
||
|
none |
||
|
Exceptions: |
||
|
kcs_ArgumentError |
Incorrect number of, or type of, parameters |
|
|
kcs_SystemError |
MDS error |
|
|
kcs_InterpretationError |
Hull Planar Scheme interpretation error |
|
|
kcs_GenerationError |
Hull Planar Scheme generation error |
|
|
kcs_Error |
Other error |
|
|
group_get(panel,part_id) |
||
|
Get the group number for a given component within a panel. |
||
|
Input Parameters: |
||
|
panel |
string |
the name of the panel |
|
part_id |
integer |
the component identity to get the group number for |
|
Returned value: |
||
|
group |
integer |
the group number |
|
Exceptions: |
||
|
kcs_ArgumentError |
Incorrect number of, or type of, parameters |
|
|
kcs_SystemError |
MDS error |
|
|
kcs_ModelNotFound |
Panel or group not found |
|
|
kcs_Error |
Other error |
|
|
group_next(panel,act,group) |
||
|
Get the number of the group according to input. Either the first group number can be returned. In this case the input parameter group has no meaning. Or the group following the given one can be returned. The last option is to check the validity of an existing group number. If it is valid the same group number is returned. In case of failure, an exception is raised just as for the other functions. |
||
|
Input Parameters: |
||
|
panel |
string |
the name of the panel |
|
act |
integer |
-2: get first group 0: get this group 1: get next group |
|
group |
integer |
the component identity to get the group number for |
|
Returned value: |
||
|
group |
integer |
the resulting group number |
|
Exceptions: |
||
|
kcs_ArgumentError |
Incorrect number of, or type of, parameters |
|
|
kcs_SystemError |
MDS error |
|
|
kcs_ModelNotFound |
Panel or group not found |
|
|
kcs_Error |
Other error |
|
|
stmt_get(panel,group) |
||
|
Get the statement text for a given group within a panel. The statement text can be changed and used in the "kcs_hullpan.stmt_exec" function to change a group of components. |
||
|
Input Parameters: |
||
|
panel |
string |
the name of the panel containing the group |
|
group |
integer |
the number of the group to get the statement text for |
|
Returned value: |
||
|
statement |
string |
the statement text |
|
Exceptions: |
||
|
kcs_ArgumentError |
Incorrect number of, or type of, parameters |
|
|
kcs_SystemError |
MDS error |
|
|
kcs_ModelNotFound |
Panel or group not found |
|
|
kcs_Error |
Other error |
|
|
pan_scheme_runmode_get( ) |
||
|
Get the current run mode options. These are the same options as you can view/change with the interactive function "Planar\Scheme\Run Mode" of planar hull modelling. |
||
|
Input Parameters: |
||
|
none |
||
|
Returned value: |
||
|
RunModeOptions |
Instance of KcsRunModeOptions |
The current run mode options. |
|
pan_scheme_runmode_set(RunModeOptions) |
||
|
Set the current run mode options. These are the same options as you can view/change with the interactive function "Planar\Scheme\Run Mode" of planar hull modelling. You may modify current settings for "Confirm Generation" and "Trace On". |
||
|
Input Parameters: |
||
|
RunModeOptions |
Instance of KcsRunModeOptions |
The current run mode options. |
|
Returned value: |
||
|
none |
||
|
nerr() |
||
|
Number of interpretation and generation errors when the exceptions kcs_InterpretationError or kcs_GenerationError was raised. If kcs_SystemError was raised 1 is returned. |
||
|
Input Parameters: |
||
|
none |
||
|
Returned value: |
||
|
nerr |
integer |
number of errors |
|
Exceptions: |
||
|
none |
||
|
err_code(error_ind) |
||
|
Get the error code after any of the exceptions kcs_InterpretationError, kcs_GenerationError or kcs_SystemError. |
||
|
Input Parameters: |
||
|
error_ind |
integer |
index number between 1 and nerr(). For kcs_SystemError set error_ind to zero. |
|
Returned value: |
||
|
error_code |
integer |
the error code |
|
Exceptions: |
||
|
kcs_ArgumentError |
Incorrect number of, or type of, parameters or value out of bounds. |
|
|
err_mess(error_ind) |
||
|
Get the error message after any of the exceptions kcs_InterpretationError, kcs_GenerationError or kcs_SystemError. |
||
|
Input Parameters: |
||
|
error_ind |
integer |
index number between 1 nd nerr(). For kcs_SystemError set error_ind to zero. |
|
Returned value: |
||
|
error_mess |
string |
the error message |
|
Exceptions: |
||
|
kcs_ArgumentError |
Incorrect number of, or type of, parameters or value out of bounds. |
|
|
editor(panel) |
||
|
Invoke the editor with a scheme for the given panel. Can be used after the exceptions kcs_InterpretationError or kcs_GenerationError to show the erroneous statement in its context. |
||
|
Input Parameters: |
||
|
panel |
string |
the name of the panel |
|
Returned value: |
||
|
none |
||
|
Exceptions: |
||
|
kcs_ArgumentError |
Incorrect number of, or type of, parameters. |
|