Create a New Element
- Last UpdatedMay 24, 2022
- 3 minute read
To create a new element within an existing Database (DB), you must first make sure that the Current Element (CE) is at a level within the hierarchy which can legally own the element to be created. For example, a Site can own a Zone, but it cannot own a Valve. To create a new Valve, you must be at Branch level. You must therefore navigate to the correct level by using one of the command options described in Database Navigation and Query Syntax.
Note:
The Q LIST query will tell you which element types you can create as members of the
Current Element.
You can then create a new element, set its attributes and, if required, create further elements as its members.
Create an Element After the Current List Position
If you create an element without explicitly identifying its position in the Member List of the Current Element, the new element is inserted immediately after the Current List Position. To use this option, enter the command
|
NEW element_type element_name |
(element_name is optional) |
For example, if the Current List Position is at member 4 (/VALV1) of the Member List.

Current Element and its Member List (illustrating movement along list)
The command
NEW TEE /TEE2
adds a new Tee at list position 5 (between /VALV1 and /ELBO2) and names it /TEE2. The Member List of /BRAN1 thus becomes

Result of adding a new Tee
To insert the new Tee as the first or last component in the Member List, access the Branch Head or Tail, respectively, before giving the NEW TEE command.
Create an Element at a Specified List Position
To create a new element at a specified list position, identify a list position adjacent to the required position and state which side of it the newly-created element is to go. The command syntax is one of the following:
NEW element_type element_name BEFore list_position
NEW element_type element_name AFTer list_position
where element_name is again optional and where list_position may be specified in any of the ways described in Database Navigation and Query Syntax.
Consider the following examples. Starting from the configuration shown, any of these commands creates a new Tee between /ELBO3 (list position 7) and /FLAN2 (list position 8):
|
NEW TEE AFTER /ELBO3 |
Specify name or refno |
|
NEW TEE BEFORE 8 |
Specify list position number |
|
NEW TEE BEFORE FLAN 2 |
Specify member type and number (second Flange in the list) |
|
NEW TEE AFTER LAST ELBO |
Specify first or last member of a given type (last Elbow in the list) |
|
NEW TEE AFTER NEXT 3 |
Specify position relative to Current List Position |
|
NEW TEE BEFORE LAST FLAN |
Specify first or last member of a given type |
The new Tee, which is unnamed, becomes list member 7, /ELBO3 becomes list member 8, /FLAN2 becomes list member 9, and so on.
Creating a Top Level Element in a Specific Database
To create a new top level element in a specific database there is a DB keyword available in the syntax of the ‘NEW’ command as follows:
NEW element_type element_name DB database_name
where element_name is again optional and where the database_name is expressed as a fully qualified database name,for example, team/database.
The following command will create a new SITE named /MYSITE in the MYTEAM/MYDB database.
NEW SITE /MYSITE DB MYTEAM/MYDB