Model Edit Configuration
The ControlEdit program must always be given a basic edit function. At this time, there are four main options available, as well as removal options:
 
Parameter
Description
-inlineCross
Inserts an inline cross phase jumper into the model at the head of the selected spur. This is used to correct mis-phased spurs. You must also specify -crossPhase option (see “Other Options”). Configure the JBot Command as InlineCrossJumperCommand. This is rare.
-jumper
Inserts a jumper between the selected conductor and another conductor to be chosen interactively by the user. If this is to be a cross phase jumper, you also need to specify the -crossPhase option (see “Other Options”). Configure the JBot Command as PPJumperCommand or PPCrossJumperCommand.
-tap
Inserts objects as taps to the selected conductor, such as generators. Configure the JBot Command as TapGeneratorCommand.
-wireDown
Breaks a conductor and inserts an inline switch. Usually configured to call the InlineJumperCommand, but, when used with the BypassJumperCommand, also includes a bypass switch. See -bypassCls, -bypassSymbolCls,
-remove
Removes the model edit. This can be used for any model edit type, and renders -putUpWire and -removeJumper obsolete. Configure the JBot Command as RemoveJumperCommand.
-putUpWire/-removeJumper
Removes a device installed previously by ControlEdit on a wire down or jumper edit. Configure the JBot Command as RemoveJumperCommand.
 
Other Options
Note that all phase-based options are automatically filtered by the phases of the selected device, so you can configure 7 (ABC) for single-phase edits.
Option
Arguments
Description
Req
-alias
String
The alias to use for the new switch. Also see "Prompt Dialog Configuration" below.
N
-attribute
String, the <name:value>
The name and value pair to use for the attribute name. Separate these by a colon. You may specify –attribute as many times as you wish, to set many different attributes. Also see "Prompt Dialog Configuration" below.
N
-bypassCls
String
Class to use as a bypass switch for the inline jumper.
Note: Required when using BypassJumperCommand.
N
-bypassDistance
Integer
Distance from the inline jumper to the bypass switch. Used with the BypassJumperCommand, but not required. Defaults to 25.
N
-bypassSymbolCls
String
Symbology class used for the bypass switch.
Note: Required when using BypassJumperCommand.
N
-cesuser
String, or $CESUSER
The user name
Y
-connection/-c
Integer, generally 7 or $PHASES
The available phases. Defaults to 7 (ABC)
N
-coordSys
Integer, or $COORDSYS
The coordinate system number. Defaults to 0 (geographic).
N
-crossPhase/-cpj
<none>
Whether to perform a cross-phase jumper. Used with the –jumper option. This asks the user to choose another conductor, then displays a live/pickup phase chooser dialog to the user.
N
-gapLength
Integer
The gap to use for the switch being added. Defaults to 25.
N
-handle
The Handle, or $DEVICE
Handle of object clicked
Y
-inlineObjects/-io
See Inline Objects Configuration below
A variable-length list of all classes to add, along with configuration for each.
N
-noVerify
<none>
Whether to skip the control zone verification. Not recommended.
N
-symbolCls
Integer
The symbol class to use for the new switch. Defaults to the switch class.
N
-useStdCls
<none>
Whether to use default classes (ces_ap_cond, ces_bp_cond, ces_cp_cond, ces_2p_cond, ces_3p_cond) for the new conductors. If not specified, it uses the selected conductor class. Not recommended.
N
-x
The x-coordinate, or $WX
X coordinate where action takes place
Y
-y
The y-coordinate, or $WY
Y coordinate where action takes place
Y
 
Substitution Parameters
Substitution parameters can be added as arguments to any of the above options. For example, you can specify "-symbolCls 4460$PHASES", which will use symbol class 44601 for A-phase devices, 44607 for ABC-phase devices, etc.
 
Name
Value
$CESUSER
The user who initiated the edit
$COORDSYS
The coordinate system of the selected device, as defined in the map.
$DEVICE
The selected device Handle.
$PHASES
The selected device phases, 1-7
$WX
The x-coordinate
$WY
The y-coordinate
$XPHASE
Combined crossed phases, for use in the -symbolCls option, if desired. For example, an A->B cross phase jumper will contain 3 (AB), and an A->C jumper will contain 5 (AC), etc. This is only valid for cross-phase model edits.
 
Prompt Dialog Configuration
You can configure these model edit options to prompt the user to enter values used in aliases and other attributes. These are then specified as arguments to the above options, similarly to the Substitution Parameters above.
Enter the full set of options in the CONTROL_ACT_PROMPTS table:
 
Column Name
Description
prompt_key
The primary key of this table. May not be NULL or contain spaces.
prompt_string
The String to present to the user to describe the value to enter
required
Y or N. If Y, this value must be entered and non-blank. If N, this value can be left blank
data_type
<string, integer, number, list, fixed_list>
This is not enforced in the initial implementation and will be used in a future release. At this time, all prompts will assume string values.
default_value
Default value for the prompt and auto-populated in the prompt dialog.
list_values
List of values to populate in a combo-box for the user to select the value to use. Values will be separated by "|" delimiters. ie .Emergency|GIS Data Error|Planned|Other.
This is not supported in the initial implementation and will be used in a future release.
 
