Web Search

PML Customisation
Introduction
PMLs Character Format
Customising a Graphical User Interface
Serious Warning About PML Customisation
Guide Structure
Hints on the Trying the Examples
Minimising Problems for Future Upgrades
Current PML2 Naming Convention
Note for Users Familiar with OO Concepts
Variables, Objects, Functions and Methods
Object Types
Members and Attributes
User-defined Object Types
Storing Object Type Definitions
Creating Variables (Objects)
Local and Global Variable Names
Notes on Naming Conventions
Creating a Variable with a Built-in Type
Creating Other Types of Variable
Using the Member Values of an Object
PML Functions and Methods
Storing and Loading PML Functions
PML Procedures
Arguments of type ANY
Using the Methods of an Object
Example
Methods on User-Defined Object Types
Method Overloading
Constructor Methods with Arguments
Overloading with ANY
Invoking a Method from Another Method
Developing a PML Object with Methods
Unset Variable Representations
UNSET Values and UNDEFINED Variables
Deleting PML Variables
Forms as Global Variables
General Features of PML
Comments in PML Files
Leaving a PML File with the RETURN Command
Case Independence
Abbreviations
Special Character $
Text Delimiters
Filename Extensions
Storing and Loading PML Files
Rebuilding All PML File Indexes
Querying the Location of PML Files
PML Expressions
Format of Expressions
Operator Precedence
Boolean Operators
Concatenation
Nesting Expressions
Units in Real Expressions
PML 1 and PML 2 Expressions
PML 2 Expressions
Control Logic
IF Construct
Nesting if-constructs
BOOLEAN Expressions and if Statements
IF TRUE Expression
DO Loops
Stopping a DO loop: break and breakif
Skipping Commands in a DO Loop using Skip or Skip if
Nested DO Loops
DO INDEX and DO VALUES
Jumping to a Labelled Line
Conditional Jumping to a Labelled Line
Illegal Jumping
Arrays
Arrays of Arrays (Multi-dimensional Arrays)
Array Methods
Appending a New Element to an Existing Array
Deleting an Array Element
Deleting an Array
Splitting a Text String into Array Elements
Length of String Array Elements
Sorting Arrays Using Array Methods
Sorting Arrays using the VAR Command
Subtotalling Arrays with the VAR Command
Arrays of Objects
Block Evaluation And Arrays
Using Block Evaluate to Sort an Array of Objects
DO VALUES and DO INDICES with Arrays
Macros
Naming and Running Macros
Macros with Arguments
Using Macros and Functions Together
Synonyms in PML Macros and Functions
Using PML in AVEVA Products
Composing Text
Defining Variables for Late Evaluation (Rules)
Using PML in AVEVA E3D™
Accessing DB Elements As Objects
Assigning Values to Element Attributes
Accessing Information About a Session
Evaluating Selected DB Elements
RAW keyword When setting Variables with VAR
Undo and Redo
Copies and References (for Advanced Users)
Assignment
Form and Gadget References
DB References
Deep Copy involving References:
Function Arguments
Constants as Function Arguments
Form and Gadget Properties Passed as Function Arguments
Database Attributes
Errors and Error Handling
Handling Errors
Setting the ONERROR Behaviour
Other Responses to an Error
Handling Files and Directories
Creating a File Object
Example
Reading from Files
Writing to Files
Reading and Writing ARRAYS
Error Handling When Using a File Object
Developing PML Code
Using Unicode Text
Textual File Handling
File Transcoding Utility
Using Unicode as the new AVEVA E3D™ Internal Format
PML Tracing
Diagnostic Messages From Within PML Files
Alpha Log
Alpha Log and PML Tracing
Suspending a Running PML Macro
Querying PML
Querying the Currently Running PML File Stack
Querying the Values of PML Variables
Querying What Can Be Typed Next
Form Concepts: Getting Started
Naming Forms and their Members
Simple Form
Adding a Gadget Callback
Form Definition File
How Forms are Loaded and Displayed
PML Directives
Revisiting our Simple Form
Form and Gadget Callbacks
Callbacks: Expressions
Callbacks: Form Methods / PML Functions
PML Open Callbacks
Open Callbacks at Meta-events
Using a PML Function in an Open Callback
Objects That Can Have Open Callbacks
Undo/Redo Support for Callbacks
Form Callbacks
Gadget Callbacks
Menu and Menufield Callbacks
Core Managed Objects
Forms
Modules and Applications
Application Window
Current Document
Defining a Form
Form Attributes
Form Type
Layout Modes
Minimum Size and Resizability
Intelligent Resizable Forms
Form and Frame Padding Control
Gadget Alignment Control
Form Members
Form Initialisation Callback
Form OK and CANCEL Callbacks
Quit/Close Callback
FIRSTSHOWN callback
KILLING callback
Form Variables: PML Variables within a Form
Form Opacity
Querying Form Members
Icons from Resource Files
Editing an existing Resources or Resx file
Create a New Resource File
Loading, Showing, and Hiding Forms
Loading and Showing Forms
Position of Forms on the Screen
Hiding Forms
Killing Forms
NOQUIT Form Status
CORE Managed Forms
Commands
Overview
Defining a Command
Properties
Enabled
Checked
ExecuteOnChecked
SelectedIndex
Select
Callbacks or Events
Execute
List
Refresh
State
Loading and Registering a Command
Attaching a Command to the UI
Killing a Command
Form Layout
System Font and Unicode Characters
Layout Modes
Tabset Frames
Gadget Boxes, Containers and Grid Co-ordinates
Positioning, Alignment and Size of Gadgets
Auto-placement
Default First Gadget Position in Containers
Relative Placement using the AT-syntax
Positioning Relative to a Previous Gadget
Positioning Relative to the Form Limits
Gadget Size Management
Set Size to the Positional Extent of a Previous Gadget
Set to Size of a Previous Gadget
TagWidth Attribute
Set Size to Literal Value
Intelligent Resizing
ANCHOR Attribute
DOCK Attribute
Basic use of the Frame's DOCK Attribute
More Complex Frame Docking
Syntax Graphs for Gadget Placement and Size
Gadget Size Syntax
Menus
Menu Types and Rules
Hints and Tips for Using Menu Types
Core-Code Based Menus
Defining a Bar Menu Gadget
Defining a Menu Object
Window Menu
Online Help Menu
Popup Menus
Finding Who Popped up a Menu
Toggle Menus
Editing Bars and Menus
Inserting Menus into a Bar
Inserting New Menu Fields
Changing the State of Menufields
Implied Menu-field Groups
Creating Menus Dynamically
Frames
Types of Frame
Normal Frames
Tabset Frames
Toolbar Frames
PANEL Frames
Fold Up Panel Frames
Gadgets and their Attributes
Gadget Definition Commands
Some Generic Gadget Members and Methods
Gadgets that Support Pixmaps
Selected and Unselected States
AddPixmap Method
De-activating Gadgets: Greying Out
Greying Out Gadgets on Forms
Making Gadgets Visible and Invisible
Making Gadgets Visible and Invisible in Frames
Setting Keyboard Focus
Refreshing Gadgets
Gadget Background Colour
Gadget Set
Examples
Complex Form Layout
Multi-lingual Form
Frame Gadgets
Defining a Frame
Frame Radio Groups
Managing Pages in Tabset Frames
Managing Fold Up Panel Frames
CONTAINER Gadget
Example of Container Gadget
Paragraph Gadgets
Textual Paragraph Gadgets
Pixmap Paragraph Gadgets
Textual Paragraph Gadgets
Button Gadgets
Buttons of Type Toggle
Buttons of type LINKLABEL
Form Control Attributes
Defining a Dismiss Button
Toggle Gadgets
RToggle Gadgets
Option and Combobox Gadgets
Textual Option Gadgets
Combobox Gadgets
Pixmap Option Gadgets
Setting and Getting the Current Selection
Slider Gadgets
Event Callbacks
Line Gadgets
Numeric Input Gadget
List Gadgets
Single Choice List Gadgets
Multiple Choice List Gadgets
Multi-Column List Gadgets
Database Selector Gadgets
Text Gadgets
Controlling Text Gadgets’ Editing
Copying and Pasting into Text Fields
Formatting in Text Input Gadgets: Imperial Units
Unset Text Fields
Validating Input to Text Fields
Setting the Value of a Text Field
TextPane Gadgets
Fixed Width Font
Fast Access to Lists, Selectors and Textpanes using DO Loops
View Gadgets
Defining a View Gadget
Resizable View Gadgets
Pop-up Menus in Views
Defining Alpha Views
Graphical Views
Defining PLOT Views
Accessing DRAW 2D View
Defining MODEL’s Volume (3D) Views
Alert Objects
Position of Alerts
Input Alerts
FMSYS Object and its Methods
Managing the Default Form Layout Mode
Swapping Applications
Checking the Existence of Main Menus and Toolbars
Progress and Interrupt Methods
Writing to the AppWindow’s Status Field
Refreshing View Gadgets
Checking References to Other Forms
Splash Screen
Default Form Positioning
CurrentDocument() Method
LoadForm() Method
Cursor Function Support
Setting the Default Format Object for Text Fields
CMSYS Object and its Methods
Customising Tabbed Menus in Model
PML Add-ins
Application Switching
Defining a PML Add-in
PML Application Control Object
Initialisation
Forms
Registering a Form
Hiding Forms when Exiting Applications
Storing Data Between Sessions
Customising Tabbed Menus in Model
Example: Create a PML Add-in
Create a PML Add-in Definition
Create a PMLOBJ Control FIle
Create PML Commands
Create Image Resources
Create a UIC File
Test the PML Add-in
How to Add a PML Add-in to the PowerWheel™
Add a Context Menu to the UIC File
Create a PMLOBJ Control FIle
Test the PowerWheel™
Add Blank Segments to the PowerWheel™
Aveva.Core.PMLPseudos Addin
Manipulating VIEWS
Manipulating 2D Views
Manipulating 3D Views
Converting a Form to VarChars and Layout Form
Convert Setup Form from FixChars to VarChars
Convert from Setup Form VarChars to Layout Form
Core Managed Objects
Form Core Support
FORM Core Code Interface
Gadget Core Support
GADGET Core Code Interface
Menufield Core Support
MENUFIELD core code interface
PML Defined Menufields Managed by Application Framework Addins
Use of Flexible Explorer Control
Sample Addin:FlexibleExplorerAddin
Flexible Explorer Definitions in XML Files
Description of the Sample Flexible Explorer XML File (FlexibleExplorerSample.xml)
Limitations & Recommendations