.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)


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
:


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.


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


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
:


The C# Grid Control can also be used on a PML form. See the PMLGridExample code in the Samples directory.


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


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


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()


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


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 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.


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


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


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 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


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 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 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.

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.

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


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. 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


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 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 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 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


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


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.

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.

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.

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.
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 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