If powerflow attribution is required, there should be a CONTROL_ACT_PROMPTS record for each attribute column in the PF_DIST_GEN_DATA database table. This will then use configured values in the PF_DIST_GEN_DATA table for each catalog_id record where model_edit = ‘Y’.
Then specify these in your CONTROL_ACT description column to prompt the user to enter attributes. For example:
Configure a default jumper alias:
INSERT INTO control_act_prompts (prompt_key, prompt_string, required, data_type, default_value, list_values)
VALUES ('JmpAlias','Jumper Alias','Y','string','Jumper_$WX_$WY','');
Then configure a jumper action that prompts the user to enter an alias. The dialog will be prepopulated with "Jumper_<x-coordinate>_<y-coordinate>":
INSERT INTO control_act
(act_key, act_cls, act_idx, action_name, label, instruct_label,
switching_desc, switching_code, description, undo_act_key)
VALUES
(481, 'START', 'ControlEdit', 'ACT_PP', 'P-P Jumper Prompt...', '',
'', '', '-jumper -deviceCls 447 -status 0 -nominal 0 -gapLength 50 -noVerify -handle $DEVICE -cesuser $CESUSER -x $WX -y $WY -alias $PROMPT(JmpAlias) -symbolCls 4470$PHASES -coordSys $COORDSYS', 0);
Also configure the CONTROL_ACT_DATE_FORMATS table. This table specifies the date formats for string substitution.
 
Column Name
Description
format_key
The primary key of this table
format_string
The format string to be used, based on Java SimpleDateFormat
 
For example:
Enter a default date format.
INSERT INTO control_act_date_formats (format_key, format_string)
VALUES ('DEFAULT','yyyy-MM-dd_HH:mm:ss');
Substitute it into the alias
INSERT INTO control_act
(act_key, act_cls, act_idx, action_name, label, instruct_label,
switching_desc, switching_code, description, undo_act_key)
VALUES
(480, 'START', 'ControlEdit', 'ACT_PP', 'P-P Jumper', '',
'', '', '-jumper -deviceCls 447 -status 0 -nominal 0 -gapLength 50 -noVerify -handle $DEVICE -cesuser $CESUSER -x $WX -y $WY -alias JMP_$DATE(DEFAULT)_$CESUSER -symbolCls 4470$PHASES -coordSys $COORDSYS', 0);
Inline Objects Configuration
The –inlineObjects/-io option allows you to specify a variable-length list of objects, in the desired order. Each inline object definition is separated by a colon:
-inlineObjects <inline obj def> : <inline obj def> : <inline obj def> …
And each <inline obj def> consists of the following:
1. <class num or name>
2. <symbol number>
3. <nominal status>
4. <current status>
5. <branch length>
6. (optional) ALIAS:<alias value>
7. (optional) ATTRIBUTE:<attribute name>:<attribute value>
 
ATTRIBUTE can be repeated as many times as desired.
There are two reserved keywords that can be used in place of the <symbol number> and <branch length>:
DEF - use default value
COND - create a handle based on the class of the parent conductor
For example, the "'Tap Generator with switch Prompt" option:
INSERT INTO control_act
(act_key, act_cls, act_idx, action_name, label, instruct_label,
switching_desc, switching_code, description, undo_act_key)
VALUES
(476, 'START', 'ControlEdit', 'ACT_TAPGEN', 'Tap Generator with switch Prompt...', '',
'', '', '-tap -noVerify -gapLength 40 -x $WX -y $WY -handle $DEVICE -io COND DEF 7 7 DEF : 148 14807 0 0 DEF ALIAS:$PROMPT(SwAlias) ATTRIBUTE:gmd_comment:$PROMPT(SwComment) ATTRIBUTE:gmd_comment2:$PROMPT(SwComment2) : 191 19107 7 7 DEF ALIAS:$PROMPT(GenAliasFdrName) ATTRIBUTE:comment_1:$PROMPT(GenComment) : 998 0 7 7 DEF ATTRIBUTE:FEEDER_NAME:$PROMPT(GenAliasFdrName) ATTRIBUTE:SUBSTATION_NAME:$PROMPT(GenStationName) ATTRIBUTE:COLOR:$PROMPT(FdrColor) : 448 0 7 7 DEF : 996 0 7 7 DEF : 448 0 7 7 DEF : 299 0 7 7 DEF -status 7 -nominal 7 -deviceCls 148 -symbolCls 14807 -fdrColor 6 -cesuser $CESUSER -coordSys $COORDSYS', 0);
The io option is "COND DEF 7 7 DEF : 148 14807 0 0 DEF ALIAS:$PROMPT(SwAlias) ATTRIBUTE:gmd_comment:$PROMPT(SwComment) ATTRIBUTE:gmd_comment2:$PROMPT(SwComment2) : 191 19107 7 7 DEF ALIAS:$PROMPT(GenAliasFdrName) ATTRIBUTE:comment_1:$PROMPT(GenComment) : 998 0 7 7 DEF ATTRIBUTE:FEEDER_NAME:$PROMPT(GenAliasFdrName) ATTRIBUTE:SUBSTATION_NAME:$PROMPT(GenStationName) ATTRIBUTE:COLOR:$PROMPT(FdrColor) : 448 0 7 7 DEF : 996 0 7 7 DEF : 448 0 7 7 DEF : 299 0 7 7 DEF"
 
Which creates:
1. A conductor with the selected conductor class, the default symbol, with nominal & current status 7, and the default length based on the gap length.
2. A switch of class 148 with symbol class 14807, nominally open. The user will be prompted for the alias and 2 comments for this switch.
3. A generator of class 191, symbol class 19107, nominally closed. The user will be prompted for the feeder name and comment for this generator
4. An FID (class 998) with no symbology and a prompted feeder name, substation, and color
5. An invisible 448 connector
6. An FBD (996)
7. Another invisible connector
8. A SRC (299)