Headers
stringlengths 3
162
| Content
stringlengths 12
32.8k
|
---|---|
Arithmetic errors | Arithmetic errors or errors constructing DbDouble's will throw a PdmsException containing the error message. For example, adding 2 quantities of different dimensions together will throw a PdmsException which can be caught
d1 = DbDouble.Create("1 kg");
d2 = DbDouble.Create("2 mm");
try
{
d3 = d1 + d2;
}
catch (PdmsException ex)
{
}
DbDouble
1 kg
DbDouble
2 mm
try
catch
(
PdmsException
|
formatting of DbDouble's as a string having properties | This object allows formatting of DbDouble's as a string having properties to set the dimension, decimal points, label etc. For example, formatting a temperature
or constructing a DbDouble from a string and given format
A DbFormat object has a property that is a pointer to another DbFormat. This format will be used (delegated to) in toString type operations if the value produce by the current DbFormat is less than one.
Delegation can continue along a chain formatting the quantity to ever smaller units. All these format objects must be consistent dimension and progressively smaller units.
t1 = DbDouble.Create("0 celsius");
DbFormat tempFmt = DbFormat.Create();
tempFmt.Dimension = DbDoubleDimension.GetDimension(DbDimension.TEMP);
tempFmt.Units = DbDoubleUnits.GetUnits(DbUnits.CELSIUS);
tempFmt.DecimalPoints = 1;
tempFmt.Label = "degC";
string tempStr = t1.ToString(tempFmt);
DbFormat f1 = DbFormat.Create();
f1.Dimension = DbDoubleDimension.GetDimension(DbDimension.DIST);
f1.Units = DbDoubleUnits.GetUnits(DbUnits.INCH);
DbDouble d1 = DbDouble.Create("1", f1);
DbDouble
0 celsius"
DbFormat
DbFormat
DbDoubleDimension
(
DbDimension
DbDoubleUnits
DbUnits
string
DbFormat
DbFormat
DbDoubleDimension
.GetDimensio
DbDimension
DbDoubleUnits
(
DbUnits
DbDouble
DbDouble |
PML .NET allows you to instantiate and invoke methods | Programmable Macro Language (PML) .NET allows you to instantiate and invoke methods on .NET objects from PML proxy objects. PML proxy class definitions are created from .NET class definitions at run time. These proxy classes present the same methods as the .NET class which are described using custom attributes. Proxy methods are passed arguments of known types which are marshalled to the corresponding method on to the .NET instance. The PML proxy objects behave just like any other PML object.
|
Design Details | Programmable Macro Language (PML) callable assemblies are loaded by the AVEVA module using the IMPORT syntax. Assemblies may be defined in potentially any .NET language, for example managed C++, C# or VB.NET. The PML.NET Engine loads a given assembly using reflection. The assembly may be located in the %AVEVA_DESIGN_EXE% directory, a subdirectory below %AVEVA_DESIGN_EXE% a mapped drive or on a UNC path. When the assembly is loaded PML class definitions are created for each PML callable class within the assembly. The PML.Net Engine only loads assemblies which are marked with the custom attribute PMLNetCallable. Only classes and methods which are marked as PMLNetCallable are considered. In order to create a valid PML Proxy class definition the .NET class and its methods must adhere to certain rules. Once an assembly has been loaded instances of PMLNetCallable classes may be created. No additional code to interface between PML and .NET is necessary. This is provided by the PMLNetEngine.
|
Customize AVEVA modules by PML.NET | The diagram below shows how AVEVA modules may be customized using PML.NET. A number of .NET API's are available which allow access to the current database session, drawlist, geometry and other functionality. Users are able to write their own managed code which accesses the AVEVA module via these C# API's. It is not possible to directly call PML from C#. However there is an event mechanism which allows PML to subscribe to events raised from C# (these are shown in dashed lines below). Events are also raised when the database changes and can be subscribed to from C# (also shown in dashed lines). In this example the external C# assemblies share the same database session as Design i.e. they run in the same process and therefore see the same data.
For example: the sequence:
will give an error.
In order to identify and load a particular class definition the PML proxy class is assumed to have the same name as the .NET class (PML callable classes must be case independent). This class name is passed to the PMLNetEngine which creates the .NET instance.
For example:
creates an instance of the .NET class netobject. To specify in which assembly this class is defined and resolve any name clashes the user needs to also specify the namespace in which the .NET class is defined using the following syntax:
Where <string> is the namespace in which the class is defined.
For example:
The namespace is considered to be case independent. This namespace will remain current until it goes out of scope, for example: at end of macro. When the user types:
then all namespaces in the current scope will be searched to find a match. In this example, if 'Aveva.Core. PMLNetExample' is not currently in scope, then the error:
will be raised.
Object names can consist of any alpha but not numeric characters (this restriction is imposed by PML). They are treated as case-independent. However, it is no longer necessary to define them in upper case - any mixture of upper and lower case letters will have the same effect.
The query methods on an object have been enhanced as follows:
(a) Querying an object will show the namespace name as well as the object name:
For example:
(b) There is a new query method to list all the methods of an object (including constructors)
For example:
(c) A new query:
lists the namespaces currently in scope.
There is a new global method on all objects:
which returns a list of the methods on the object as an array of strings.
For example:
returns:
Before an instance of a .NET object can be instantiated the assembly containing the class definition must be loaded. This is done using the IMPORT syntax as follows
Where <string> is the case-independent name of the assembly
Only PML variables of the following types may be passed to methods on .NET classes. In the table below the PML variable type is in the left column and the .NET equivalent variable type is in the right column. Data is marshalled in both directions between PML and .NET by the PMLNetEngine.
REAL
double
STRING
string
BOOLEAN
bool
ARRAY (these can be sparse and multi-dimensional)
Hashtable - The Key must be numeric (integer of double) to match the PML Array index which is always REAL. An error will be raised during execution if this is not the case.
OBJECT Any existing PML.NET instance
PMLNetCallable class
Arguments to PML Proxy methods are passed by reference so can be in/out parameters (in .NET output arguments must be passed by reference).
PML Gadgets and DB elements have reference semantics when they are copied whereas all other objects have value semantics when they are copied. This is controlled by the Assign() method on the .NET class. So, for example if the Assign() method here copies the value then
for example, !a and !b do not point to the same object.
In order to perform either a shallow or deep copy of the member data inside the .NET class the Assign() method must be defined on the .NET class (see rules). This is analogous to overriding the operator "=" in C++.
Overloading of methods is supported for all variable types in PML so a .NET Proxy can be created from a .NET class which has overloaded methods.
The custom attribute [PMLNetCallable()] is used to describe the PML interface for a .NET class. This metadata allows the PML callable assemblies to be self-describing. This clearly defines the class and allows an assembly to expose a subset of its public interface to PML. The PMLNetEngine uses this metadata to decide which .NET class definitions can be created in PML. Reflection is used to load an assembly and create PML class definitions. All classes and methods for which PML Proxy class definitions will be created must be marked as PMLNetCallable. The assembly itself must also be marked as PMLNetCallable.
So, a PML callable .NET class in C# looks like this:
This class has a default constructor and a single method. Both the constructor and method are marked as PMLNetCallable along with the class itself.
The assembly itself must also be marked as PMLNetCallable. This is normally done in the AssemblyInfo file as follows
In PML there is no concept of private members or methods - everything is public. Access to public data in .NET must be via properties or get/set accessor methods. Properties in .NET class are defined as get and set methods in PML. So, for example the following PMLNetCallable property in .NET
would have the following Proxy methods in PML
PML variables are of two kinds: global and local. Global variables last for a whole session (or until you delete them). A local variable can be used only from within one PML function or macro. The lifetime of the .NET instance is controlled by the scope of the PML proxy.
Classes can have any number of overloaded constructors but must have a default constructor which is marked as PMLNetCallable. The PML Proxy constructor instantiates an instance of the underlying .NET class. When the proxy goes out of scope the destructor destroys the underlying .NET instance.
The string() method is available on all PML objects. For a .NET Proxy this will call the ToString() method on the .NET instance. If the ToString() method is overridden on the .NET class then this will be called.
PML is case independent, so it is not possible to have MyMethod() and MYMETHOD() in .NET. PML will report non-unique object/method names.
Doubles are used in PML.NET to store reals and ints so doubles must be used in .NET (integers are not available in PML)
Events on PML.NET objects may be subscribed to from PML. A PML callback on a particular instance may be added to an event on another PML.NET instance. Events are defined by a .NET component by associating the delegate PMLNetEventHandler with the event. This delegate has the signature
Where args is an array of event arguments of any PML.NET type (see table of valid types). The following code associates this delegate with an event
This event can then be caught in Programmable Macro Language (PML) by adding an appropriate callback to the instance raising the event
Where
At some later time the event handler may be removed
where !handle is the handle of the PML.NET delegate returned by addeventhandler().
Netcallback is a PML object defined as
Exception handling is placed around the Invoke method to handle .NET method invocation exceptions like TargetException, ArgumentException etc. The result of catching such an exception is to ultimately return a PMLError object from PMLNetProxy::Invoke() which results in a PML exception (1000,n) being thrown where 1000 is the module number for PML.NET. .NET can throw its own PML exceptions. The exception to throw is PMLNetException. For example
This may then be handled inside a PML macro i.e.
Any other exception within the loaded assembly itself is caught by the global exception handler inside the AVEVA module.
Certain rules must be adhered to when defining a .NET class which is PML callable. These are enforced by the PMLNetEngine when an assembly is imported. They are
If these rules are not adhered to then errors are reported to the trace log when the assembly is loaded and a PML class definition will not be created. If the class definition has not been defined then the following PML error will result
In order to output trace to a log file and the console window add the following lines to the exe's config file
This will create the file PMLNetTrace.log in C:\temp and log all the valid class definitions as they are imported.
USING NAMESPACE ‘Aveva.Core’
!netobj = object namespace.NETObject ( )
!a = object netobject()
USING NAMESPACE <string>
'Aveva.Core.PMLNetExample'
!netobj = object NetObject ( )
(46,87) PML: Object definition for NETOBJECT could not be found.
q var !x
< Aveva.Core.NAMESPACE.NETOBJECT>
Aveva.Core.NAMESPACE.NETOBJECT
Q METH/ODS
q meth !x
<Aveva.Core.NAMESPACE.NETOBJECT>Aveva.Core.NAMESPACE.NETOBJECT
NETOBJECT ( )
NETOBJECT (REAL)
ADD (REAL)
REMOVE(REAL)
ASSIGN(Aveva.Core.NAMESPACE.NETOBJECT)
DOSOMETHING(REAL, REAL, REAL)
Q NAMESP/ACES
.methods()
!arr = !x.methods()
q var !x
<ARRAY>
[1] <STRING> 'NETOBJECT ( )'
[2] <STRING> 'NETOBJECT (REAL)'
[3] <STRING> 'ADD (REAL)'
[4] <STRING> 'REMOVE(REAL)'
[5] <STRING> 'ASSIGN(Aveva.Core.NAMESPACE.NETOBJECT)'
[6] <STRING> 'DOSOMETHING(REAL, REAL, REAL)'
IMPORT <string>
!a = object netobject()
!a.val(1)
!b = !a
!b.val(2)
then
q var !a.val() returns 1
and
q var !b.val() returns 2
[PMLNetCallable()]
namespace PMLNet
{
[PMLNetCallable ()]
public class PMLNetExample
{
[PMLNetCallable ()]
public PMLNetExample()
{
}
[PMLNetCallable ()]
public void DoSomething(double x, double y, double z)
{
z = x + y;
}
}
}
using Aveva.Core.PMLNet;
[assembly: PMLNetCallable()]
[PMLNetCallable()]
public double Val
{
get
{
return mval;
}
set
{
mval = value;
}
}
REAL VAL()
VAL(REAL)
__delegate void PMLNetEventHandler(ArrayList __gc *args);
[PMLNetCallable()]
public class PMLNetExample
{
[PMLNetCallable()]
public event PMLNetDelegate.PMLNetEventHandler PMLNetExampleEvent;
[PMLNetCallable()]
public PMLNetExample ()
{
}
[PMLNetCallable()]
public void Assign(PMLNetExample that)
{
}
[PMLNetCallable()]
public void RaiseExampleEvent()
{
ArrayList args = new ArrayList();
args.Add("PMLNetExampleEvent ");
args.Add("A");
if (PMLNetExampleEvent!= null)
PMLNetExampleEvent(args);
}
}
!n = object pmlnetexample()
!c = object netcallback()
!handle = !n.addeventhandler('pmlnetexampleevent', !c, 'callback')
!n.removeeventhandler('pmlnetexampleevent', !handle)
define method .callback(!array is ARRAY)
!args = 'NETCALLBACK object ' + !array[0] + !array[1]
$P $!args
endmethod
throw new PMLNetException(1000, 1, "PMLNetExample Exception");
handle(1000,1)
…
endhandle
(46,87) PML: Object definition for XXX could not be found.
<system.diagnostics>
<switches>
<add name="PMLNetTraceSwitch" value="4" />
</switches>
</system.diagnostics>
<appSettings>
<add key="PMLNetTraceLog" value="C:\temp\PMLNetTrace.log" />
</appSettings>
Only .NET classes which are marked as PMLNetCallable and adhere to certain rules can be called from PML (these rules are described later)
Module switching does not persist .NET objects. Core PML objects defined in FORTRAN or C++ are not persisted either.
Passing other PML system/user objects to .NET, for example: DIRECTION, ORIENTATION, … is not possible. It is possible to pass database references to .NET either as an array or String. It is also possible to pass an existing instance of a PML.NET Proxy to .NET.
It is not possible to call directly PML objects from .NET. The only way to call PML from .NET is via events.
It is not possible to enter 'partial' namespaces as you might in C# and expect them to be concatenated.
Only .NET classes which are marked as PMLNetCallable and adhere to certain rules can be called from PML (these rules are described later)
Only .NET classes which are marked as PMLNetCallable and adhere to certain rules can be called from PML (these rules are described later)
Module switching does not persist .NET objects. Core PML objects defined in FORTRAN or C++ are not persisted either.
Module switching does not persist .NET objects. Core PML objects defined in FORTRAN or C++ are not persisted either.
Passing other PML system/user objects to .NET, for example: DIRECTION, ORIENTATION, … is not possible. It is possible to pass database references to .NET either as an array or String. It is also possible to pass an existing instance of a PML.NET Proxy to .NET.
Passing other PML system/user objects to .NET, for example: DIRECTION, ORIENTATION, … is not possible. It is possible to pass database references to .NET either as an array or String. It is also possible to pass an existing instance of a PML.NET Proxy to .NET.
It is not possible to call directly PML objects from .NET. The only way to call PML from .NET is via events.
It is not possible to call directly PML objects from .NET. The only way to call PML from .NET is via events.
It is not possible to enter 'partial' namespaces as you might in C# and expect them to be concatenated.
It is not possible to enter 'partial' namespaces as you might in C# and expect them to be concatenated.
!n is the PML.NET instance on which the event will be raised
!c is the instance of a PML object with a method callback() with the appropriate arguments
!n is the PML.NET instance on which the event will be raised
!n is the PML.NET instance on which the event will be raised
!c is the instance of a PML object with a method callback() with the appropriate arguments
!c is the instance of a PML object with a method callback() with the appropriate arguments
PML callable assemblies must be marked as PMLNetCallable and reside in the %AVEVA_DESIGN_EXE% directory, subdirectory of the application or UNC path.
Only classes may be PML Callable (this excludes Structures, Interfaces, Enums, …).
A PML callable class must be marked as PMLNetCallable.
A PML callable method must be marked as PMLNetCallable.
A PML callable method can only pass valid argument types (see table of types).
PML callable classes and methods must be public.
PML callable methods with default arguments cannot be defined.
PML callable class and method names must be case independent.
PML callable classes must have an Assign() method.
PML callable classes must have a public default constructor which is PMLNetCallable.
PML callable assemblies must be marked as PMLNetCallable and reside in the %AVEVA_DESIGN_EXE% directory, subdirectory of the application or UNC path.
PML callable assemblies must be marked as PMLNetCallable and reside in the %AVEVA_DESIGN_EXE% directory, subdirectory of the application or UNC path.
Only classes may be PML Callable (this excludes Structures, Interfaces, Enums, …).
Only classes may be PML Callable (this excludes Structures, Interfaces, Enums, …).
A PML callable class must be marked as PMLNetCallable.
A PML callable class must be marked as PMLNetCallable.
A PML callable method must be marked as PMLNetCallable.
A PML callable method must be marked as PMLNetCallable.
A PML callable method can only pass valid argument types (see table of types).
A PML callable method can only pass valid argument types (see table of types).
PML callable classes and methods must be public.
PML callable classes and methods must be public.
PML callable methods with default arguments cannot be defined.
PML callable methods with default arguments cannot be defined.
PML callable class and method names must be case independent.
PML callable class and method names must be case independent.
PML callable classes must have an Assign() method.
PML callable classes must have an Assign() method.
PML callable classes must have a public default constructor which is PMLNetCallable.
PML callable classes must have a public default constructor which is PMLNetCallable.
Note:
Query methods will not list the methods on objects of type ANY, even though such methods are available on all objects.
Note
:
do not
using
[PMLNetCallable()]
public double
get
{
return
set
value
;
ToString() Method
delegate void
__gc
public class
public event
public
public void
public void
= new
if
null
)
!n
!c
!handle
throw new |
.NET controls can be hosted on a pml form | .NET controls can be hosted on a PML form. In order to do this PML provides a container gadget which can host the control. This container gadget has attributes to set and get its size and position and may be added to any PML defined form. It has similar behaviour to a Frame gadget in terms of docking, anchoring and positioning within an owning form. An instance of the .NET control is instantiated from PML. The PML container provides a method to add an instance of a .NET control to it. The .NET control may raise events which may be handled by PML. In order to customise the context menus of the .NET control from PML the ability to define a PML menu which can be shown when the .NET control raises an event is provided.
A container on a form that can host the .NET control can be created in the following way in the form setup
which can be docked and positioned.
The control may be added to the container by setting the container's control to the .NET control's handle.
Events on the control are supported by PML delegates already described. These allow you to add popup menus to the control for example. Events may be subscribed to by adding an event handler as follows to the .NET control
where the method to call when the event is fired is defined as follows
and the menu shown by the method which is added to the container is defined as follows
container .exampleContainer PmlNetControl 'example' dock fill width 30 height 20
using namespace 'Aveva.Core.Presentation'
!this.exampleControl = object PMLNetExampleControl()
!this.exampleContainer.control = !this.exampleControl.handle()
!this. exampleControl.addeventhandler('OnPopup', !this,
'rightClickGrid')
define method .rightClickGrid(!data is ARRAY)
!this.exampleContainer.popup = !this.examplePopup
!this.exampleContainer.showPopup(!data[0], !data[1])
endmethod
menu .examplePopup popup
!this.examplePopup.add( 'CALLBACK', 'Add to 3D View',
'!this.addToThreeDView()' )
define method .rightClickGrid(!data is ARRAY)
|
Example of a .NET grid hosted | The following examples are available in the Samples directory -
Example of a .NET grid hosted on a PML form
Example of a PML Callable assembly:
Example of how to use the new object:
List available methods:
call the example method:
import |pmlnetexample|
using namespace |aveva.core.samples|
!pmlobj = object pmlnetexample()
q var !pmlobj.methods()
!pmlobj.method()
Import |C:\%path-to-samples%\PMLNetExample\bin\Debug\pmlnetexample|
Note:
The module can be loaded from a directory:
Note
: |
Use an instance of an AVEVA C# Grid Control on a C# form | This section describes how to use an instance of an AVEVA C# Grid Control on a C# form. The example which is used in this documentation is supplied with the product. The Visual Studio project, NetGridExample, containing the source code is located in the samples.zip file.
Note:
That you can only use the AVEVA C# Grid Control on your own Visual Studio form if you have a design time license for Infragistics.
Note:
That you can run this C# Addin with the AVEVA module without having an Infragistics license.
Note
:
Note
: |
Create a C# Addin which Contains an AVEVA Grid Control | The supplied C# project is an example of a C# addin for use with AVEVA Plant/AVEVA Marine. The C# addin includes an AVEVA C# Grid Control and some other Visual Studio WinForms gadgets to demonstrate how the Grid Control can be used with AVEVA Plant/AVEVA Marine.
The addin creates the docked window shown below when run within the AVEVA Plant/AVEVA Marine Design module.
The example C# code collects all the Equipment items within the current project and lists them inside the grid along with attribute values for Name, Type, and Owner.
The data in the grid can be selected, sorted and filtered.
And the other menu is available from the header bar at the top of the grid:
Note:
The following features of the example addin. These features make use of the published Grid Control API (see the section below entitled "AVEVA Grid Control API").
Note:
That these menu options will only become available once you have made some modifications to the Design.uic file through menu customization. See below for instructions on how to do this.
Note
:
Note
: |
Provide Access to the Addin in Design | In order to see the addin inside Design you will need to do the following:
!menu.add('TOGGLE', 'My Data', '', 'My Data')
!menu.add('TOGGLE', 'Reference List', '', 'Reference List')
!menu.add('TOGGLE', 'Attributes Utility', '', 'Attributes Utility')
!menu.add('TOGGLE', 'Search Utility', '', 'Find Utility')
!menu.add('TOGGLE', 'Search Results', '', 'Output Utility')
!menu.add('TOGGLE', 'New Addin', '', 'New Addin')
Note:
You can also create your own toolbar which contained a menu item to open/close the addin.
Display
!menu.add('TOGGLE', 'New Addin', '', 'New Addin')
Note
: |
Use the AVEVA Grid Control with Different Data Sources | The supplied C# addin populates the grid with database items and their attribute values.
The following data sources are available for this method of working. Refer to the AVEVA Grid Control API section below for further information.
There are two other ways that an instance of the grid can be populated with data:
More specific control of grid columns can be made with use of the ColumnSpecifcation class. An array of ColumnSpecifcations can be used in the construction of the NetDataSource.
Examples can be found in the PMLGridExample in the Samples directory.
The Type property can also be set through the ColumnDataType property as a string. It is important to do this before the data is bound to the grid as columnspecifications are read and values are output around that.
With a dabacon data source for the GridControl, if an expression is used (say SEQU OF OWN), the default grid data type is a string, unless defined otherwise on creation of the columnspecification and the expression returns.
Two new pmlnetcallable constructors have been made for columnspecifications, to correspond with the new settable property.
An example setup in pml would be:
using namespace 'Aveva.Core.Presentation'
nameCol = object COLUMNSPECIFICATION('name', 'name')
!paramCol = object COLUMNSPECIFICATION('despar 1', 'despar 1', 'real')
!seqCol = object COLUMNSPECIFICATION('NUM', 'SEQU')
!sequOwnerCol = object COLUMNSPECIFICATION('NUM OF OWN', 'NUM OF OWN', false, true
'integer')
!headingsColumnSpecified = ARRAY()
!headingsColumnSpecified[1] = !nameCol
!headingsColumnSpecified[2] = !paramCol
!headingsColumnSpecified[3] = !seqCol
!headingsColumnSpecified[4] = !sequOwnerCol
NetDataSource(String TableName, Array Attributes, Array Items)
NetDataSource(String TableName, Array Attributes, Array AttributeTitles, Array Items)
NetDataSource(String TableName, Array Attributes, Array Items, String Tooltips
NetDataSource(String TableName, Array Attributes, Array Items)
NetDataSource(String TableName, Array Attributes, Array Items)
NetDataSource(String TableName, Array Attributes, Array AttributeTitles, Array Items)
NetDataSource(String TableName, Array Attributes, Array AttributeTitles, Array Items)
NetDataSource(String TableName, Array Attributes, Array Items, String Tooltips
NetDataSource(String TableName, Array Attributes, Array Items, String Tooltips
These can be set to integer, double or string. With string being the default. Units and formats are applied on the string datatype of the column.
"real" variables (in pml speak) can be either an integer or a double, however for grid specific properties (sorting, etc.), there is a difference. This is due to the Third Party library being used for grids.
These can be set to integer, double or string. With string being the default. Units and formats are applied on the string datatype of the column.
These can be set to integer, double or string. With string being the default. Units and formats are applied on the string datatype of the column.
"real" variables (in pml speak) can be either an integer or a double, however for grid specific properties (sorting, etc.), there is a difference. This is due to the Third Party library being used for grids.
"real" variables (in pml speak) can be either an integer or a double, however for grid specific properties (sorting, etc.), there is a difference. This is due to the Third Party library being used for grids.
|
Add an XML Menu to the Form | Code has been added to the supplied addin to allow two different context menus to be used with the grid: a selection menu, and a header menu.
To enable this to work with your session you will need to use the Menu Customization utility described earlier in this document.
To add the menus you will need to do the following in the Menu Customization utility:
private void mCommandBarManager_UILoaded(object sender, EventArgs e)
{
String contextMenuKey = "NewAddin.SelectMenu";
if(mCommandBarManager.RootTools.Contains(contextMenuKey))
{
MenuTool menu = (MenuTool)mCommandBarManager.Root\-Tools[contextMenuKey];
mAddinControl.SelectionMenu = menu;
}
contextMenuKey = "NewAddin.HeaderMenu";
if(mCommandBarManager.RootTools.Contains(contextMenuKey))
{
MenuTool menu = (MenuTool)mCommandBarManager.Root\-Tools[contextMenuKey];
mAddinControl.HeaderMenu = menu;
}
}
private void
object
NewAddin.SelectMenu |
Add an Event to the Addin | There are several events which have been exposed for the AVEVA Grid Control. These are:
Refer to for Event handling.
Cell data is passed back to the calling application as an array before a change is made in a cell of the grid (This assumes that the grid is in editable mode or bulk editable mode). The fourth argument of the array (Array[3]) can be set to false by the calling application in order to disallow the new value of the cell.
Event to alert the user when the value of a cell is changed.
CopyKeyPressed (Array)
DeleteKeyPressed (Array)
The position of the mousedown, and an array of selected items is passed through to the calling application when the context menu is used on the grid.
private void netGridControl1_AfterSelectChange(System.Collections.ArrayLst args)
{
//Print the number of the selected rows in textbox2
if (args == null)
{
return;
}
Hashtable al = new Hashtable();
al = (Hashtable)args[0];
if (al == null)
{
return;
}
this.textBox2.Text = al.Count.ToString();
}
Array[0] is the Row Tag of the cell
Array[1] is the Column Tag of the cell
Array[0] is the Row Tag of the cell
Array[0] is the Row Tag of the cell
Array[1] is the Column Tag of the cell
Array[1] is the Column Tag of the cell
Array[0] is the new value the user typed in
Array[1] is the Row Tag of the cell
Array[2] is the Column Tag of the cell
Array[3] is a Boolean. If you set it to "false" then the action is cancelled
Array[4] is a string. If you set Array[3] to "false" then this value can be set to give the reason why the new value cannot be allowed. The message will be displayed in the cell tooltip.
Array[0] is the new value the user typed in
Array[0] is the new value the user typed in
Array[1] is the Row Tag of the cell
Array[1] is the Row Tag of the cell
Array[2] is the Column Tag of the cell
Array[2] is the Column Tag of the cell
Array[3] is a Boolean. If you set it to "false" then the action is cancelled
Array[3] is a Boolean. If you set it to "false" then the action is cancelled
Array[4] is a string. If you set Array[3] to "false" then this value can be set to give the reason why the new value cannot be allowed. The message will be displayed in the cell tooltip.
Array[4] is a string. If you set Array[3] to "false" then this value can be set to give the reason why the new value cannot be allowed. The message will be displayed in the cell tooltip.
Array[0] the rows to be deleted
Array[1] is a Boolean. If you set it to "false" then the action is cancelled
Array[2] is a string. If you set Array[1] to "false" then this value can be set to give the reason why the action has been cancelled. The message will be displayed in the cell tooltip.
Array[0] the rows to be deleted
Array[0] the rows to be deleted
Array[1] is a Boolean. If you set it to "false" then the action is cancelled
Array[1] is a Boolean. If you set it to "false" then the action is cancelled
Array[2] is a string. If you set Array[1] to "false" then this value can be set to give the reason why the action has been cancelled. The message will be displayed in the cell tooltip.
Array[2] is a string. If you set Array[1] to "false" then this value can be set to give the reason why the action has been cancelled. The message will be displayed in the cell tooltip.
Array[0] is a Boolean. If you set it to "false" then the action is cancelled
Array[1] is a string. If you set Array[0] to "false" then this value can be set to give the reason why the action has been cancelled. The message will be displayed in the cell tooltip.
Array[0] is a Boolean. If you set it to "false" then the action is cancelled
Array[0] is a Boolean. If you set it to "false" then the action is cancelled
Array[1] is a string. If you set Array[0] to "false" then this value can be set to give the reason why the action has been cancelled. The message will be displayed in the cell tooltip.
Array[1] is a string. If you set Array[0] to "false" then this value can be set to give the reason why the action has been cancelled. The message will be displayed in the cell tooltip.
Array[0] is a Boolean. If you set it to "false" then the action is cancelled
Array[1] is a string. If you set Array[0] to "false" then this value can be set to give the reason why the action has been cancelled. The message will be displayed in the cell tooltip.
Array[0] is a Boolean. If you set it to "false" then the action is cancelled
Array[0] is a Boolean. If you set it to "false" then the action is cancelled
Array[1] is a string. If you set Array[0] to "false" then this value can be set to give the reason why the action has been cancelled. The message will be displayed in the cell tooltip.
Array[1] is a string. If you set Array[0] to "false" then this value can be set to give the reason why the action has been cancelled. The message will be displayed in the cell tooltip.
Array[0] is the tag of the row
Array[1] is a tag of the column
Array[0] is the tag of the row
Array[0] is the tag of the row
Array[1] is a tag of the column
Array[1] is a tag of the column
Array[0] is a Boolean. It is true if any columns are in the group by mode.
Array[0] is a Boolean. It is true if any columns are in the group by mode.
Array[0] is a Boolean. It is true if any columns are in the group by mode.
Array[0] is a Boolean. If you set it to "false" then the action is cancelled
Array[1] is a string. If you set Array[0] to "false" then this value can be set to give the reason why the action has been cancelled. The message will be displayed in the cell tooltip.
Array[0] is a Boolean. If you set it to "false" then the action is cancelled
Array[0] is a Boolean. If you set it to "false" then the action is cancelled
Array[1] is a string. If you set Array[0] to "false" then this value can be set to give the reason why the action has been cancelled. The message will be displayed in the cell tooltip.
Array[1] is a string. If you set Array[0] to "false" then this value can be set to give the reason why the action has been cancelled. The message will be displayed in the cell tooltip.
Array[0] is a Boolean. If you set it to "false" then the action is cancelled
Array[1] is a string. If you set Array[0] to "false" then this value can be set to give the reason why the action has been cancelled. The message will be displayed in the cell tooltip.
Array[0] is a Boolean. If you set it to "false" then the action is cancelled
Array[0] is a Boolean. If you set it to "false" then the action is cancelled
Array[1] is a string. If you set Array[0] to "false" then this value can be set to give the reason why the action has been cancelled. The message will be displayed in the cell tooltip.
Array[1] is a string. If you set Array[0] to "false" then this value can be set to give the reason why the action has been cancelled. The message will be displayed in the cell tooltip.
Array[0] is a Boolean. If you set it to "false" then the action is cancelled
Array[1] is a string. If you set Array[0] to "false" then this value can be set to give the reason why the action has been cancelled. The message will be displayed in the cell tooltip.
Array[0] is a Boolean. If you set it to "false" then the action is cancelled
Array[0] is a Boolean. If you set it to "false" then the action is cancelled
Array[1] is a string. If you set Array[0] to "false" then this value can be set to give the reason why the action has been cancelled. The message will be displayed in the cell tooltip.
Array[1] is a string. If you set Array[0] to "false" then this value can be set to give the reason why the action has been cancelled. The message will be displayed in the cell tooltip.
Array[0] is the x coordinate of the current cursor position
Array[1] is the y coordinate of the current cursor position
Array[2] contains the ID of each of the selected rows
Array[0] is the x coordinate of the current cursor position
Array[0] is the x coordinate of the current cursor position
Array[1] is the y coordinate of the current cursor position
Array[1] is the y coordinate of the current cursor position
Array[2] contains the ID of each of the selected rows
Array[2] contains the ID of each of the selected rows
Array[0] is the row tag of the copied row
Array[1] is the drop index
Array[2] is a Boolean. If you set it to "false" then the action is cancelled
Array[3] is a string. If you set Array[2] to "false" then this value can be set to give the reason why the action has been cancelled. The message will be displayed in the cell tooltip.
Array[0] is the row tag of the copied row
Array[0] is the row tag of the copied row
Array[1] is the drop index
Array[1] is the drop index
Array[2] is a Boolean. If you set it to "false" then the action is cancelled
Array[2] is a Boolean. If you set it to "false" then the action is cancelled
Array[3] is a string. If you set Array[2] to "false" then this value can be set to give the reason why the action has been cancelled. The message will be displayed in the cell tooltip.
Array[3] is a string. If you set Array[2] to "false" then this value can be set to give the reason why the action has been cancelled. The message will be displayed in the cell tooltip.
Array[0] is the row tag of the copied row
Array[1] is the drop index
Array[2] is a Boolean. If you set it to "false" then the action is cancelled
Array[3] is a string. If you set Array[2] to "false" then this value can be set to give the reason why the action has been cancelled. The message will be displayed in the cell tooltip.
Array[0] is the row tag of the copied row
Array[0] is the row tag of the copied row
Array[1] is the drop index
Array[1] is the drop index
Array[2] is a Boolean. If you set it to "false" then the action is cancelled
Array[2] is a Boolean. If you set it to "false" then the action is cancelled
Array[3] is a string. If you set Array[2] to "false" then this value can be set to give the reason why the action has been cancelled. The message will be displayed in the cell tooltip.
Array[3] is a string. If you set Array[2] to "false" then this value can be set to give the reason why the action has been cancelled. The message will be displayed in the cell tooltip.
Array[0] is a Boolean. If you set it to "false" then the action is cancelled
Array[1] is a string. If you set Array[0] to "false" then this value can be set to give the reason why the action has been cancelled. The message will be displayed in the cell tooltip.
Array[0] is a Boolean. If you set it to "false" then the action is cancelled
Array[0] is a Boolean. If you set it to "false" then the action is cancelled
Array[1] is a string. If you set Array[0] to "false" then this value can be set to give the reason why the action has been cancelled. The message will be displayed in the cell tooltip.
Array[1] is a string. If you set Array[0] to "false" then this value can be set to give the reason why the action has been cancelled. The message will be displayed in the cell tooltip.
Note:
This event is the opportunity for the calling code to make a synchronising change to any related data source. In the case where the related data is Dabacon element/attribute data, the BeforeCellUpdate event should arrange for the Dabacon element/attribute to be modified appropriately. A convenient way to do this is to use the NetGridControl.DoDabaconCellUpdate(Array) function to perform the modification. Simply pass the Array to this function as an argument. If the function is unable to perform the modification for any reason the Array[3] and Array[4] values will be set to indicate the problem.
private void
if
null
return
;
new
null
)
{
return
;
}
this
Note
: |
Other Functionality Available within the Environment | Note:
The following additional functionality available with the Addin:
Note
: |
Use of the C# Grid Control with PML | The C# Grid Control can also be used on a PML form. See the PMLGridExample code in the Samples directory.
|
Grid Control API | The following table includes the API calls which have been made available for the Grid Control.
Name
Type
Purpose
BindToDataSource(NetDataSource)
Bind Grid to NetDataSource.
BindToDataSource(NetDataSource(Boolean)
Bind Grid to NetDataSource.
Boolean - keepColumnWidths.
NetDataSource(String TableName, Array Attributes, Array AttributeTitles, Array Elements)
Data Source constructor for database Attributes and database elements. The Grid will populate itself with database attribute values. The title of each column is represented by AttributeTitles.
NetDataSource(String TableName, Array Attributes, Array Elements)
Data Source constructor for database Attributes and database elements. The Grid will populate itself with database attribute values.
NetDataSource(String TableName, Array Attributes, Array Elements, String Tooltips)
Data Source constructor for database Attributes and database elements. The Grid will populate itself with database attribute values.
NetDataSource(String TableName, Array columns, Array of Array of rows)
Data Source constructor for column headings, and a set of row data. In this case the grid does NOT populate itself with database attribute values.
NetDataSource(String TableName, Array columns, Array of Array of rows, String Tooltips)
Data Source constructor for column headings, and a set of row data. In this case the grid does NOT populate itself with database attribute values.
NetDataSource(String TableName, string PathName)
Data Source constructor for import of an Excel or CSV File.
Name
Type
Purpose
AlignGroupHeaderVertcally(string GroupName, string Align)
Vertically align the group header (Bottom, Top, Middle, Default).
allGridEvents()
Query whether grid events are on or off
allGridEvents(Boolean)allGridEvents(Boolean)
Switch Grid Events On or Off.
AllowDropInGrid()
Query AllowDropInGrid.
AllowDropInGrid(Boolean)
Allow drag/drop in the grid.
BulkEditableGrid()
Query BulkEditableGrid.
BulkEditableGrid(Boolean)
Allow/disallow cells to be bulk editable. Bulk edit mode allows multiple cells to be selected, and Fill down/Fill up operations to be performed. Copy and Paste operations will also apply to multiple cells selected in the same column.
ClearGrid()
Remove data & column headings.
ClearGridData()
Remove all of the row data from the grid.
ColumnExcelFilter()
Query ColumnExcelFilter.
ColumnExcelFilter(Boolean)
Allow/disallow Excel style filter on columns.
ExcelFilterCaseSensitivity()
Query ExcelFilterCaseSensitivity.
ExcelFilterCaseSensitivity(Boolean)
Set Excel column filter to be case sensitive or not. Default is TRUE (case sensitive)
ColumnSetup()
Display the column setup form.
ColumnSummaries()
Query columnSummaries.
ColumnSummaries(Boolean)
Allow/disallow Average, Count, etc on numeric columns
createValueList(String Name, Array for List)
Create a value list for the grid.
DisplayNulrefAs()
Query DisplayNumrefAs.
DisplayNulrefAs(String)
Nominate (or query) a text string to be used in grid cells that hold "Nulref" reference attribute data.
DisplayUnsetAs()
Query DisplayUnsetAs.
DisplayUnsetAs(String)
Nominate (or query) a text string to be used in grid cells that hold "unset" attribute data.
EditableGrid()
Query EditableGrid
EditableGrid(Boolean)
Allow/disallow cells to be editable.
ErrorIcon()
Query ErrorIcon.
ErrorIcon(Boolean)
Allow/disallow the display of the red icon in the cell if an attribute value or expression cannot be computed.
FeedbackFailColor()
Query FeedbackFailColor.
FeedbackFailColor(String)
Nominate (or query) the colour used to highlight cells where editing fails.
FeedbackSuccessColor()
Query FeedbackSuccessColor
FeedbackSuccessColor(String)
Nominate (or query) the colour used to highlight cells successfully edited.
FixedHeaders()
Query FixedHeaders.
FixedHeaders(Boolean)
Allow/disallow fixed headers. (Useful when scrolling).
FixedRows()
Query FixedRows.
FixedRows(Boolean)
Allow/disallow fixing of rows (Useful when scrolling).
getDataSource()
NetDataSource
Returns the data source that has been set in the grid.
getGroups
Returns list of groups used in grid.
GetGroupOrigin(string grKey)
Return the origin of the given group.
GetGroupSpan(string grKey)
Return the span of the given group.
GridHeight()
Real
Query GridHeight.
GridHeight(Real)
Set the height of the rows in the grid.
getParentGroupForGroup(string groupName)
Returns parent's group name for given group.
getParentGroupForColumn(string colName)
Returns parent's group name for given column.
GroupMoving(String)
Set the moving of groups to: Default, NotAllowed, WithinBand or WithinGroup.
HeaderSort()
Query HeaderSort.
HeaderSort(Boolean)
Allow/disallow the user to sort columns.
HideGroupByBox()
Query HideGroupByBox.
HideGroupByBox(Boolean)
Hide/show the groupBy box.
loadFromMemoryStream(object data)
Load the grid from a stored memory stream.
loadGridFromXML(string xmlFile)
Load the grid from an XML file.
loadGridLayout(object gridLayout)
Load the stored layout of a grid.
loadLayoutFromXml(String)
Load a stored grid layout into the current grid instance.
OutlookGroupStyle
Query OutlookGroupStyle.
OutlookGroupStyle(Boolean)
Allow/disallow the Outlook Group style feature.
printPreview()
Opens a Print Preview of the grid instance (which also allows printing).
QuickReport()
Create a quick report from the current grid.
ReadOnlyCellColor()
Query ReadOnlyCellColor.
ReadOnlyCellColor(String)
Nominate (or query) the background colour used to indicate cells where editing is not permitted.
RefreshAllFilters()
Refresh all the filters in the grid.
RefreshTable()
For a grid displaying Dabacon data this recalculates the content of every cell to refresh to the latest database state.
RefreshVisibleRegion()
For a grid displaying Dabacon data this recalculates the content of every cell in the visible region to refresh to the latest database state.
resetCellFeedback()
Reset the cell editing feedback highlight colour and tooltip text.
ResetColumnProperties()
Reset column layout.
ResetGridOrder()
Reset the order of the columns in the grid.
saveGridToExcel(string excelFile)
Save the grid data to an Excel file.
saveGridToExcel(string excelFile, string worksheet)
Save the grid data to a designated worksheet of an Excel file. Note that this will retain all grid groupings and layout of data.
saveGridToExcel(string excelFile,string worksheet, string strHeader)
Save the grid data to a designated worksheet of an Excel file. Here strHeader is a user supplied string which is output to the first row in the Excel spreadsheet. The grid data is then output starting in row #2.
SaveLayoutToXml(String)
Save the grid layout (not data) to a file on the file system.
saveToMemoryStream(ref MemoryStream stream)
Save the grid to a memory stream.
setAlternateRowColor(Red Num, Green Num, Blue Num)
Set alternate rows of the grid to a different colour. The default is: (251, 251, 255).
setAlternateRowColor(String)
Set alternate rows of the grid to a different colour.
setLabelVisibility(Boolean)
Show/hide the label which indicates the number of rows in the grid.
SingleRowSelection()
Query SingleRowSelection.
SingleRowSelection(Boolean)
Set grid to single row selection.
splitGrid(Boolean)
Allow/disallow the user to split the grid horizontally and vertically.
SetGroupOrigin(string grKey, Point value)
Set of the {x,y} origin of the given group.
storeGridLayout()
Store the layout of the grid.
SetGroupSpan(string grKey, Point value)
Set of the {x,y} span of the given group.
SyntaxErrorColor()
Query SyntaxErrorColor.
SyntaxErrorColor(String)
Nominate (or query) the colour used to highlight cells containing syntactically invalid data.
WrapColumnHeaders(true)
Allow word wrap in column headers.
WrapColumnHeaders(false)
Disallow word wrap in column headers.
Name
Type
Purpose
addRow(Array)
Add a single row of data. If the grid is based on database elements then the first element of the array is read. If not, then the Array data represents the data in each cell of the row.
clearRowSelection()
Clear row selection.
deleteRows(Array)
Delete one or more rows by row tag.
deleteSelectedRows()
Delete selected rows.
GetFilteredInRows()
Array
Return the rows which are contained in the current filter.
GetFilteredOutRows()
Array
Return the rows which are not contained in the current filter.
getNumberRows()
Real
Get the number of rows in the grid.
getNumberSelectedRows
Real
Get the number of selected rows in the grid.
getRow(Real)
Get the row data.
getRow(string row)
Array
Get the cells in the row with the specified row tag.
getRowNumFromTag(string rowTag)
Get the row number from the row tag.
getRows()
Array of Array (rows)
Returns an array of all the row data.
getRowTag(Real)
Get the row tag.
getRowTagByListIndex(Real)
Get the row tag by list index.
GetSelectedRows()
Array of Array (rows)
Returns array of selected rows.
GetSelectedRowColumn(row, column))
Get the row and column of the selected row.
getSelectedRowTags()
Array of row tags
Get the selected row tags.
getVisibleIndexOfRow(string strRowTag)
Get the visible index of the row.
HasFilteredRows(Boolean)
Set whether the grid has filtered rows.
isRowVisible(Real)
Is the given row visible.
MoveRowToPosition(Real, Real)
Move a row to a given position in the grid.
MoveRowToPosition(String, Real)
Move a row to a given position in the grid.
MoveSelectedRowsDown()
Move the selected rows down in the grid.
MoveSelectedRowsUp()
Move the selected rows up in the grid.
NumberedRows
True if numbered rows, false if not.
returnSelectedRows(Array)
Return the selected rows.
RowAddDeleteGrid()
Query RowAddDeleteGrid.
RowAddDeleteGrid(Boolean)
Enable/disable row addition and deletion in the grid.
ScrollSelectedRowToView()
Query ScrollSelectedRowToView.
ScrollSelectedRowToView(Boolean)
Scroll the selected row into view.
selectAllRows()
Select all the rows in the grid.
selectRow(Real)
Select the given row.
setEditableRow(Real, BoolenanBoolean)
Set the given row as editable or not.
setRowColor(Real, string strColorcolour)
Set the colour of the row to the named value.
SetRowColor(string rowTag, string colour)
Set the colour of the row to the named value.
SetRowColor(string row, real red, real green, real blue)
Set the colour of the row to the RGB value.
setRowTooltip(Real, string tooltip)
Set row tooltip to the specified string.
setRowTooltip(string row, string tooltip)
Set row tooltip to the specified string.
setRowVisibility(Real, Boolean)
Set the visibility of the row.
setSelectedRows(Array)
Select the given rows.
setSelectedRowTags(Array)
Programmatically select the given row tags.
Methods on columns in the grid
Name
Type
Purpose
AlignColumnHeaderVertcally(string ColumnName, string Align)
Align the given column header vertically: Default, Top, Middle or Bottom.
assignBiCheckboxToColumn(Real)
Assign a bi-checkbox to the given column.
assignDataTypeToColumn(Real)
Assign data type "double" to the given column.
AssignDateTimeToColumn(double col)
Set table column with date time picker.
assignOptionSetToColumn(Real)
Assign a Yes/No option set to the given column.
assignValueListToColumn(String, Real)
Assign a value list (string) to the given column.
AutoFitColumns()
Resize columns to fit widest text.
CheckFixedHeaderIndicatorOnColumn(String)
Query FixedHeaderIndicatorOn Column.
CheckFixedHeaderOn Column(String)
Query FixedHeaderOnColumn.
ColumnsInGroupByBox()
Boolean
Returns true if there is at least one column in the GroupBy box.
ColumnMoving(String)
Allow/disallow column moving on the given column.
ColumnDisplayedAndSortedAscending(string key)
Set given column as displayed and sorted in ascending order.
ExtendLastColumn()
Query ExtendLastColumn.
ExtendLastColumn(Boolean)
Extend the last column.
FixedHeaderIndicatorOn Column(string column, Boolean)
Set fixed header indicator on the given column.
FixedHeaderOnColumn(string column, Boolean)
Fix the header on the column.
getColumn(Real)
Get the cells in the column.
getColumn(string column)
Array
Get the cells in the column with a specified tag.
GetColumnIndex(string colKey)
Get the column index of the given column.
getColumnKey(Real)
Get the key of the given column.
getColumnMask (Real)
Get the mask of the given column.
GetColumnOrigin(string colKey)
Get the column origin of the given column.
getColumnPosition(string column)
Real
Get the position of the column with the specified tag.
GetColumnSpan(string colKey)
Get the span of the given column.
GetColumnTitle(string column)
String
Get the title of the column with the specified tag.
getColumns()
Array of STRING
Get the columns in the grid.
getColumnsWithFilters()
Array of STRING
Get the columns in the grid with filters.
getTitles()
Array of strings
Get the titles for the columns in the grid.
getNumberColumns()
REAL
Return the number of columns.
GetSetFiltersOfGivenColumn(string col)
Get filters that are set in given column name.
getUserColumns()
Array
Get the columns in the column setup window.
GetUserColumnSpecifications
Array
Get the column specifications in the column setup window.
getUserTitles()
Array
Get the column titles in the column setup window.
Hashtable GetColumnsWithFilters()
Return all columns in the grid with filters.
isColumnVisible(Real)
Boolean
Query the visibility of the given column.
isColumnVisible(string column)
Boolean
Query the visibility of the specified column.
ResetColumnFilters()
Reset all of the column filters.
ResizeAllColumns()
Resize columns to fit in available width of form.
selectCell (Real, Real, Boolean)
Select/deselect the cell (row, column).
setColumnColor (Real, string colour)
Set the column colour to a string.
setColumnColor(string column, string colour)
Set the column colour to a string, for example, red.
setColumnImage(Real, string strImageFile)
Set the column image.
setColumnMask(Real, string strMask)
Set the column mask.
SetColumnOrigin(string colKey, Point value)
Set the origin of the given column.
setColumnPosition(string, realPoint value)
Set the position of the given column.
SetColumnSpan(string colKey, Point value)
Set the span of the given column.
setColumnTextAlignment(string column, string alignment)
Set the alignment of text in the column to CENTRE, CENTER, LEFT or RIGHT
setColumnVisibility(Real, Boolean)
Show/hide the specified column.
setColumnVisibility(String, Boolean)
Show/hide the specified column.
SetColumnWidth(Real, Real)
Set the column to a designated width.
SetColumnWidth(string column, real width)
Set the column to a designated width.
setColumnsWithFilters(Array)
Set the columns in the grid with the specified filters.
SetColumnWithFilters(string colName, Hashtable paramValues)
Set the column in the grid with specified filters and column names. This function requires to set columns and values in correct order, otherwise it won't set correctly
SetColumnWithFilters(string colName, Hashtable paramValues)
Set the column in the grid with the specified filters.
setEditableColumn(Real, Boolean)
Set the given column to be editable/uneditable.
setGroupByColumn(Real, Boolean)
Set the ability to group by column.
setNameColumnImage()
Displays standard icons in a "NAME" attribute column when database elements are used.
setNameColumnImage(boolean keepColumnWidth)
Displays standard icons in a "NAME" attribute column when database elements are used.
Additional parameter to set whether or not to maintain the column width.
sortColumnAscending(String)
Sort in ascending order the specified column.
sortColumnsAscending(Array)
Sort in ascending order the specified columns.
SortedColumnCollection()
Array
Get the sorted columns,
unsetNameColumnImage()
Remove the standard icons in the "NAME" attribute column when database elements are used.
Name
Type
Purpose
AssignDateTimeToCell(double col, double row)
Set table cell with date time picker.
assignValueListToCell(String, Real, Real)
Assign the given value list to the cell (row, column).
checkValueIsInCellValueList
Check if the value is in the Cells Value List
checkValueIsInValueList
Check if the value is in the Value List
DoDabaconCellUpdate(Array args)
This function is provided to support user code in the BeforeCellUpdate event when the grid is displaying Dabacon element/attribute data. The array provided as argument to the BeforeCellUpdate event can be passed on to this function to modify the Dabacon element/attribute in synchroniztion with the cell data. If the function is unable to perform the modification for any reason the Array[3] and Array[4] values will be set to indicate the problem. Refer to Add an Event to the Addin for further information.
DoDabaconElementCopy(Array args)
Do a Dabacon Element copy.
DoDabaconElementCreateAtPosition(Array args)
Do a Dabacon Element create at position in the hierarchy.
DoDabaconElementCreateFirst(Array args)
Do a Dabacon Element create at the first position in the hierarchy.
DoDabaconElementCreateLast(Array args)
Do a Dabacon Element create at the last position in the hierarchy.
DoDabaconElementDelete(Array args)
Do a Dabacon Element delete.
DoDabaconElementOrderUpdate(Array args)
Do a Dabacon element order update.
getCell(Real, Real)
Get the content of the cell in the specified row and column.
getCell(string rowTag, string columnTag)
STRING
Get the content of the cell in the specified row and column.
getCellByListIndex(string rowTag, string colTag)
Get the cell by list index.
isEditableCell(string strRowTag, string strColTag)
Boolean
Get whether or not the cell is editable.
removeValueListFromCell (Real, Real)
Remove the value list from the cell.
setCellColor(string rowTag, string columnTag, string colour)
Set the colour of a cell, for example: red.
setCellColor(string rowTag, string columnTag, real red, real green, real blue)
Set the colour of the cell to the RGB value.
setCellColor(Real, Real, Real, Real, Real, Real)
Set the colour of the cell to the RGB value.
setCellColor(Real, Real, Real)
Set the colour of the cell to the colour number.
setCellColor(Real, Real, String)
Set the colour of the cell.
setCellImage(Real, Real, String)
Set the image of the cell.
setCellImage(Real, Real, Image)
Set the image of the cell.
setCellTextAlignment(string rowTag, string columnTag, string alignment), where alignment=CENTRE, CENTER, LEFT, RIGHT
Set the alignment of text in the cell to CENTRE, CENTER, LEFT or RIGHT.
setCellTooltip(Real, Real, string strToolTip)
Set the tooltip of the cell.
setCellValue(Real, Real, string strVal)
Set the value of the cell.
setCellValue(string rowTag, string columnTag, string value)
Set a value in the cell.
setCellValueByListIndex (Real, Real, string strVal)
Set a value in the cell by list index.
setCellValueByListIndex(string rowTag, string columnTag, string value)
Set a value in the cell by list index.
setEditableCell(Real, Real, Boolean editable)
Enable/disable cell editing.
setEditableCell(string rowTag, string columnTag, Boolean editable)
Enable/disable cell editing.
setSelectedCellsValue(string strVal)
Set the value for all selected cells.
Other methods
Name
Type
Purpose
Updates()
Query updates.
Updates(Boolean)
Set whether or not database updates should be applied to the grid.
setErrorIcon(Image, Image)
Set the image of the icon to appear in a Dabacon grid when an error is generated.
LayoutFromColumnSpecs(bool keepColumnWidths)
Refresh layout of all columns.
MenuTool PopupMenu
Set the popup menu for the grid.
MenuTool PopupMenuHeader
Set the popup menu for the header of the grid.
RefreshGroupSort()
Refresh group sort (can be used when a new item is added).
CellSort : IComparer
The IComparer class to sort two grid cells.
Compare(object x, object y)
The compare algorithm to sort two grid cells
SuspendUpdates(Boolean)
Suspend updates to the grid.
DisplayStyle CellValueListDisplayStyle
The cell Value List display style (Always, OnMouseEnter, OnCellActivate, OnRowActivate).
Dictionary<string, ColumnLayout> GetCurrentColumnLayout()
Gets the layout detail for each column.
SetDateTimeDataFormat(|dd'/'MM'/'yyyy HH:mm:ss|)
Output/argument data[1] value if data[1] is dateTime type.
If the region is set to India/India English etc., the date time is normally returned as dd-MM-yyyy HH:mm:ss which will break the pre-set PML reading. This option sets the format as "dd'/'MM'/'yyyy HH:mm:ss" which forces the use of a slash instead of a hyphen.
Name
Type
Purpose
Updates()
Query updates.
Updates(Boolean)
Set whether or not database updates should be applied to the grid.
setErrorIcon(Image, Image)
Set the image of the icon to appear in a Dabacon grid when an error is generated.
LayoutFromColumnSpecs(bool keepColumnWidths)
Refresh layout of all columns.
MenuTool PopupMenu
Set the popup menu for the grid.
MenuTool PopupMenuHeader
Set the popup menu for the header of the grid.
RefreshGroupSort()
Refresh group sort (can be used when a new item is added).
CellSort : IComparer
The IComparer class to sort two grid cells.
Compare(object x, object y)
The compare algorithm to sort two grid cells
SuspendUpdates(Boolean)
Suspend updates to the grid.
DisplayStyle CellValueListDisplayStyle
The cell Value List display style (Always, OnMouseEnter, OnCellActivate, OnRowActivate).
Dictionary<string, ColumnLayout> GetCurrentColumnLayout()
Gets the layout detail for each column.
SetDateTimeDataFormat(|dd'/'MM'/'yyyy HH:mm:ss|)
Output/argument data[1] value if data[1] is dateTime type.
If the region is set to India/India English etc., the date time is normally returned as dd-MM-yyyy HH:mm:ss which will break the pre-set PML reading. This option sets the format as "dd'/'MM'/'yyyy HH:mm:ss" which forces the use of a slash instead of a hyphen.
Note:
Not all of the API calls have been exposed for PML use.
Note:
You can only use the AVEVA C# Grid Control on your own Visual Studio form if you have a design time license for Infragistics.
Note:
If the user is allowed to write data to the grid, then this data does not automatically get written back to the data source (or database). The BeforeCellUpdate event of the calling code is responsible for doing this synchronisation, and is in control of whether to either allow or disallow the change (Refer to Add an Event to the Addin for further information). This does not enable the user to add/remove rows, just to edit the content of the existing cells.
Note:
This will retain all grid groupings and layout of data. The String should specify the full pathname.
Add an Event to the Addin
Add an Event to the Addin
Note
:
Note
:
Data Source methods for populating the grid
Name
Type
Purpose
General methods available for the grid
Name
Type
Purpose
Note
:
Add an Event to the Addin
Note
:
Methods on rows in the grid
Name
Type
Purpose
Methods on columns in the grid
Name
Type
Purpose
Methods on cells in the grid
Name
Type
Purpose
Add an Event to the Addin
Other methods
Name
Type
Purpose |
Input Mask Characters | Masks can be set on data within a column. The mask will restrict the format and type of the data which can be entered into cells within the column. The mask can consist of the following characters:
#
Digit placeholder. Character must be numeric (0-9) and entry is required.
.
Decimal placeholder. The actual character used is the one specified as the decimal placeholder by the system's international settings. This character is treated as a literal for masking purposes.
,
Thousands separator. The actual character used is the one specified as the thousands separator by the system's international settings. This character is treated as a literal for masking purposes.
:
Time separator. The actual character used is the one specified as the time separator by the system's international settings. This character is treated as a literal for masking purposes
/
Date separator. The actual character used is the one specified as the date separator by the system's international settings. This character is treated as a literal for masking purposes.
\
Treat the next character in the mask string as a literal. This allows you to include the '#', '&', 'A', and '?' characters in the mask. This character is treated as a literal for masking purposes.
&
Character placeholder. Valid values for this placeholder are ANSI characters in the following ranges: 32-126 and 128-255 (keyboard and foreign symbol characters).
>
Convert all the characters that follow to uppercase.
<
Convert all the characters that follow to lowercase.
A
Alphanumeric character placeholder. For example: a-z, A-Z, or 0-9. Character entry is required.
a
Alphanumeric character placeholder. For example: a-z, A-Z, or 0-9. Character entry is not required.
9
Digit placeholder. Character must be numeric (0-9) but entry is not required.
-
Optional minus sign to indicate negative numbers. Must appear at the beginning of the mask string.
C
Character or space placeholder. Character entry is not required. This operates exactly like the '&' placeholder, and makes sure compatibility with Microsoft Access.
?
Letter placeholder. For example: a-z or A-Z. Character entry is not required.
Literal
All other symbols are displayed as literals; that is, they appear as themselves.
n
Digit placeholder. A group of n's can be used to create a numeric section where numbers are entered from right to left. Character must be numeric (0-9) but entry is not required.
mm, dd, yy
Combination of these three special strings can be used to define a date mask. mm for month, dd for day, yy for two digit year and yyyy for four digit year. Examples: mm/dd/yyyy, yyyy/mm/dd, mm/yy.
hh, mm, ss, tt
Combination of these three special strings can be used to define a time mask. hh for hour, mm for minute, ss for second, and tt for AP/PM. Examples: hh:mm, hh:mm tt, hh:mm:ss.
#
.
,
:
/
\
&
>
<
A
a
9
-
C
?
Literal
n
mm, dd, yy
hh, mm, ss, tt |
Data is a .NET addin | My Data is a .NET addin that allows database elements to be collected together in collections which are persisted between modules. The API to modify My Data is also available from PML.
My Data assembly can be imported as follows
IMPORT 'MyDataAddin'
handle any
endhandle
USING NAMESPACE 'Aveva.Core.Presentation.MyDataAddin'
!!mydata=object pmlmydata()
|
My Data API | The following api is then available on the My Data object.
PMLMyData
MyData constructor
AddElement(String elename)
Adds an orphaned element of given name
AddElements(Array elements)
Adds orphaned elements as array of strings
AddCollection(String name)
Add collection of given name
AddCollections(Array collections)
Add collections as an array of strings
AddElementToCollection(String elementName, String collectionName)
Add element of given name to collection of given name
AddElementsToCollection(Array elements, String collectionName)
Add elements as array of strings to collection of given name
RemoveElement(String elename)
Remove orphaned element of given name
RemoveElements(Array elements)
Remove orphaned elements as array of strings
RemoveAllElements
Remove all elements
RemoveCollection(String name)
Remove collection of given name
RemoveCollections(Array names)
Remove collections as an array of strings
RemoveAllCollections
Remove all collections
RemoveElementFromCollection(String elementName, String collectionName)
Remove given element from given collection
RemoveElementsFromCollection(Array elements, string collectionName)
Remove elements as array of strings from given collection
RemoveAllElementsFromCollection(String collectionName)
Remove all elements from given collection
RemoveAll()
Remove all orphaned elements and collections
Elements()
Array
Return orphaned elements as array of strings
ElementsInCollection(String collectionName)
Array
Return the elements in given collection as an array of strings
Collections()
Array
Return the collection names as an array of strings
RenameCollection(string oldName, string newName)
Rename given collection with new name
|
Using My Data from PML | From PML, elements and collections can be added, removed and edited. For example:
!!mydata.addElement('/VESS1')
!!mydata.addElement('/VESS2')
!!mydata.addElement('/PUMP1')
!!mydata.addElement('/PUMP2')
!a=object array()
!a[1]='/VESS1'
!a[2]='/VESS2'
!b=object array()
!b[1]='/PUMP1'
!b[2]='/PUMP2'
!!mydata.addElements(!a)
!!mydata.addElements(!b)
!!mydata.removeElement('/VESS1')
!!mydata.removeAll()
!!mydata.addElement('/VESS1')
!!mydata.addElement('/VESS2')
!!mydata.addElement('/PUMP1')
!!mydata.addElement('/PUMP2')
!!mydata.removeElements(!a)
!!mydata.addCollection('My collection1')
!!mydata.addCollection('My collection2')
!collections = object array()
!collections[1] = 'My collection3'
!collections[2] = 'My collection4'
!!mydata.addCollections(!collections)
!!mydata.removeCollection('My collection1')
!!mydata.removeCollection('My collection2')
!collections = object array()
!collections[1] = 'My collection3'
!collections[2] = 'My collection4'
!!mydata.removeCollections(!collections)
!!mydata.addCollection('My collection1')
!!mydata.addCollection('My collection2')
!!mydata.addElementToCollection('/VESS1', 'My collection1')
!!mydata.addElementToCollection('/VESS2', 'My collection2')
!!mydata.addCollection('My collection1')
!!mydata.addCollection('My collection2')
!a=object array()
!a[1]='/VESS1'
!a[2]='/VESS2'
!b=object array()
!b[3]='/PUMP1'
!b[4]='/PUMP2'
!!mydata.addElementsToCollection(!a, 'My collection1')
!!mydata.addElementsToCollection(!b, 'My collection2')
!!mydata.removeElementFromCollection('/VESS1', 'My collection1')
!!mydata.removeElementFromCollection('/VESS2', 'My collection1')
!!mydata.removeAllElements()
!!mydata.removeAllElementsFromCollection('My collection1')
!!mydata.removeAllCollections()
!!mydata.removeElementsFromCollection(!b, 'My collection2')
!!mydata.renameCollection('collectionA', 'collectionX')
!!mydata.renameCollection('collectionB', 'collectionY')
q var !!mydata.elements()
q var !!mydata.collections()
q var !!mydata.elementsInCollection('My collection1')
|
Open fiel browser window using pml syntax | A standard Windows file browser window can be opened by using PML syntax.
If no argument is given then the object will default to Open, otherwise the user can specify the value Open or Save.
You can query the object and the methods on the PMLFileBrowser instance as follows:
To show the File Browser dialog use the following syntax:
Directory
String
Default directory to display in File Browser.
Seed
String
Default value to be populated in the Name input box of the File Browser.
Title
String
Value to be displayed in the File Browser window title bar.
Exists
Boolean
Check if the input file exists.
Filter
String
The type of files to open. Must be in the format of a description, followed by "|" and then the file types - for example
Word Documents|*.DOC
or
Text files (*.txt)|*.txt|All files (*.*)|*.*
Index
Integer
For multiple strings, the index of the filter currently selected.
For example the following syntax could be entered at the command line.
After entering the command the following window will be displayed.
Use the following syntax to return the name of the file selected in the File Browser window.
import 'PMLFileBrowser'
using namespace 'Aveva.Core.Presentation'
!browser = object PMLFileBrowser('OPEN')
Q Var !browser
Q methods !browser
!browser.show(directory,seed,title,exists,filter,index)
!browser.show('C:\','abc.DOC','My Browser',true, 'Word Documents|*.DOC',1)
q var !browser.file()
Note:
The default values have been set as specified:
Open
Open
Save
Note
File Browser |
The configuration Manager | The Configuration Manager is a centralized repository for all configurations that allows easy migration to a DataBase (DB) backed storage and a unified Application Programming Interface (API) of applications. A modular system allows the Configuration Manager to deal with all the myriad configuration formats to provide backwards compatibility and a clear migration path. The Configuration Manager can be used by all applications that make use of the Common Application Framework (CAF) addins.
|
Configuration Manager Setup | The Configuration Database must first be set up in the Admin module, set up is then required in the Lexicon module.
There must be at least one DataBase (DB) of type Configuration in the Multiple DataBase (MDB). By default, a Config DB already exists which is a read only type with Core configurations. It is not recommended to use the default Config DB.
A config DB is created in the same way as any other DB and can be added to the MDB.
Once the Config DB is set, config sets must be created using the Command Window.
The example PML code can be used as a reference to create a Config Set World as well as Config Sets below it.
The example Programmable Macro Language (PML) code creates a Config Set World named EICONFIGWORLD and creates a Config Set named EICONFIGSET below it. Appropriate PML may be required to navigate to the right node Config DBs in the MDB or multiple Config Worlds already exist in the DB. The precedence value indicates the order in which the Config Sets must be considered, the higher the precedence value the higher the priority of the Config Set. It is not recommended to use precedence values above 3000 as some Core configurations make use of values above 3000.
The keys that point to the Configuration Manager values saved in the Config DB must be created in the Dictionary DB using the Lexicon module.
Valid Config Group World (CFFGGDW), Config Group (CFGGRP) and Config Key (CFGKEY) elements must be created.
The example can be used as a reference to create and configure a CFFGGDW element.
The example can be used as a reference to create and configure a CFGGRP element.
The CFGGRP must be populated with a Name and a valid Config key name. The Display name is an optional attribute.
The CFGGRP can contain multiple group elements as well as multiple key elements.
The example can be used as a reference to create and configure a CFGKEY element.
The CFGKEY must be populated with a Name, a Config Key name, a Config value type and a Uda type.
To use configuration, dbProviders must be instantiated appropriately when the module/ add-in, project is loaded.
An instance of IConfigurationManagerConsumer can be created. A configuration manager consumer is used to interact with the configurations and to create dbProviders.
A dbProvider can be created in the following way:
The parameters are self explanatory. The dbProvider must be associated with a parent group.
By default, the configuration provider initialises any configurations that are saved under the parent group. The created dbProviders must then be added to the configuration manager:
Only providers added to the configuration manager are available for use in the project.
Setting a value in a key requires dbProvider. For example:
The required dbProvider can be queried in various ways from the collection offered by the configuration manager consumer.
The Set method of DatabaseConfigurationProvider uses two arguments – the key name along with the group name and the value to be stored in the key. The value supplied is stored in the key passed to this method.
A configuration value can also be set using the ConfigurationManager. The configuration instance must be registered in one of the providers under ConfigurationManager. The ConfigurationManager does not load a configuration if it has no instances or values saved in it. Setting values using ConfigurationManager requires careful assessment before use.
To get values stored under a key, the key along with the group name must be passed to the get method. For example:
The configuration manager can be used to get a value if a valid config key exists.
goto frstw CONF
$* Sets
$P Creating config set world
new CFGSTW /EICONFIGWORLD
$P Creating config sets
new CFGSET /EICONFIGSET
Dname 'AVEVA EI options'
Desc 'AVEVA EI options'
Precedence 1
var dbProvider = new DatabaseConfigurationProvider(providerName, displayName, parentGroup,
precedence, "Startup", setName, active, set);
configurationManager.AddProvider(dbProvider);
dbProvider = null;
var configurationManager = EIDependencyResolver.ConfigurationManagerConsumer;
foreach(var provider in configurationManager.Providers)
{
if (provider.Name == "EICableSpecProvider")
{
dbProvider = provider as DatabaseConfigurationProvider;
}
}
//WRITE
dbProvider.Set(@"EICONFIGURATIONKEY/ELECCABLESPECKEY", specData.Electrical);
configurationManager.Get<string>(@"EICONFIGURATIONKEY/ELECCABLESPECKEY");
Note:
The commands do not produce any visible results in the Admin Explorer.
Note:
The Config value type must be set to 2 for strings.
Command Window
Note
:
Name
Config key name
Display name
Name
Config Key name
Config value type
Uda type
Note
:
Config value type
2
|
Use the Configuration Manager | A two phased approach can be used to implement the Configuration Manager.
Settings providers are requested on start-up and register any settings that can be provided.
Applications receive settings by requesting them by name from the ConfigurationManager
The Configuration Manager then asks each provider in turn, via a precedence, to provide a setting value. If the provider fails to supply a setting value, the Configuration Manager then asks the next provider. If no providers supply a value, the SystemDefault is returned.
A cache may be required for performance. Settings files could be read only when the first setting is requested (lazy loading) and all the other settings cached at that point. This approach allows a selective supply of providers and supports legacy settings.
Start read-only.
Existing data is replicated by creating legacy providers (perhaps one for each file type and one for environment variables). These providers are simple to write.
Existing applications are modified to use the Configuration Manager (it is recommended to move settings over gradually to minimize risk of error).
Add write capability.
New style providers are added to store settings in better places (for example, a database). Use the precedence to ensure these providers are preferred, with the legacy provider as a back-up.
New consumers are added for additional functionality:
To get a reference to the Configuration Manager:
Use appropriate Get/Set methods, for example:
Programmable Macro Language (PML) access to the configuration values is achieved via a C# object. The following methods are defined:
The Integer methods return a REAL value.
For Get methods with a default, the default value is returned if no value exists for that name.
The Set methods return a flag indicating if the set succeeded.
The following code creates an object:
ConfigurationManager.RegisterSetting("DateFormat");
string dateFormat = ConfigurationManager.GetSetting<string>("DateFormat", SystemDefault);
<SPAN>;</SPAN>
configurationManager.GetString(key);
string GetString(string key, string default)
string GetString(string key)
boolean GetBoolean(string key, boolean default)
boolean GetBoolean(string key)
real GetInteger(string key, real default)
real GetInteger(string key)
real GetDouble(string key, real default)
real GetDouble(string key)
string GetAsString(string key)
array GetEnumNames(string key)
array GetEnumValues(string key)
boolean SetString(key, value)
boolean SetBoolean(key, boolean value)
boolean SetInteger(key, real value)
boolean SetDouble(key, real value)
boolean SetFromString(string key, string value)
import 'Aveva.Core.Configuration.Implementation'
using namespace 'Aveva.Core.Configuration.Implementation'
!cm = object PMLConfigurationManager()
q var !cm.GetString('Isometrics/ALLTYPES/Text')
q var !cm.GetInteger('Isometrics/ALLTYPES/Integer')
q var !cm.GetDouble('Isometrics/ALLTYPES/Real')
q var !cm.GetBoolean('Isometrics/ALLTYPES/Boolean')
!cm.SetString('Isometrics/ALLTYPES/Text', 'Hello Aveva')
q var !cm.GetString('Isometrics/ALLTYPES/Text')
:
Integer input
text .listLength |Length of recently used list | callback '!this.conMan.SetInteger
(|Diagrams/GeneralOptions/SystemConfiguration/System/MRU_LIST_LENGTH|, !this.listLength.val.real())'
width 10 integer
Option (Drop-down)
option .isometrics01 |Drawing Size | callback '!this.conMan.SetInteger(|Isometrics/SHEETLAYOUT/DrawingSize|,
!this.isometrics01.selection(|rtext|).real())' width 24
!iso01 = !this.conMan.GetInteger(|Isometrics/SHEETLAYOUT/DrawingSize|)
!enumNames = !this.conMan.GetEnumNames(|Isometrics/SHEETLAYOUT/DrawingSize|)
!enumValues = !this.conMan.GetEnumValues(|Isometrics/SHEETLAYOUT/DrawingSize|)
!this.isometrics01.dText = !enumNames
!this.isometrics01.rText = !enumValues
!this.isometrics01.select('rtext','$!iso01')
Toggle
toggle .isometrics02 |Show Change Highlighting | callback '!this.conMan.SetBoolean(|Isometrics/CHANGEHIGHLIGHTING/HIGHLIGHTINDICATOR|,
!this.isometrics02.val)'
Configuration UI
Import/Export
Configuration UI
Configuration UI
Import/Export
Import/Export
ConfigurationManager.RegisterSetting("DateFormat");
string dateFormat = ConfigurationManager.GetSetting<string>("DateFormat", SystemDefault);
Examples of Get methods
Example of the Set method |
The AVEVA Standalone interface to build and develop customized applications | The AVEVA Standalone interface allows you to build and develop customized applications. Functionality is available to access and modify Dabacon based data programmatically, in a secure and authorized manner, with all validity and legality checks in place, without the need for a Graphical User Interface.
There are two standalone assemblies available for customization:
When using the AVEVA Standalone interface, developers can carry out the following procedures using a single standalone executable process:
Application or custom commands and macros can be called directly for execution without the need for user interaction.
Database API calls along with application commands and macros can be implemented.
Standalone.Start((int)ModuleName.Design, envHashTable);
//open project etc
PdmsMessage error;
if (!Standalone.Open(envHashTable["PROJECTNAME"].ToString(),
envHashTable["USER"].ToString(),
envHashTable["AUTH"].ToString(),
envHashTable["MDB"].ToString(),
out error))
{
error.Output();
}
// Do some basic Database work (business logic)
CheckDatabase();
// close and open an invalid project
Project.CurrentProject.Close();
Standalone.Finish();
Aveva.Core3D.Standalone
Supports, and is limited to, common core functionality and core command syntax graphs.
Aveva.E3D.Standalone
Supports AVEVA E3D Design functions and command syntax graphs. For example Model or Draw.
Aveva.Core3D.Standalone
Supports, and is limited to, common core functionality and core command syntax graphs.
Aveva.Core3D.Standalone
Aveva.E3D.Standalone
Supports AVEVA E3D Design functions and command syntax graphs. For example Model or Draw.
Aveva.E3D.Standalone
Launch the custom application as a specific module (for example, Model or Draw).
Login and open the project(s).
Run the business logic.
Save work, if required.
Unclaim all elements, if applicable.
Close the project and finish the process.
Launch the custom application as a specific module (for example, Model or Draw).
Launch the custom application as a specific module (for example, Model or Draw).
Login and open the project(s).
Login and open the project(s).
Run the business logic.
Run the business logic.
Save work, if required.
Save work, if required.
Unclaim all elements, if applicable.
Unclaim all elements, if applicable.
Close the project and finish the process.
Close the project and finish the process.
Standalone
ModuleName
//open project etc
PdmsMessage
Standalone
PROJECTNAME
USER
AUTH
MDB
out
// Do some basic Database work (business logic)
();
// close and open an invalid project
Project
.
Standalone |
Use AVEVA Standalone | To build and run the sample code.
SET AVEVA_DESIGN_EXE=C:\Program Files (x86)\AVEVA\
Everything3D2.10
Samples.zip
StandaloneExample
StandaloneExample
Visual Studio Command Prompt
StandaloneExample
AVEVA_DESIGN_EXE
AvevaStandalone.sln
app.config
app.config
AvevaStandaloneE3D.exe.config
AvevaStandaloneE3D.exe.config
Standalone.cs |
The Pipework application | The Pipework application is supplied as a module within the AVEVA E3D Design suite. The Pipework application enables the design and detail of complex pipework networks within a full 3D environment, with the support of tools to produce a clash-free design.
Once the 3D model has been produced, the Pipe Stress Interface - R2 provides a two-way exchange of information between AVEVA E3D Design and Rohr2. Piping designers and stress engineers can exchange design and stress information seamlessly, to eliminate data re-entry and duplication.
It is also possible to transfer stress data from Rohr2 to AVEVA E3D Design for hanger and support calculations.
Rohr2 can be acquired from:
Sigma Ingenieurgesellschaft mbH.
Bertha-von-Suttner-Allee 19
59423 Unna Germany
|
The UDA macrp file | In order to use the interface, additional User Defined Attributes (UDAs) and catalog data is required.
The UDA macro file (lexicon_psi_r2_uda.mac) contains attributes for loads and forces. The catalog macro file (paragon_psi_r2_uda.mac) contains parameterized NOZZle components which are used for the geometry display of imported pipes.
UDAs and Catalog Data are provided as Database (DB) Listings files. Both files are located in the installation path:
C:\Program Files (x86)\AVEVA\Everything3D3.1\asso_products\psi-r2\data
Two DBs must be provided for the Database Listings files:
Dictionary DB (type "dict", access update)
lexicon_psi_r2_uda.mac
Catalog DB (type "cata", access multiwrite)
paragon_psi_r2_uda.mac
Dictionary DB (type "dict", access update)
Dictionary DB (type "dict", access update)
lexicon_psi_r2_uda.mac
lexicon_psi_r2_uda.mac
Catalog DB (type "cata", access multiwrite)
Catalog DB (type "cata", access multiwrite)
paragon_psi_r2_uda.mac
paragon_psi_r2_uda.mac
Note:
Make sure that the DBs are included in every MDB.
Note:
Uninstall PSI and PSI-R2 before installing AVEVA E3D Design 3.1.2 and any later update releases.
Note
:
Note
: |
AVEVA E3D communicates with Rohr2 using ASCII files | AVEVA E3D Design communicates with Rohr2 using ASCII files. These files are stored in a directory that is declared by the environment variable %R2STRESS%. In addition, a Project-specific environment variable, %xyzR2STRESS%, can be used ("xyz" is the project code).
If both environment variables are set and both directories exist, the Project-specific directory is used.
It is recommended to use the Project-specific environment variable because of Project-related settings and different displacement files for each Project.
The following file extensions are used by the interface to transfer data:
Extension
Description
Direction
.ntr
File with geometry data.
AVEVA E3D Design to Rohr2.
.ntrerror
Log file for transfer of geometry.
.r2hangprop
File with data for hanger points.
Rohr2 to AVEVA E3D Design.
.r2hangerror
Log file for hanger points.
.r2disp
File for displacement data.
Extension
Description
Direction
.ntr
File with geometry data.
AVEVA E3D Design to Rohr2.
.ntrerror
Log file for transfer of geometry.
.r2hangprop
File with data for hanger points.
Rohr2 to AVEVA E3D Design.
.r2hangerror
Log file for hanger points.
.r2disp
File for displacement data.
An overview of the allowed Hanger Types is available. For further information, refer to Hanger Types.
Hanger Types
%R2STRESS%
%xyzR2STRESS%
Extension
Description
Direction
Hanger Types |
The transfer of geometry data | The transfer of geometry data is bound to the allowed type declaration of Rohr2. For example, it is not possible to transfer tee-fittings with three different bores or reducing elbows. It is also not possible to transfer reducers or elbows with an outlet.
Before transferring pipe systems, pipes must be checked for geometry and bore consistency, otherwise problems during data transfer cannot be excluded.
|
Provides a two way exchange of information between AVEVA E3D Design and the Rohr2 | Provides a two way exchange of information between AVEVA E3D Design and the Rohr2 pipe stress system.
Export
Exports geometry and material to Rohr2. For further information, refer to Export Geometry from E3D to Rohr2.
Displacement
Creates a 3D model for each loading case defined in the Rohr2 result file. The 3D model consists of Nozzles that indicate the displacement of the pipe system and can be displayed together with the original pipe system. For further information, refer to Thermal Displacements.
Support Value
Transfers pipe support data, calculated by Rohr2, to 3D model element attributes. For further information, refer to Import Hanger Attributes.
Settings
Defines data transfer settings between AVEVA E3D Design and Rohr2. For further information, refer to Data Transfer Settings.
Export
Exports geometry and material to Rohr2. For further information, refer to Export Geometry from E3D to Rohr2.
Displacement
Creates a 3D model for each loading case defined in the Rohr2 result file. The 3D model consists of Nozzles that indicate the displacement of the pipe system and can be displayed together with the original pipe system. For further information, refer to Thermal Displacements.
Support Value
Transfers pipe support data, calculated by Rohr2, to 3D model element attributes. For further information, refer to Import Hanger Attributes.
Settings
Defines data transfer settings between AVEVA E3D Design and Rohr2. For further information, refer to Data Transfer Settings.
Export Geometry from E3D to Rohr2
Thermal Displacements
Import Hanger Attributes
Data Transfer Settings
Export
Export Geometry from E3D to Rohr2
Displacement
Thermal Displacements
Support Value
Import Hanger Attributes
Settings
Data Transfer Settings |
Exports geometry and material from AVEVA E3D Design to Rohr2 | Exports geometry and material from AVEVA E3D Design to Rohr2.
The Export Data part of the AVEVA Pipe Stress Interface - R2 window displays the pipes/ branches for export.
When collecting the pipes of a pipe system for export to Rohr2, it is mandatory that the pipes are in a network. None of the branches may be isolated by the rest of the pipe system.
The current export list content is displayed and highlighted in the 3D view. The content can be checked for completeness. For example, a branch may not be collected because of missing references.
The highlight color can be modified. For further information, refer to Data Transfer Settings.
List Pipes / List Branches
Displays branches or pipes for export.
Add CE
Adds all branches below the current element to the export list.
Note: It is not checked if all elements are part of a single network or all branches are connected correctly.
Add Network
Adds all branches to the export list which are connected directly or indirectly to the current element.
Remove CE
Removes all branches below the current element from the export list.
Remove Network
Removes all branches from the export list which are connected directly or indirectly to the current element.
Remove Selected
Removes the selected elements from the export list.
Load Pipe List
Populates the export list with the content of a previously saved file.
Save Pipe List
Saves the content of the export list to a file.
Modify Hangers
Assigns hanger types to single hangers. Refer to Modify Hangers for further information.
Show Limits
Sets the limits of the 3D view to the content of the export list.
Show Labels
Displays selected pipe supports in the 3D view.
Label Types
Displays selected support attributes.
The option becomes active when Show Labels is selected.
Apply
Exports all selected branches. After collecting all geometry and material data, the file browser is opened in order to define the name and location of the transfer file. The file extension must be .ntr.
Additionally, a second file with the extension .ntrerror is created in the transfer directory. The log file contains all export error information.
Cancel
Discards any changes and closes the AVEVA Pipe Stress Interface - R2 window.
List Pipes / List Branches
Displays branches or pipes for export.
Add CE
Adds all branches below the current element to the export list.
Add Network
Adds all branches to the export list which are connected directly or indirectly to the current element.
Remove CE
Removes all branches below the current element from the export list.
Remove Network
Removes all branches from the export list which are connected directly or indirectly to the current element.
Remove Selected
Removes the selected elements from the export list.
Load Pipe List
Populates the export list with the content of a previously saved file.
Save Pipe List
Saves the content of the export list to a file.
Modify Hangers
Assigns hanger types to single hangers. Refer to Modify Hangers for further information.
Show Limits
Sets the limits of the 3D view to the content of the export list.
Show Labels
Displays selected pipe supports in the 3D view.
Label Types
Displays selected support attributes.
The option becomes active when Show Labels is selected.
Apply
Exports all selected branches. After collecting all geometry and material data, the file browser is opened in order to define the name and location of the transfer file. The file extension must be .ntr.
Additionally, a second file with the extension .ntrerror is created in the transfer directory. The log file contains all export error information.
Cancel
Discards any changes and closes the AVEVA Pipe Stress Interface - R2 window.
Note: It is not checked if all elements are part of a single network or all branches are connected correctly.
Data Transfer Settings
Modify Hangers
Export Data
AVEVA Pipe Stress Interface - R2
Data Transfer Settings
List Pipes / List Branches
Add CE
Note
:
Add Network
Remove CE
Remove Network
Remove Selected
Load Pipe List
Save Pipe List
Modify Hangers
Modify Hangers
Show Limits
Show Labels
Label Types
Show Labels
Apply
Cancel
AVEVA Pipe Stress Interface - R2 |
Assigns hanger types to single hangers. | Assigns hanger types to single hangers.
Support List
Displays all hangers associated with the pipes selected for export (ATTY unset or ATTY HANG).
Support Types
Displays all available hanger types for export.
Accept
Modifies the hanger points (USTHTYP attribute) for selected hanger points and hanger types.
Home
Displays the Export Data part of the AVEVA Pipe Stress Interface - R2 window.
Support List
Displays all hangers associated with the pipes selected for export (ATTY unset or ATTY HANG).
Support Types
Displays all available hanger types for export.
Accept
Modifies the hanger points (USTHTYP attribute) for selected hanger points and hanger types.
Home
Displays the Export Data part of the AVEVA Pipe Stress Interface - R2 window.
Support List
ATTY unset
ATTY HANG
Support Types
Accept
USTHTYP
Home
Export Data
AVEVA Pipe Stress Interface - R2 |
the stress calculation in Rohr2 | One result of the stress calculation in Rohr2 is the displacements based on thermal influences of the whole pipe system. The displacements can be displayed in AVEVA E3D Design.
For each loading case, a separate 3D model containing equipment elements with nozzles is created. The created 3D models can be displayed together with the original pipe.
In order to read the displacement files, a design Database (DB) with write access must be selected. In this DB, a site (for example, /R2) must be created. The PURPOSE attribute of that site must contain the value DISP.
If there is such a site in a read/write DB, it is displayed in the window.
It must be taken into account that imported 3D models of loading cases cause hard clashes in AVEVA E3D Design. It is recommended to import the 3D model in a DB that is not always current, to temporarily check loading cases.
The loading case 3D models are based on parameterized NOZZles. The nozzles represent two adjacent calculation points and the direct line between these two points, modelled by a cylinder. The pipe can also be displayed with insulation. In order to display insulation, the Obstruction and Insulation transparency should be set to 50%. For further information, refer to Representations.
PURPOSE
DISP |
Creates a 3D model for each defined loading case in the Rohr2 result file | Creates a 3D model for each defined loading case in the Rohr2 result file. The 3D model consists of Nozzles that indicate the displacement of the pipe system and can be displayed together with the original pipe system.
For each loading case of a calculated pipe system, Rohr2 writes one ASCII file with the extension .r2disp to the transfer directory. The files contain positions, with movement in X, Y, and Z directions, for each calculation point.
The files are displayed in the Import Displacements part of the AVEVA Pipe Stress Interface - R2 window and sorted by pipe systems and respective loading cases. The list can be refreshed.
Select the loading cases to be imported and click Load Cases to import files to the Database (DB).
The example below describes a created hierarchy:
Type
Name
Description
SITE
/DISP
ZONE
/DISP_28MAW30
The ZONE element contains all loading cases of the 28MAW30 system.
EQUI
/DISP_28MAW30_DL
The EQUI element contains the DL loading case.
SUBE
…/F0HAC10BR011/B1
The SUBE element contains the /F0HAC10BR011/B1 branch of the DL loading case.
NOZZ
…/F0HAC10BR011/B1_260-280
The NOZZ element represents the connection between calculation points 260 and 280.
Type
Name
Description
SITE
/DISP
ZONE
/DISP_28MAW30
The ZONE element contains all loading cases of the 28MAW30 system.
EQUI
/DISP_28MAW30_DL
The EQUI element contains the DL loading case.
SUBE
…/F0HAC10BR011/B1
The SUBE element contains the /F0HAC10BR011/B1 branch of the DL loading case.
NOZZ
…/F0HAC10BR011/B1_260-280
The NOZZ element represents the connection between calculation points 260 and 280.
After importing the loading cases, the Import Displacements part of the AVEVA Pipe Stress Interface - R2 window is updated. The Representations part of the AVEVA Pipe Stress Interface - R2 window is populated with the content of the DB.
Imported files are renamed from .r2disp to .r2dispold.
Imported loading cases are displayed per pipe system. For each pipe system, a single loading case and all branches of that system are listed. The display of loading cases can be switched on and off and superimposed with the original branch. Colors can be adjusted individually.
Only selected branches in the branch list are displayed in the 3D view. Select a system to update the 3D view with all system branches.
The example displays a superimposed pipe with calculated load cases.
Original pipe 3D model (blue).
Original pipe 3D model (blue).
Original pipe 3D model (blue).
Loading case 3D model 0_DEAD_LOAD (red).
Loading case 3D model 0_DEAD_LOAD (red).
Loading case 3D model 0_DEAD_LOAD (red).
Original pipe 3D model (blue) superimposed with loading case model 0_DEAD_LOAD (red).
Original pipe 3D model (blue) superimposed with loading case model 0_DEAD_LOAD (red).
Original pipe 3D model (blue) superimposed with loading case model 0_DEAD_LOAD (red).
Import
Displacements
AVEVA Pipe Stress Interface - R2
Load Cases
Type
Name
Description
SITE
/DISP
ZONE
/DISP_28MAW30
ZONE
EQUI
/DISP_28MAW30_DL
EQUI
SUBE
…/F0HAC10BR011/B1
SUBE
NOZZ
…/F0HAC10BR011/B1_260-280
NOZZ
Import
Displacements
AVEVA Pipe Stress Interface - R2
Representations
AVEVA Pipe Stress Interface - R2
0_DEAD_LOAD
0_DEAD_LOAD |
the UST-UDAs are not available | If the UST-UDAs are not available, a message is displayed asking to contact the system administrator. Without the UDAs, the interface does not work.
The error can be caused by:
The respective DICT Database (DB) is not created in the Admin module.
The respective DICT DB is not included in the current MDB or is deferred.
The required UDAs are not included in the DICT DB. For further information, refer to Prerequisites.
The DICT DB is not compiled.
The respective DICT Database (DB) is not created in the Admin module.
The respective DICT Database (DB) is not created in the Admin module.
The respective DICT DB is not included in the current MDB or is deferred.
The respective DICT DB is not included in the current MDB or is deferred.
The required UDAs are not included in the DICT DB. For further information, refer to Prerequisites.
The required UDAs are not included in the DICT DB. For further information, refer to Prerequisites.
The DICT DB is not compiled.
The DICT DB is not compiled.
Prerequisites
Prerequisites |
Rohr2 delivers design data for the design and construction of pipe hangers and supports | The design data for the hanger points of all pipe systems are stored in ASCII files with the extension .r2hangprop in the communication directory %R2STRESS% or %xyzR2STRESS% respectively. The values are transferred to the attributes of the corresponding support points.
|
Transfers pipe support data, calculated by Rohr2, to 3D model element attributes. |
If an r2hangprop file is not present in the communication directory, a message is displayed indicating that no files with hanger point data are available.
The .r2hangprop file contains all hanger point design data for a calculated pipe system. If the hanger point design data can be transferred without errors, the files are renamed from .r2hangprop to .r2hangpropold.
If write access is not available for at least one of the hanger points, or if the hanger point is in a read-only Database (DB), a window is displayed containing a list of hanger points that cannot be updated. Detailed error information is written to a file with the extension r2hangerror. The error file is created in the %xyzR2STRESS% directory or %R2STRESS% directory, respectively.
|
The support point attributes | The following support point attributes are set:
UDA name
Example
Description
:USTDYNLOAD
1.8 2.6 3.8
Dynamic load in X, Y, Z direction [kN].
:USTEREPORT
|Rep No 124711|
Elasticity report [text: max. 120 characters].
:USTFORCE
10 5.6 7.8
Forces in X, Y, Z direction [kN].
:USTHCOMP
|507845|
Spring or constant hanger part number.
:USTMAXTRAVEL
3.6
Maximum movement [mm].
:USTMOVEMENT
2.1 3.5 0.7 3.4 4.3
value: movement in y direction [mm].
value: movement in x direction [mm].
value: movement in z direction [mm].
value: positive dynamic movement [mm].
value: negative dynamic movement [mm].
:USTNODENUMB
1023
Hanger point node number.
:USTSRATE
4.5
Spring rate [N/mm].
:USTSTATLOAD
7.8
Static load [kN].
:USTTESTLOAD
4.3
Water test load [kN].
UDA name
Example
Description
:USTDYNLOAD
1.8 2.6 3.8
Dynamic load in X, Y, Z direction [kN].
:USTEREPORT
|Rep No 124711|
Elasticity report [text: max. 120 characters].
:USTFORCE
10 5.6 7.8
Forces in X, Y, Z direction [kN].
:USTHCOMP
|507845|
Spring or constant hanger part number.
:USTMAXTRAVEL
3.6
Maximum movement [mm].
:USTMOVEMENT
2.1 3.5 0.7 3.4 4.3
:USTNODENUMB
1023
Hanger point node number.
:USTSRATE
4.5
Spring rate [N/mm].
:USTSTATLOAD
7.8
Static load [kN].
:USTTESTLOAD
4.3
Water test load [kN].
UDA name
Example
Description
:USTDYNLOAD
:USTEREPORT
:USTFORCE
:USTHCOMP
:USTMAXTRAVEL
:USTMOVEMENT
:USTNODENUMB
:USTSRATE
:USTSTATLOAD
:USTTESTLOAD |
The UDAs USTHTYP and USTSCHTYP | The UDAs USTHTYP and USTSCHTYP contain hanger construction description abbreviations. The UDA USTHTYP describes the design-engineering. The UDA USTSCHTYP describes the calculated mode of operation at the hanger point.
The UDA USTHTYP is used to define a pre-selection for hanger design. The pre-selection is used in the Cascade software, owned by Witzenmann GmbH, Pforzheim (Germany). For example, the UDA value KH defines a constant hanger.
The following table displays Rohr2 definitions with no corresponding Witzenmann hanger type (none). In such cases, the definition must be produced in the Cascade software.
The table provides an overview of the most common hanger types.
Description
Witzenmann
Rohr2
UDA
:USTHTYP
:USTSCHTYP
General clamp
AC
None
Rigid support
GS
GS
Rigid hanger
SH
SH
Spring hanger
FH
FH
Constant hanger
KH
KH
General rigid support
GS
ST
Fix point
FP
FP
Friction bearing vertical
None
GL
Lateral thrust bearing vertical
None
FL
Axial stop
None
AX
Lateral stop horizontal
None
QS
Stauff-clamp
SC
None
Friction bearing + Axial stop vertical, axial
None
GLAX
Thrust bearing + Axial stop all movements
None
FLAX
Lateral stop + Axial stop horizontal lateral, axial
None
QSAX
Thrust bearing vertical, guiding in the global X axis
None
FLVX
Thrust bearing vertical, guiding in the global Y axis
None
FLVY
Thrust bearing vertical, guiding in the global Z axis
None
FLVZ
Thrust bearing vertical, guiding in the global X and Y axis
None
FLVXY
Thrust bearing vertical, guiding in the global X and Z axis
None
FLVXZ
Thrust bearing vertical, guiding in the global Y and Z axis
None
FLVYZ
Lateral stop in vertical pipe
None
QSV
Lateral stop in vertical pipe in the global X axis
None
QSVX
Lateral stop in vertical pipe in the global Y axis
None
QSVY
Lateral stop in vertical pipe in the global Z axis
None
QSVZ
General spring support
None
FS
Spring support
FS
FGL
Spring support + guidance
None
FFL
Spring support + axial stop
FS
FGLAX
Spring support + guidance + axial stop
FS
FFLAX
Spring support + guidance in vertical and global X direction
FS
FFLVX
Spring support + guidance in vertical and global Y direction
FS
FFLVY
Spring support + guidance in vertical and global Z direction
FS
FFLVZ
Spring support + guidance in vertical and global X and Y direction
FS
FFLVXY
Spring support + guidance in vertical and global X and Z direction
FS
FFLVXZ
Spring support + guidance in vertical and global Y and Z direction
FS
FFLVYZ
Constant support
KS
KGL
Constant support + guidance
KS
KFL
Constant support + axial stop
KS
KGLAX
Constant support + guidance + axial stop
KS
KFLAX
Constant support + guidance in vertical and global X direction
KS
KFLVX
Constant support + guidance in vertical and global Y direction
KS
KFLVY
Constant support + guidance in vertical and global Z direction
KS
KFLVZ
Constant support + guidance in vertical and global X and Y direction
KS
KFLVXY
Constant support + guidance in vertical and global X and Z direction
KS
KFLVXZ
Constant support + guidance in vertical and global Y and Z direction
KS
KFLVYZ
General pivot support
GS
GS
Rigid pivot support vertical
GS
GSV
Rigid pivot support lateral
GS
GSQ
Rigid pivot support axial
GS
GSAX
Rigid pivot support in vertical pipe lateral in global X direction
GS
GSQVX
Rigid pivot support in vertical pipe lateral in global Y direction
GS
GSQVY
Rigid pivot support in vertical pipe lateral in global Z direction
GS
GSQVZ
Elastic pivot support vertical
FS
FGSV
Elastic pivot support lateral
FS
FGSQ
Elastic pivot support axial
FS
FGSAX
Elastic pivot support in vertical pipe lateral in global X direction
FS
FGSQVX
Elastic pivot support in vertical pipe lateral in global Y direction
FS
FGSQVY
Elastic pivot support in vertical pipe lateral in global Z direction
FS
FGSQVZ
Constant pivot support vertical
KS
KGSV
Constant pivot support lateral
KS
KGSQ
Constant pivot support axial
KS
KGSAX
Constant pivot support in vertical pipe lateral in global X direction
KS
KGSQVX
Constant pivot support in vertical pipe lateral in global Y direction
KS
KGSQVY
Constant pivot support in vertical pipe lateral in global Z direction
KS
KGSQVZ
Description
Witzenmann
Rohr2
UDA
:USTHTYP
:USTSCHTYP
General clamp
AC
None
Rigid support
GS
GS
Rigid hanger
SH
SH
Spring hanger
FH
FH
Constant hanger
KH
KH
General rigid support
GS
ST
Fix point
FP
FP
Friction bearing vertical
None
GL
Lateral thrust bearing vertical
None
FL
Axial stop
None
AX
Lateral stop horizontal
None
QS
Stauff-clamp
SC
None
Friction bearing + Axial stop vertical, axial
None
GLAX
Thrust bearing + Axial stop all movements
None
FLAX
Lateral stop + Axial stop horizontal lateral, axial
None
QSAX
Thrust bearing vertical, guiding in the global X axis
None
FLVX
Thrust bearing vertical, guiding in the global Y axis
None
FLVY
Thrust bearing vertical, guiding in the global Z axis
None
FLVZ
Thrust bearing vertical, guiding in the global X and Y axis
None
FLVXY
Thrust bearing vertical, guiding in the global X and Z axis
None
FLVXZ
Thrust bearing vertical, guiding in the global Y and Z axis
None
FLVYZ
Lateral stop in vertical pipe
None
QSV
Lateral stop in vertical pipe in the global X axis
None
QSVX
Lateral stop in vertical pipe in the global Y axis
None
QSVY
Lateral stop in vertical pipe in the global Z axis
None
QSVZ
General spring support
None
FS
Spring support
FS
FGL
Spring support + guidance
None
FFL
Spring support + axial stop
FS
FGLAX
Spring support + guidance + axial stop
FS
FFLAX
Spring support + guidance in vertical and global X direction
FS
FFLVX
Spring support + guidance in vertical and global Y direction
FS
FFLVY
Spring support + guidance in vertical and global Z direction
FS
FFLVZ
Spring support + guidance in vertical and global X and Y direction
FS
FFLVXY
Spring support + guidance in vertical and global X and Z direction
FS
FFLVXZ
Spring support + guidance in vertical and global Y and Z direction
FS
FFLVYZ
Constant support
KS
KGL
Constant support + guidance
KS
KFL
Constant support + axial stop
KS
KGLAX
Constant support + guidance + axial stop
KS
KFLAX
Constant support + guidance in vertical and global X direction
KS
KFLVX
Constant support + guidance in vertical and global Y direction
KS
KFLVY
Constant support + guidance in vertical and global Z direction
KS
KFLVZ
Constant support + guidance in vertical and global X and Y direction
KS
KFLVXY
Constant support + guidance in vertical and global X and Z direction
KS
KFLVXZ
Constant support + guidance in vertical and global Y and Z direction
KS
KFLVYZ
General pivot support
GS
GS
Rigid pivot support vertical
GS
GSV
Rigid pivot support lateral
GS
GSQ
Rigid pivot support axial
GS
GSAX
Rigid pivot support in vertical pipe lateral in global X direction
GS
GSQVX
Rigid pivot support in vertical pipe lateral in global Y direction
GS
GSQVY
Rigid pivot support in vertical pipe lateral in global Z direction
GS
GSQVZ
Elastic pivot support vertical
FS
FGSV
Elastic pivot support lateral
FS
FGSQ
Elastic pivot support axial
FS
FGSAX
Elastic pivot support in vertical pipe lateral in global X direction
FS
FGSQVX
Elastic pivot support in vertical pipe lateral in global Y direction
FS
FGSQVY
Elastic pivot support in vertical pipe lateral in global Z direction
FS
FGSQVZ
Constant pivot support vertical
KS
KGSV
Constant pivot support lateral
KS
KGSQ
Constant pivot support axial
KS
KGSAX
Constant pivot support in vertical pipe lateral in global X direction
KS
KGSQVX
Constant pivot support in vertical pipe lateral in global Y direction
KS
KGSQVY
Constant pivot support in vertical pipe lateral in global Z direction
KS
KGSQVZ
*none = undefined
A particular hanger construction can be chosen for calculation in Rohr2.
USTHTYP
USTSCHTYP
USTHTYP
USTSCHTYP
USTHTYP
KH
Description
Witzenmann
Rohr2
:USTHTYP
:USTSCHTYP |
If a hanger is calculated with Rohr2, the UDA :USTSCHTYP contains the calculated data | If a hanger is calculated with Rohr2, the UDA :USTSCHTYP contains the calculated data. If the hanger point is transferred to Rohr2 again this data is used.
If the UDA is empty or contains invalid data, the UDA :USTHTYP is transferred to Rohr2 if it is valid.
If both UDAs contain invalid data, the default standard hanger type is transferred.
:USTSCHTYP
:USTHTYP |
the transfer procedure of Rohr2 data | During the transfer procedure of Rohr2 data, the calculated hanger type is written to the UDA :USTSCHTYP. Additionally, the Witzenmann hanger type is determined and written to the UDA :USTHTYP.
:USTSCHTYP
:USTHTYP |
the UST-UDAs are not available | If the UST-UDAs are not available, a message is displayed asking to contact the system administrator. Without the UDAs, the interface does not work.
The error can be caused by:
It is possible that write access to some support elements is not available due to claims, locks or general read-only access.
In addition to the error messages, all support elements that cannot be transferred are listed in an Error window. Error descriptions are listed in an r2hangerror file.
The respective DICT Database (DB) is not created in the Admin module.
The respective DICT DB is not included in the current MDB or is deferred.
The required UDAs are not included in the DICT DB. For further information, refer to Prerequisites.
The DICT DB is not compiled.
The respective DICT Database (DB) is not created in the Admin module.
The respective DICT Database (DB) is not created in the Admin module.
The respective DICT DB is not included in the current MDB or is deferred.
The respective DICT DB is not included in the current MDB or is deferred.
The required UDAs are not included in the DICT DB. For further information, refer to Prerequisites.
The required UDAs are not included in the DICT DB. For further information, refer to Prerequisites.
The DICT DB is not compiled.
The DICT DB is not compiled.
Prerequisites
Prerequisites
Error |
Defines data transfer settings between AVEVA E3D Design and Rohr2. | Defines data transfer settings between AVEVA E3D Design and Rohr2.
The AVEVA Pipe Stress Interface - R2: Settings window is opened with default values. Modified settings can be saved in a central .INI file (%R2STRESS%\rtwoexportoption.ini) or in a project specific .INI file (%xyzR2STRESS%\rtwoexportoption.ini). The window is then opened with saved values.
Order Description
Defines the order using description text. For further information, refer to Order Description.
General
Defines the environmental temperature and direction of gravity. For further information, refer to General.
Pipe/Pipe Components
Defines Pipe/Component data transfer settings. For further information, refer to Pipe/Pipe Components.
Expansion Joints
Defines expansion joint data transfer settings. For further information, refer to Expansion Joints.
Hangers and Supports
Defines hanger and support data transfer settings. For further information, refer to Hangers and Supports.
Load Settings File
Opens the file browser to load settings from a file.
Save Settings File
Opens the file browser to save the current settings to a file.
Apply
Applies the data transfer settings.
Cancel
Discards any changes and closes the AVEVA Pipe Stress Interface - R2: Settings window.
Order Description
Defines the order using description text. For further information, refer to Order Description.
General
Defines the environmental temperature and direction of gravity. For further information, refer to General.
Pipe/Pipe Components
Defines Pipe/Component data transfer settings. For further information, refer to Pipe/Pipe Components.
Expansion Joints
Defines expansion joint data transfer settings. For further information, refer to Expansion Joints.
Hangers and Supports
Defines hanger and support data transfer settings. For further information, refer to Hangers and Supports.
Load Settings File
Opens the file browser to load settings from a file.
Save Settings File
Opens the file browser to save the current settings to a file.
Apply
Applies the data transfer settings.
Cancel
Discards any changes and closes the AVEVA Pipe Stress Interface - R2: Settings window.
Order Description
General
Pipe/Pipe Components
Expansion Joints
Hangers and Supports
AVEVA Pipe Stress Interface - R2: Settings
Order Description
Order Description
General
General
Pipe/Pipe Components
Pipe/Pipe Components
Expansion Joints
Expansion Joints
Hangers and Supports
Hangers and Supports
Load Settings File
Save Settings File
Apply
Cancel |
Defines the order using description text. | Defines the order using description text.
The order information is displayed in report headings or drawings in Rohr2. Alternatively, AVEVA E3D Design commands or any standard text can be used. For example, CURRENT PROJECT.
AVEVA E3D Design commands must be entered directly, while standard text requires vertical bars as boundaries " | ".
CURRENT PROJECT |
Defines the environmental temperature and direction of gravity. | Defines the environmental temperature and direction of gravity.
Environment Temperature
Input a value to define the environment temperature.
Direction of Gravity
Available values are +X, - X, +Y, -Y, +Z, or -Z. The default value is -Z.
Colors
Modifies the export list colors. For further information, refer to Export Geometry from E3D to Rohr2.
Site
Defines the site name that the displacement model is read into.
Environment Temperature
Input a value to define the environment temperature.
Direction of Gravity
Available values are +X, - X, +Y, -Y, +Z, or -Z. The default value is -Z.
Colors
Modifies the export list colors. For further information, refer to Export Geometry from E3D to Rohr2.
Site
Defines the site name that the displacement model is read into.
Export Geometry from E3D to Rohr2
Export Geometry from E3D to Rohr2 |
Defines pipe/component data transfer settings. | Defines pipe/component data transfer settings.
Settings must be specified so that values can be determined by attributes or UDAs of PIPE, BRAN or BRAN MEM elements or associated elements, for example SPEC, SPCO or COMPREF.
PIPE
BRAN
BRAN MEM
SPEC
SPCO
COMPREF |
Defines expansion joint data transfer settings. | Defines expansion joint data transfer settings.
|
Defines hanger and support data transfer settings. | Defines hanger and support data transfer settings.
The AVEVA E3D Design elements ATTA, SHU, and SUPPO can be used for hanger or support points. The default value is the attachment point.
Attachment and support points are only transferred to Rohr2 if the value of the ATT type attribute is set to HANG, NULL, or is empty and the value of the FStatus attribute is not set to INSULATION.
Both elements are provided with the UDAs :USTHTYP (hanger type) and :USTSCHTYP (stress calculated hanger type).
The UDA :USTHTYP can be used to define a hanger type before stress calculation.
The selection is limited by the Witzenmann hanger types.
The UDA :USTSCHTYP is set by Rohr2 and contains the hanger type after stress calculation by Rohr2. If there is an equivalent Witzenmann hanger type, the UDA :USTHTYP is overwritten during import of Rohr2 data.
When transferring geometry to Rohr2, the UDA :USTSCHTYP is checked for a hanger type that has already been transferred from Rohr2. In that case, it would be transferred to Rohr2 again. If the UDA does not contain a valid value, the UDA :USTHTYP is analysed and transferred if necessary. If this UDA also does not contain a valid value, the standard hanger type is used.
The advantage of the procedure is that hanger types do not have to be defined AVEVA E3D Design. The stress calculator defines a default hanger type for the first stress calculation in Rohr2. For example, it is possible to define a constant hanger for steam pipes or a friction-type bearing for water pipes as a default.
The following alternatives can be selected:
Constant hanger <Standard>
Rigid hanger
Friction-type bearing
Spring hanger
Constant hanger <Standard>
Constant hanger <Standard>
Rigid hanger
Rigid hanger
Friction-type bearing
Friction-type bearing
Spring hanger
Spring hanger
ATTA
SHU
SUPPO
ATT
HANG
NULL
FStatus
INSULATION
:USTHTYP
:USTSCHTYP
:USTHTYP
:USTSCHTYP
:USTHTYP
:USTSCHTYP
:USTHTYP |
Implements complex structure in the R2 interface. | Implements complex structure in the R2 interface.
ATTA name !!attaname() and PCOM classification !!pcomClasses() are displayed in the AVEVA Pipe Stress Interface - R2: Settings window.
Both are provided as an example and placed in the PMLLIB path below userfunction. The !!attaname() as an example:
ATTA
!!attaname()
PCOM
!!pcomClasses()
AVEVA Pipe Stress Interface - R2: Settings
PMLLIB
userfunction
!!attaname()
-------------------------------------------------------
define function !!attaName() is string
if (!!ce.type inset('ATTA','ANCI','LUANCI')) then
return !!ce.stext & '-' & !!ce.:mdssuppfunc
else
return !!ce.name
endif
endfunction
------------------------------------------------------- |
Functionality is available to support the transfer of Lap Joint Stub End (LJSE) elements to Rohr2. | Functionality is available to support the transfer of Lap Joint Stub End (LJSE) elements to Rohr2.
The LJSE and the associated flange are combined into a single FLA component to be transferred to Rohr2.
The example displays a set of LJSE with associated lapped flanges.
When the LJSE is transferred to Rohr2, instead of being transferred as two separate components, the LJSE and FLAN are transferred as a single FLA entry in the Rohr2 neutral file. For example:
Because the two components from AVEVA E3D Design are combined into a single component, some of the transferred data is derived from the LJSE and some of the data is derived from the FLAN.
The table indicates how the data is transferred to the single FLA entry in the neutral file and what element the data is derived from.
Attribute
Expression
E3D Element
More Info
Component Description
NAME
LJSE
Material Description
MTXX
LJSE
Weight of elements (kg)
GWEI
FLAN + LJSE
Weight is the LJSE weight and FLAN weight added together.
Wall Thickness ppoint
1 (mm)
pwallt(1)
LJSE
Wall Thickness ppoint
2 (mm)
pwallt(2)
LJSE
Wall Thickness ppoint
3 (mm)
pwallt(3)
LJSE
Wall Thickness ppoint
4 (mm)
pwallt(4)
LJSE
Wall Thickness Outside Tolerance (%)
LJSE
Wall Thickness Inside Tolerance (%)
LJSE
Norm / Standard
FLAN
NORM obtained from the flange.
BTK
FLAN
The bolt thickness is taken from the flange.
Attribute
Expression
E3D Element
More Info
Component Description
NAME
LJSE
Material Description
MTXX
LJSE
Weight of elements (kg)
GWEI
FLAN + LJSE
Weight is the LJSE weight and FLAN weight added together.
Wall Thickness ppoint
1 (mm)
pwallt(1)
LJSE
Wall Thickness ppoint
2 (mm)
pwallt(2)
LJSE
Wall Thickness ppoint
3 (mm)
pwallt(3)
LJSE
Wall Thickness ppoint
4 (mm)
pwallt(4)
LJSE
Wall Thickness Outside Tolerance (%)
LJSE
Wall Thickness Inside Tolerance (%)
LJSE
Norm / Standard
FLAN
NORM obtained from the flange.
BTK
FLAN
The bolt thickness is taken from the flange.
Much like creating a set or weld neck flanges, the gasket is ignored completely and any geometry length of the gasket is added onto the length of one of the flanges in the flange set.
Attribute
Expression
E3D Element
More Info |
Database Concepts | This reference manual describes in detail the structure and methods of the internal databases used within AVEVA E3D Design. It is written for System Administrators who may be involved in maintaining projects, and the databases from which they are created.
|
Information is provided on project organization | Information is provided on project organization, the definition of teams and multiple database and the splitting of data across multiple databases.
|
create a Project | In order to create data, you must first create a Project.
A Project consists of:
A project starts with just the System, Comms and Misc DBs.
You will then have to create other DBs for users to work on. The various visible DB types are:
System
Contains details on DBs, Multiple Databases (MDBs), teams etc in the project
Dictionary
Contains User Defined Attribute (UDA) and User Defined Element Type (UDET) definitions
Property
Contains units for different properties
Catalog
Contains Catalog and specification information
Model
Contains Plant design information
Draw
Contains drawing information
SPOOL
Contains spool information
Materials
Contains hull material information
Diagrams
Contains Schematic information
Transaction
Used by Global to record transactions
SCHEMATIC
Contains PI&D (Schematic) information
MANU
Contains detailed manufacturing data
NSEQ
Stores name sequences
System
Contains details on DBs, Multiple Databases (MDBs), teams etc in the project
Dictionary
Contains User Defined Attribute (UDA) and User Defined Element Type (UDET) definitions
Property
Contains units for different properties
Catalog
Contains Catalog and specification information
Model
Contains Plant design information
Draw
Contains drawing information
SPOOL
Contains spool information
Materials
Contains hull material information
Diagrams
Contains Schematic information
Transaction
Used by Global to record transactions
SCHEMATIC
Contains PI&D (Schematic) information
MANU
Contains detailed manufacturing data
NSEQ
Stores name sequences
Typically there will be many DBs of each type within a project.
An example of a simple project is as follows:
DBs may be included from other projects.
Each DB has a unique DB number. User DBs have numbers in the range 1-7000. The range 7000-8000 is reserved for AVEVA supplied databases. The range 8000-8192 is reserved for system databases.
The DB number is assigned to the DB on creation. You may specify the DB number. If not specified by you then the next available DB number is used.
There may never be two DBs with the same DB number in a single project. Thus to include a DB from another project, that DB number must be unused in the target project.
One each of System, Comms, and Misc Databases (DBs)
Multiple Design, Catalog, Drawing, and Dictionary DBs
Various picture files
One each of System, Comms, and Misc Databases (DBs)
One each of System, Comms, and Misc Databases (DBs)
Multiple Design, Catalog, Drawing, and Dictionary DBs
Multiple Design, Catalog, Drawing, and Dictionary DBs
Various picture files
Various picture files
System
Dictionary
Property
Catalog
SPOOL
Materials
Diagrams
Transaction |
A Database (DB) belongs to one team | For ease of working DBs are grouped into Teams and Multiple Databases (MDBs). A Database (DB) belongs to one team, but may be in many MDBs. You must specify the MDB to work on when entering AVEVA E3D Design.
Details of DBs, teams, and MDBs are stored in the system database.
It can be seen that DB /A is only in MDB /X, whereas DB /B is in both MDB /X and /Y.
Team access controls fundamental write access. Members of Team1 will always have write access to DBs /A and /B, and read access to the remainder. For members of Team2 it will be the opposite way around.
If a DB is included from another project then it is always read only regardless of team membership.
These concepts are discussed in detail in the Administrator User Guide.
Administrator User Guide
Administrator User Guide |
Theoretically there need only be one Database (DB) of each DB type. | Theoretically there need only be one Database (DB) of each DB type. The main reasons for there being more are:
DBs are used as a fundamental means of access control. DBs are allocated to Teams, and only team members can modify a DB.
Whilst the multiwrite facilities allow many writers per DB, it eases contention if the writers are not all accessing the same DB.
The easiest way to run a Global project is to have different DBs writable at different locations.
The granularity of propagation and distribution in Global is per DB
It allows different permutations of Multiple Databases (MDBs).
It allows specific DBs to be hidden from sub contractors
Inclusion in other projects is done on a DB basis.
DBs are used as a fundamental means of access control. DBs are allocated to Teams, and only team members can modify a DB.
DBs are used as a fundamental means of access control. DBs are allocated to Teams, and only team members can modify a DB.
Whilst the multiwrite facilities allow many writers per DB, it eases contention if the writers are not all accessing the same DB.
Whilst the multiwrite facilities allow many writers per DB, it eases contention if the writers are not all accessing the same DB.
The easiest way to run a Global project is to have different DBs writable at different locations.
The easiest way to run a Global project is to have different DBs writable at different locations.
The granularity of propagation and distribution in Global is per DB
The granularity of propagation and distribution in Global is per DB
It allows different permutations of Multiple Databases (MDBs).
It allows different permutations of Multiple Databases (MDBs).
It allows specific DBs to be hidden from sub contractors
It allows specific DBs to be hidden from sub contractors
Inclusion in other projects is done on a DB basis.
Inclusion in other projects is done on a DB basis.
|
All data in a Dabacon database is stored in elements | All data in a Dabacon database is stored in elements. Every element has a type, for example BOX. The type of element determines the attributes available on the element.
Each DB type allows a different set of element types.
Database attributes are described in Database Attributes
The elements are organized in a primary hierarchy. This is described in Database hierarchy.
BOX
BOX |
Every element has a reference number, | Every element has a reference number, which is assigned when the element is created, and is unique to that element within the project. The reference number comprises two 32 bit integers. This is displayed in the form:
The first integer encodes the database number. This can be queried on the command line using Q DBNUMBER.
The second integer is a sequence number, starting at 0, and incrementing each time an element is created.
Thus, for example, the element with a reference number of =8193/0 will be the WORLD element (since this is always created first) created in Database (DB) 1.
The reference number is never changed once an element has been created.
|
In AVEVA E3D Design any element may be given a name | In AVEVA E3D Design any element may be given a name. The name always starts with a '/'. At the user level, it is this name that is typically used to identify an element. Names may of course be changed, thus there is no guarantee that the element named '/FRED' today is the same as the element named '/FRED' yesterday.
An element need not have a name. For these elements AVEVA E3D Design creates a constructed name, consisting of the relative position in the hierarchy up to the first named element.
for example, BOX 2 OF SUBEQUIPMENT 1 OF /VESS1
Whilst the constructed name can be used to identify elements, its use is even more volatile than named elements, since the order of an element in a member's list may change.
You can duplicate the name of an element in a Design (DESI), Production (MANU), Schematic (SCHE) or Engineering (ENGI) databases in the current MDB. For example an element can be named `/FRED´ in the DESI database and a different element can be named ´/FRED´ in the MANU database.
AVEVA E3D Design is case sensitive and AVEVA recommends you stick to UPPERCASE characters. If you create an element named /FRED and at some later time you try to find it by typing /fred or /FreD, it will not be found.
|
Current element | At the user level there is a concept of current element.
Most AVEVA E3D Design commands act on the current element. This is often referred to as the CE. There is an extensive set of commands to navigate around the database changing the CE.
|
Element type | For most elements, the element type may never be changed after creation. For example, once created, an element of type SITE will always be of type SITE until deleted.
There are a few exceptions to this rule where it makes sense. For example, BENDs may be changed to ELBOs and vice versa.
|
hierarchical data model | Information is provided on the hierarchical data model, the user defined hierarchies, the element instances and the use case of primary hierarchy.
|
The database schemas in AVEVA E3D Design are fixed by AVEVA. | The database schemas in AVEVA E3D Design are fixed by AVEVA.
You may, however, customize the allowed hierarchy using User Defined Element Types (UDETs).
A UDET must be based on an existing system type. For example, you may define a UDET :PUMP which is based on an Equipment. By default, a UDET will have the same allowed members and allowed owners as a base type. This can be customised to be a subset of that allowed on the base type, for example, you might decide that SUBE are not allowed under a :PUMP even though they are allowed under an Equipment (EQUI).
UDETs based on zones may own other UDETs based on zones. This allows very flexible data models to be built.
|
A new database (DB) starts | A new database (DB) starts with a single world element with name '/*'. Users will then create instances of other element types. For example, a system user might create an initial hierarchy of sites and zones in a Model DB, leaving it to other users to create the actual Plant items.
An element instance will always be created within the primary hierarchy. For example, a new ZONE element must be created under an existing SITE. It cannot be created as a 'freestanding' element outside the existing hierarchy.
The actual element hierarchy can be viewed with the AVEVA E3D Design explorer.
All element instances within a multiple Database (MDB) are accessible at all times.
|
The primary hierarchy | The primary hierarchy is used as follows:
It is used to create the 'constructed' name for unnamed elements.
When an element is deleted, all descendants in the primary hierarchy are deleted.
The COPY command will copy an element and all its primary descendants.
Claiming elements relies on the primary hierarchy.
Collections work on the primary hierarchy.
Most commands assume that the action is to be performed on the given element and its descendants in its primary hierarchy, for example,. adding a ZONE to a 3D view will add everything below that ZONE.
In the Design Database (DB), world positions and orientations are concatenated according to the primary hierarchy.
It is used to create the 'constructed' name for unnamed elements.
It is used to create the 'constructed' name for unnamed elements.
When an element is deleted, all descendants in the primary hierarchy are deleted.
When an element is deleted, all descendants in the primary hierarchy are deleted.
The COPY command will copy an element and all its primary descendants.
The COPY command will copy an element and all its primary descendants.
Claiming elements relies on the primary hierarchy.
Claiming elements relies on the primary hierarchy.
Collections work on the primary hierarchy.
Collections work on the primary hierarchy.
Most commands assume that the action is to be performed on the given element and its descendants in its primary hierarchy, for example,. adding a ZONE to a 3D view will add everything below that ZONE.
Most commands assume that the action is to be performed on the given element and its descendants in its primary hierarchy, for example,. adding a ZONE to a 3D view will add everything below that ZONE.
In the Design Database (DB), world positions and orientations are concatenated according to the primary hierarchy.
In the Design Database (DB), world positions and orientations are concatenated according to the primary hierarchy.
|
An element can only exist | An element can only exist once in the primary data hierarchy. Secondary hierarchies, such as Group Sets (GPSETs), allow elements to appear more than once in the overall hierarchy. For example a PIPE will appear below a ZONE in the primary hierarchy. The same PIPE may also be added to a GPSET element. This is useful for collecting elements according to different criteria.
The diagram below shows a typical multi hierarchy where the secondary links are dotted.
Most commands will work on secondary hierarchies. For example, if /GPSET1 is added to a 3D view then this is equivalent to adding both /VESS1 and /PUMP2 to the 3D view. However, there are exceptions to this. In particular deleting a GROUP will not delete the GROUP members; thus deleting /GPSET1 will not delete /VESS1 and /PUMP2.
Unlike the Primary hierarchy, secondary hierarchies may span different databases (DBs).
|
Every element may have a number of attributes | Every element may have a number of attributes. All elements have the following attributes:
NAME
the element's name
TYPE
the element's type
LOCK
if set, then the element may not be modified
OWNER
the element's owner
MEMBERS
the current members of the element
NAME
the element's name
TYPE
the element's type
LOCK
if set, then the element may not be modified
OWNER
the element's owner
MEMBERS
the current members of the element
The remaining attributes vary depending on the element type. The Database Schema defines which attributes are available on an element type. The allowed attributes for an element type may be ascertained using Programmable Macro Language (PML) objects and other command queries.
Attributes may be one of the following types:
Ref
Ref Array
Position
Direction
Orientation
Attribute
ElementType (or Noun)
A 'Ref' type is a pointer to another element. For example, on a BRANCH element the Connection Reference (CREF) attribute points to the connected NOZZLE. The use of Ref attributes enables AVEVA E3D Design to model networks and other cross relationships.
The attribute type dictates how the attribute can be set with PML or specific syntax.
NAME
TYPE
LOCK
OWNER
MEMBERS |
You can extend the allowed attributes for any element type | You can extend the allowed attributes for any element type, including a /ser Defined Element Type (UDET), by defining User Defined Attributes (UDAs). For example, you could define a UDA called :SUPPLIER of type string on all piping components. The newly defined UDA will then exist on all applicable elements, existing and new. If the definition of a UDA is changed then this will also apply to all existing instances.
Having defined a UDA, it is accessed in the same way as any other attribute.
|
In addition to the attributes stored on the database | In addition to the attributes stored on the database, there are a large number of pseudo attributes. The value of pseudo attributes is calculated at the time of making the query.
For example, the CUTLENGTH attribute on SCTN elements is a pseudo attribute calculated at the point of doing the query.
There is a lot of functionality presented via pseudo attributes. Currently there are over 1200 pseudo attributes.
Since the value of a pseudo attribute is calculated from other attributes, it is not generally possible to set their value directly.
|
Attributes and element types have a global name space | Attributes and element types have a global name space. This means that an attribute such as XLEN will have an identical meaning wherever it exists.
Similarly if an element type is valid in more than one database type, the definition of the element type will be identical in each.
|
introduction attributes | Some real attributes are simply numbers, counts, quantities etc. Others represent real physical quantities such as distances, areas, densities, angles etc. The type of physical quantity is called its physical dimension, often shortened in unambiguous contexts to its dimension. Real attributes (stored, derived, user defined etc.) can all be assigned a physical dimension and this determines the type of data stored in these attributes wherever and whenever they occur in the database. The most common dimensions of attributes are of length (internally set to either DIST or BORE). There are many others supported including density, mass, pressure, temperature, area, volume and angle.
The dimension of an attribute is held in the database in its (ambiguously named) UNIT field. It may be queried directly using the VAR ATTDEF attributeName UNIT syntax, and the !attribute.units() PML ATTRIBUTE object method, refer to PML ElementType Class.
PML ElementType Class
PML ElementType Class |
Information a database | Information is provided on database expressions and rules to define a database.
|
Database expression may be defined as a rule | Database expressions can be of the following types:
The contents of an expression may contain the standard operator and mathematical functions along with the names of attributes and element identification.
This expression simply multiplies the three attributes XLEN, YLEN, ZLEN together and then multiplies by two.
The attributes refer to the current element. If attributes of other elements are required then the OF syntax is used.
The 'OF' keyword makes sure that the AREA attribute is obtained from the owner of the current element rather than the current element itself.
The main uses of expressions are:
Database expressions are very similar to Programmable Macro Language (PML) expressions. The major difference is that database expressions may not contain other PML variables or functions. For example, (XLEN * !MYVAR) is not a valid database expression.
(XLEN * YLEN * ZLEN * 2)
(PURP EQ 'HS' AND AREA OF OWNER EQ 1)
algebraic
boolean (or logical)
text
Element ID
position
direction
orientation
algebraic
algebraic
boolean (or logical)
boolean (or logical)
text
text
Element ID
Element ID
position
position
direction
direction
orientation
orientation
Catalog parameterization
Template parameterization
Rules
Drafting line styles
User level collections and report
Catalog parameterization
Catalog parameterization
Template parameterization
Template parameterization
Rules
Rules
Drafting line styles
Drafting line styles
User level collections and report
User level collections and report
|
An attribute may be defined as a rule | An attribute may be defined as a rule. For example, the attribute XLEN may be defined as a rule by the expression (YLEN * 2).
The OF syntax is often used in Rule expressions to refer to other elements, for example, (YLEN OF /FRED * 2)
The result of the rule is stored against the attribute as for other attributes.
There are commands to recalculate the rule.
Rules may be either static or dynamic. If static, then the rule result will only be recalculated on demand. If dynamic, then the result will be recalculated every time an attribute within the expression changes, for example, for the above rule, if YLEN is modified, then XLEN will be recalculated automatically. The dynamic linkage of rules may be across elements and across Databases (DBs).
|
Database using data listings | Information is provided on the possibilities to dump out the database using data listings and the Reconfigurer.
|
Data listings DATALs | Data listings (DATALs) capture the state of the database in the form of AVEVA E3D Design commands. All element data including all attributes, User Defined Attributes (UDAs) and rules will be captured. They are similar in concept to Extensible Markup Language (XML) output. These files can then be read back in via the command line.
Data listings are used as follows:
Long term archiving
Copying parts of a Database (DB) between projects
For general information.
Long term archiving
Long term archiving
Copying parts of a Database (DB) between projects
Copying parts of a Database (DB) between projects
For general information.
For general information.
|
Reconfiguration DATAL Data listing | Reconfigurer is similar to Data Listing (DATAL) in that it dumps out the state of the data.
The data can be dumped to either binary or text file. Using binary files is quickest.
Reconfigurer is faster than DATAL and is recommended if whole DBs or world level elements are to be transferred. DATAL or the copy facilities is recommended if lower level elements are to be transferred.
|
Data Access Control | Data Access Control (DAC) is the mechanism that protects information handled by the system from accidental or unauthorised manipulation.
The basic access control available is known as 'Team Owning Databases'. It implements access control on database level by simply giving the members of the team owning the database full access and others read-only to data held in particular databases.
A more sophisticated access control is implemented in the form of Access Control Rights (ACRs). ACR allows the administrator of the system to apply a more fine grained access control over the model. The following figure illustrates the DAC database hierarchy.
An ACR is defined through two entities:
A PEROP defines the access rights given for a number of pre-defined operations for one or more elements.
One or more ACRs may be assigned to a user granting and denying access to the model.
For a user to gain update access to a particular element two rules apply:
Management tools are available for DAC through the Admin module. Control of DAC is also available through Programmable Macro Language (PML).
A PEROP consists of three parts:
The PEROP may further restrict the elements it applies to by a qualifying condition. The qualifying conditions is an AVEVA E3D Design statement that should evaluate to true to qualify the PEROP.
The following operations are available through PEROPs
Each of these operations may be set to
Allow
The operation is permitted
Disallow
The operation is not permitted
Ignore
The PEROP does not define whether this operation is permitted or not
Allow
The operation is permitted
Disallow
The operation is not permitted
Ignore
The PEROP does not define whether this operation is permitted or not
Optionally the PEROP may further restrict which attributes it allows modification to by specifying a list of attributes that it either includes or excludes from allowing modification to.
The PEROP also holds the message that the system will issue if the PEROP denies attempted operation.
A ROLE, which is a collection of rules called Permissible Operations (PEROPs).
A SCOPE, which defines to what part of the model the ROLE applies. The SCOPE may be an expression, for example, all ZONE WHERE (FUNC eq 'TEAMA')
A ROLE, which is a collection of rules called Permissible Operations (PEROPs).
A ROLE, which is a collection of rules called Permissible Operations (PEROPs).
A SCOPE, which defines to what part of the model the ROLE applies. The SCOPE may be an expression, for example, all ZONE WHERE (FUNC eq 'TEAMA')
A SCOPE, which defines to what part of the model the ROLE applies. The SCOPE may be an expression, for example, all ZONE WHERE (FUNC eq 'TEAMA')
At least one PEROP in a ROLE assigned to a USER must grant the update operation.
No one PEROP must explicitly deny the operation.
At least one PEROP in a ROLE assigned to a USER must grant the update operation.
At least one PEROP in a ROLE assigned to a USER must grant the update operation.
No one PEROP must explicitly deny the operation.
No one PEROP must explicitly deny the operation.
The Element it applies to
The operations which can be performed on those elements
Optionally the Attributes that may be modified.
The Element it applies to
The Element it applies to
The operations which can be performed on those elements
The operations which can be performed on those elements
Optionally the Attributes that may be modified.
Optionally the Attributes that may be modified.
Create
Modify
Delete
Claim
Issue
Drop
Output
Export
Copy
Create
Create
Modify
Modify
Delete
Delete
Claim
Claim
Issue
Issue
Drop
Drop
Output
Output
Export
Export
Copy
Copy
Allow
Disallow
Ignore |
Apply modifications | The following checks are applied to all modifications:
The claiming process is described in Claiming Elements.
Check access control
Check that the DB is open in write
Check that the element's LOCK flag is false
If a multiwrite Database (DB) then do a claim check, and claim if needed
Check access control
Check access control
Check that the DB is open in write
Check that the DB is open in write
Check that the element's LOCK flag is false
Check that the element's LOCK flag is false
If a multiwrite Database (DB) then do a claim check, and claim if needed
If a multiwrite Database (DB) then do a claim check, and claim if needed
|
The engineering integrity | The engineering integrity is always maintained for any database modification.
The integrity checks are applied below the database interface. Thus modifying the database is always safe whether done via PML commands or C#.
The checks are applied to individual attributes and element types. For example the OBST attribute can only ever be set to 0,1 or 2. AVEVA E3D Design will always check that this is the case prior to allowing the modification.
|
Elements may be created | Elements may be created. They are always created one at a time, and may only be created at a legitimate point in the primary hierarchy.
On creation, a unique reference number will be assigned. The method by which the default reference number is generated is described in User Defined Hierarchies.
It is possible to create an element with a specified reference number, provided it is unused and valid for the Database (DB). This functionality is provided for certain specialized situations (such as recreating an exact copy of a DB, so that all references to elements from other DBs remain valid), and is not recommended for general use.
The attributes will be set to their default values. In some cases the default attribute values are cascaded down from the owning element.
User Defined Hierarchies
User Defined Hierarchies |
Elements may be deleted | Elements may be deleted. All elements below the deleted element in the primary hierarchy will also be deleted.
Reference numbers of deleted elements are never reused.
|
Elements may be copied | Elements may be copied. There are options to copy a single element or an element and all its descendants. Elements may be copied between Databases (DBs). Any cross references entirely within the copied structure will be updated to point to the newly created elements.
Elements are always copied on top of an existing element of the same type.
There are various options on the copy command to allow:
Additional potential errors at create are:
The copied elements to be renamed according to a given criteria
Whether any attribute rules are to be rerun on the copied element. (Rules are described in Reconfigurer)
The copied elements to be renamed according to a given criteria
The copied elements to be renamed according to a given criteria
Whether any attribute rules are to be rerun on the copied element. (Rules are described in Reconfigurer)
Whether any attribute rules are to be rerun on the copied element. (Rules are described in Reconfigurer)
The element may not be copied to an element of a different type
The element may not be copied to an element of a different type
The element may not be copied to an element of a different type
Reconfigurer
Reconfigurer |
Elements may be moved | Elements may be moved to a different point in the Database (DB) or to a different DB.
The Element and all its descendants will be moved.
If the element is moved to a different DB, then its reference number is changed. All reference attributes pointing to the moved structure will be updated.
Additional potential errors at move are:
The element is not allowed in the members list of the new owner
The element is not allowed in the members list of the new owner
The element is not allowed in the members list of the new owner
|
Modifying Atrributes | The following checks are applied when modifying attributes:
Sometimes modifying one attribute will actually cause a number of attributes to change. There are two main cases where this might happen:
The integrity of cross referenced attributes is maintained when one end of the connection is changed. Changing one end of a connection will also change the following:
In essence, changing one value may result in four elements being updated.
For example, consider the following:
After setting the CREF on /N1 to /B1, the end result is:
|
A dynamic rule | A dynamic rule will automatically respond to changes which affect the attributes referred to in the rule.
For example, we set a rule on YLEN of /MYBOX to be (YLEN OF /FRED * 2). Thus if YLEN on /FRED changes then YLEN on /MYBOX will be updated automatically. However there are reasons why the automatic propagation of dynamic rules may fail, as follows:
Note also that only static rules are not automatically updated. For these reasons there are commands to verify that rule results are up to date.
|
defining a session by saving or getting the work | Information is provided on the handling of a session, for example, defining a session by saving or getting the work, creating a stamp, displaying the session history, setting a comparison date and merging changes.
|
flush operation | A new session is created for every flush operation. Thus it is much better to flush a large number of elements in one go rather than flush them individually.
|
Global allows Databases to be spread across different locations | Global allows Databases (DBs) to be spread across different locations. Global propagates changes from one location to another. The Global daemon does the propagation.
With global, there may be copies of a database or extract at multiple locations, but only one copy may be writeable. A database is said to be primary at a given location if it is writeable there, and secondary if it is not. A DB may be made primary at any location.
Different extracts from the same extract family may be primary at different locations. This allows multiple different locations to modify the same DB.
|
Change primary database (DB) | Changes made to a primary database (DB) are propagated to the read only secondary DBs. The propagation algorithm just sends the new sessions. For example:
If this case the propagation algorithm will send the sessions 20 to 39 to the secondary location.
|
Programmable Macro Language (PML) attribute | A Programmable Macro Language (PML) attribute instance may be created for a system attribute or a User defined Attribute (UDA).
The class should not be confused with the attribute value. The actual Attribute value for a particular Element can only be accessed via the DBREF class or via the QUERY command. Comparing two Attributes just compares whether they identify the same attribute, the comparison does not look at attribute values in any way.
|
Attribute | The Attribute instance can then be used for querying the ‘meta data’, that means, data about data. The methods of the class allow the following to be queried.
String Type()
Attribute type
String Name()
Attribute name
String Description()
Attribute description
Int Hash()
Attribute hash value
int Length()
Attribute length
bool IsPseudo()
Whether pseudo or not
bool IsUda()
Whether a User defined Attributes (UDA) or not
string querytext()
As output at the command line when querying attribute
string units
Either BORE, DISTANCE or NONE
Returns the unit field of the attribute which is the string of the hash code of the dimension of the attribute (BORE, DIST, MASS, ANGL, or for numbers of no physical quantity NONE). For UDAs it is the value of the UDA Type (UTYP) attribute.
bool Noclaim()
Whether attribute can be changed without doing a claim
ElementType array
ElementTypes
List of Elements for which the attribute is valid. This only works for UDAs
Real array limits
Min/Max values for real/int types
String array
ValidValues(ElementType)
List of valid for text attributes. The list may vary with element type
string DefaultValue
(ElementType)
Attribute default. This only works for UDAs
string Category()
Determines the grouping of attributes on the ‘Attribute Utility’ form
bool hyperlink()
if true then the attribute value refers to an external file
bool connection()
if true then the attribute value will appear on the reference list form
bool hidden()
If true then attribute will not appear on the Attribute utility form or after ‘Q ATT’
bool protected()
if true then attribute is not visible if a protected Databases (DB).
String Type()
Attribute type
String Name()
Attribute name
String Description()
Attribute description
Int Hash()
Attribute hash value
int Length()
Attribute length
bool IsPseudo()
Whether pseudo or not
bool IsUda()
Whether a User defined Attributes (UDA) or not
string querytext()
As output at the command line when querying attribute
string units
Either BORE, DISTANCE or NONE
Returns the unit field of the attribute which is the string of the hash code of the dimension of the attribute (BORE, DIST, MASS, ANGL, or for numbers of no physical quantity NONE). For UDAs it is the value of the UDA Type (UTYP) attribute.
bool Noclaim()
Whether attribute can be changed without doing a claim
ElementType array
ElementTypes
List of Elements for which the attribute is valid. This only works for UDAs
Real array limits
Min/Max values for real/int types
String array
ValidValues(ElementType)
List of valid for text attributes. The list may vary with element type
string DefaultValue
(ElementType)
Attribute default. This only works for UDAs
string Category()
Determines the grouping of attributes on the ‘Attribute Utility’ form
bool hyperlink()
if true then the attribute value refers to an external file
bool connection()
if true then the attribute value will appear on the reference list form
bool hidden()
If true then attribute will not appear on the Attribute utility form or after ‘Q ATT’
bool protected()
if true then attribute is not visible if a protected Databases (DB).
String Type()
Attribute type
String Name()
Attribute name
String Description()
Attribute description
Int Hash()
Attribute hash value
int Length()
Attribute length
bool IsPseudo()
Whether pseudo or not
bool IsUda()
Whether a User defined Attributes (UDA) or not
string querytext()
As output at the command line when querying attribute
string units
Either BORE, DISTANCE or NONE
Returns the unit field of the attribute which is the string of the hash code of the dimension of the attribute (BORE, DIST, MASS, ANGL, or for numbers of no physical quantity NONE). For UDAs it is the value of the UDA Type (UTYP) attribute.
bool Noclaim()
Whether attribute can be changed without doing a claim
ElementType array
ElementTypes
List of Elements for which the attribute is valid. This only works for UDAs
Real array limits
Min/Max values for real/int types
String array
ValidValues(ElementType)
List of valid for text attributes. The list may vary with element type
string DefaultValue
(ElementType)
Attribute default. This only works for UDAs
string Category()
Determines the grouping of attributes on the ‘Attribute Utility’ form
bool hyperlink()
if true then the attribute value refers to an external file
bool connection()
if true then the attribute value will appear on the reference list form
bool hidden()
If true then attribute will not appear on the Attribute utility form or after ‘Q ATT’
bool protected()
if true then attribute is not visible if a protected Databases (DB).
Note:
We do yet not support direct usage of this class in other syntax.
String Type()
String Name()
String Description()
Int Hash()
int Length()
bool IsPseudo()
bool IsUda()
string querytext()
string units
bool Noclaim()
ElementType array
ElementTypes
Real array limits
String array
ValidValues(ElementType)
string DefaultValue
(ElementType)
string Category()
bool hyperlink()
bool connection()
bool hidden()
bool protected()
Note
: |
ElementType | An ElementType instance may be created for a system Element type or a User Defined Element Type (UDET).
The ElementType instance can then be used for querying the ‘meta data’. which means,. data about data. The methods of the class allow the following to be queried.
|
The available methods | The available methods are:
string Name()
Name of element type
string Description()
Description of element type
int Hash()
Hash value
bool IsUdet()
Whether a User Defined Element Type (UDET) or not
Attribute array
systemAttributes()
List of system attributes (excludes User defined Attributes (UDAs))
string array DbType()s
List of valid Database (DB) types
string ChangeType()
Indicates if an element of this type may have it’s type changed
ElementType SystemType()
for UDETs this is the base type
ElementType array
UDETs derived from this type
bool Primary()
Whether the element is primary or not
ElementType array
MemberTypes()
Valid members, including UDETs
ElementType array
ParentTypes()
Valid parents, including UDETs
string Name()
Name of element type
string Description()
Description of element type
int Hash()
Hash value
bool IsUdet()
Whether a User Defined Element Type (UDET) or not
Attribute array
systemAttributes()
List of system attributes (excludes User defined Attributes (UDAs))
string array DbType()s
List of valid Database (DB) types
string ChangeType()
Indicates if an element of this type may have it’s type changed
ElementType SystemType()
for UDETs this is the base type
ElementType array
UDETs derived from this type
bool Primary()
Whether the element is primary or not
ElementType array
MemberTypes()
Valid members, including UDETs
ElementType array
ParentTypes()
Valid parents, including UDETs
string Name()
Name of element type
string Description()
Description of element type
int Hash()
Hash value
bool IsUdet()
Whether a User Defined Element Type (UDET) or not
Attribute array
systemAttributes()
List of system attributes (excludes User defined Attributes (UDAs))
string array DbType()s
List of valid Database (DB) types
string ChangeType()
Indicates if an element of this type may have it’s type changed
ElementType SystemType()
for UDETs this is the base type
ElementType array
UDETs derived from this type
bool Primary()
Whether the element is primary or not
ElementType array
MemberTypes()
Valid members, including UDETs
ElementType array
ParentTypes()
Valid parents, including UDETs
Note:
We do yet not support direct usage of this class in other syntax.
string Name()
string Description()
int Hash()
bool IsUdet()
Attribute array
systemAttributes()
string array DbType()s
string ChangeType()
ElementType SystemType()
ElementType array
bool Primary()
ElementType array
MemberTypes()
ElementType array
ParentTypes()
Note
: |
Pseudo attributes | There are a number of pseudo attributes that return values according to the element type, as follows:
HLIS
WORD(2000)
List of all possible types in owning hierarchy
LIST
WORD(2000)
List of all possible member types
LLIS
WORD(2000)
List of all possible types in member hierarchy
OLIS
WORD(2000)
List of all possible owner types
REPTXT
STRING
Reporter text used for element type
Attribute Name
Data Type
Qualifier
Description
HLIS
WORD(2000)
List of all possible types in owning hierarchy
LIST
WORD(2000)
List of all possible member types
LLIS
WORD(2000)
List of all possible types in member hierarchy
OLIS
WORD(2000)
List of all possible owner types
REPTXT
STRING
Reporter text used for element type
|
Database Modification | This chapter describes the commands to create, copy and modify database elements.
|
Database Modification | As well as accessing the current content of a Database (DB), you may also (if you have Read/Write access rights) modify a DB in any of the following ways:
Create a new element at an appropriate level of the DB hierarchy; refer to Create a New Element.
Delete an element from the DB hierarchy; refer to Delete an Element.
Reorganize the hierarchy, refer to Reorganize the DB Hierarchy:
by rearranging members of an element into a different list order.
by moving an element from one part of the hierarchy to another;
Define the attributes and offspring of a new element by copying the corresponding attribute, settings and member lists from another element; refer to Copy Attributes from One Element to Another.
Create a new element at an appropriate level of the DB hierarchy; refer to Create a New Element.
Create a new element at an appropriate level of the DB hierarchy; refer to Create a New Element.
Delete an element from the DB hierarchy; refer to Delete an Element.
Delete an element from the DB hierarchy; refer to Delete an Element.
Reorganize the hierarchy, refer to Reorganize the DB Hierarchy:
by rearranging members of an element into a different list order.
by moving an element from one part of the hierarchy to another;
Reorganize the hierarchy, refer to Reorganize the DB Hierarchy:
Define the attributes and offspring of a new element by copying the corresponding attribute, settings and member lists from another element; refer to Copy Attributes from One Element to Another.
Define the attributes and offspring of a new element by copying the corresponding attribute, settings and member lists from another element; refer to Copy Attributes from One Element to Another.
Create a New Element
Delete an Element
Reorganize the DB Hierarchy
Copy Attributes from One Element to Another
Create a New Element
Delete an Element
Reorganize the DB Hierarchy
Copy Attributes from One Element to Another |
Creation of a new element | 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.
You can then create a new element, set its attributes and, if required, create further elements as its members.
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)
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.
The command
adds a new Tee at list position 5 (between /VALV1 and /ELBO2) and names it /TEE2. The Member List of /BRAN1 thus becomes
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.
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:
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
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.
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 element_type element_name
(element_name is optional)
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
NEW TEE /TEE2
NEW element_type element_name BEFore list_position
NEW element_type element_name AFTer list_position
NEW SITE /MYSITE DB MYTEAM/MYDB
Note:
The Q LIST query will tell you which element types you can create as members of the Current Element.
Database Navigation and Query Syntax
Database Navigation and Query Syntax
Database Navigation and Query Syntax
Note
:
NEW element_type element_name
Database Navigation and Query Syntax
NEW TEE AFTER /ELBO3
NEW TEE BEFORE 8
NEW TEE BEFORE FLAN 2
NEW TEE AFTER LAST ELBO
NEW TEE AFTER NEXT 3
NEW TEE BEFORE LAST FLAN
NEW
element_type element_name
DB
database_name
element_name
database_name
team/database |
Delete GPSET | You can delete either the entire Current Element or some or all of its offspring. When you delete the Current Element, you also delete all of its offspring (that is, its members, their members, etc.) from the hierarchy. The command must therefore be used with care. When an element has been deleted, its Owner becomes the new Current Element.
As a safeguard against accidental deletion of parts of a DB, the deletion function operates only on the Current Element. As further safeguards, the DELETE command word must be entered in full and the command syntax requires that you confirm the generic type of the Current Element. Furthermore, access to the required element and its subsequent deletion must be specified in two separate command lines.
To delete the Current Element and all its offspring, enter
For example, to delete a Nozzle, make the Nozzle the Current Element and then enter
The Equipment which owned the Nozzle becomes the Current Element.
To delete a complete Zone, including all Equipment, Piping, Structures etc. owned by it, make the Zone the Current Element and then enter
The Site which owned the deleted Zone becomes the Current Element.
To delete only specified members of the Current Element, use one of the following forms of the command syntax:
DELETE element_type MEMbers
(deletes all members)
DELETE element_type MEMbers integer
(deletes one member)
DELETE element_type MEMbers integer TO integer
(deletes a range of members)
(deletes all members)
(deletes one member)
(deletes a range of members)
Consider the following examples, where the Current Element is /BRAN1 with the Member List illustrated in Figure 10-2:
DELETE BRAN MEMBERS
Deletes all components from the Branch, leaving only the Branch Head and Tail
DELETE BRAN MEMBER 6
Deletes only /TEE1
DELETE BRAN MEMBERS 5 TO 7
Deletes /ELBO2, /TEE1 and /ELBO3
Deletes all components from the Branch, leaving only the Branch Head and Tail
Deletes only /TEE1
Deletes /ELBO2, /TEE1 and /ELBO3
DELETE element_type MEMbers
(deletes all members)
DELETE element_type MEMbers integer
(deletes one member)
DELETE element_type MEMbers integer TO integer
(deletes a range of members)
DELETE BRAN MEMBERS
Deletes all components from the Branch, leaving only the Branch Head and Tail
DELETE BRAN MEMBER 6
Deletes only /TEE1
DELETE BRAN MEMBERS 5 TO 7
Deletes /ELBO2, /TEE1 and /ELBO3
DELETE NOZZ
DELETE ZONE
DELETE
DELETE element_type MEMbers
DELETE element_type MEMbers integer
DELETE element_type MEMbers integer TO integer
DELETE BRAN MEMBERS
DELETE BRAN MEMBER 6
DELETE BRAN MEMBERS 5 TO 7 |
Structure of the Database hierarchy | You can reorganize the structure of the Database (DB) hierarchy, without elements being added to or removed from its contents, in either of two ways:
In both cases elements and their offspring are transferred to new positions in the hierarchy. In the first case the element's owner remains unchanged, while in the second case the element's owner changes.
To rearrange the Member List of the Current Element (CE), use one of the commands:
where element_id specifies an element which is to be moved (which must be a member of the Current Element) and where list_position may be specified in any of the ways described in Database Navigation and Query Syntax.
If list_position is omitted, the intended position is assumed to be immediately after the Current List Position.
For example, starting with the previous Member List:
The command
moves /ELBO3 to position 5, immediately following the Current List Position, giving the new Member List
Starting from either of the above configurations, the command
moves /ELBO3 to position 3, immediately before /ELBO1, thus
To insert an existing element into the Member List of the Current Element, when it is not already a member of that list, use one of the commands
where element_id specifies an element which is to be moved (which may be anywhere within the DB hierarchy as long as it is at an appropriate level) and where list_position may be specified in any of the ways described in Database Navigation and Query Syntax.
If list_position is omitted, the intended position is assumed to be immediately after the Current List Position.
For example, starting with the simple hierarchy
the command
moves /PIPE2 (and all its offspring) to the position immediately following the Current List Position. Ownership of /PIPE2 passes from /ZONE2 to /ZONE1, resulting in the new hierarchy
REOrder element_id
REOrder element_id BEFore list_position
REOrder element_id AFTer list_position
REORDER /ELBO3
REORDER /ELBO3 BEFORE FIRST ELBO
INCLude element_id
INCLude element_id BEFore list_position
INCLude element_id AFTer list_position
INCLUDE /PIPE2
By rearranging the order of the Member List of a single element
By relocating an element to a different part of the hierarchy
By rearranging the order of the Member List of a single element
By rearranging the order of the Member List of a single element
By relocating an element to a different part of the hierarchy
By relocating an element to a different part of the hierarchy
Database Navigation and Query Syntax
Database Navigation and Query Syntax
Database Navigation and Query Syntax
Lude element_id
INCLude element_id BEFore list_position
INCLude element_id AFTer list_position
Database Navigation and Query Syntax |