Create Element
- Last UpdatedJun 02, 2022
- 1 minute read
Creation is relatively straightforward. Elements can be created:
-
Below a given element
-
After a given element
-
Before a given element
If creating an element below a given element then the position in the list must be given, for example:
DbElement myNewPipe=myZoneElement.Create(1,NOUN.PIPE);
This creates a new PIPE below 'myZoneElement' as the first member. If the position is beyond the end of the current members list, it will create it at the end.
An exception will be raised if the required type of element cannot be created at the required point.
There is a boolean method IsCreatable to test if an element of a given type could be created at the required location.