Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
757 views32 pages

AVEVA PML Studio

Uploaded by

xingwei jiang
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
757 views32 pages

AVEVA PML Studio

Uploaded by

xingwei jiang
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 32

TM

AVEVA PML Studio 1.1


User Guide
AVEVA Solutions Limited

Disclaimer
1.1 AVEVA does not warrant that the use of the AVEVA software will be uninterrupted, error-free or free from viruses.
1.2 AVEVA shall not be liable for: loss of profits; loss of business; depletion of goodwill and/or similar losses; loss of
anticipated savings; loss of goods; loss of contract; loss of use; loss or corruption of data or information; any special,
indirect, consequential or pure economic loss, costs, damages, charges or expenses which may be suffered by the user,
including any loss suffered by the user resulting from the inaccuracy or invalidity of any data created by the AVEVA
software, irrespective of whether such losses are suffered directly or indirectly, or arise in contract, tort (including
negligence) or otherwise.
1.3 AVEVA's total liability in contract, tort (including negligence), or otherwise, arising in connection with the performance
of the AVEVA software shall be limited to 100% of the licence fees paid in the year in which the user's claim is brought.
1.4 Clauses 1.1 to 1.3 shall apply to the fullest extent permissible at law.
1.5 In the event of any conflict between the above clauses and the analogous clauses in the software licence under which
the AVEVA software was purchased, the clauses in the software licence shall take precedence.

Copyright
Copyright and all other intellectual property rights in this manual and the associated software, and every part of it
(including source code, object code, any data contained in it, the manual and any other documentation supplied with it)
belongs to, or is validly licensed by, AVEVA Solutions Limited or its subsidiaries.
All rights are reserved to AVEVA Solutions Limited and its subsidiaries. The information contained in this document is
commercially sensitive, and shall not be copied, reproduced, stored in a retrieval system, or transmitted without the prior
written permission of AVEVA Solutions Limited. Where such permission is granted, it expressly requires that this copyright
notice, and the above disclaimer, is prominently displayed at the beginning of every copy that is made.
The manual and associated documentation may not be adapted, reproduced, or copied, in any material or electronic form,
without the prior written permission of AVEVA Solutions Limited. The user may not reverse engineer, decompile, copy, or
adapt the software. Neither the whole, nor part of the software described in this publication may be incorporated into any
third-party software, product, machine, or system without the prior written permission of AVEVA Solutions Limited, save as
permitted by law. Any such unauthorised action is strictly prohibited, and may give rise to civil liabilities and criminal
prosecution.
The AVEVA software described in this guide is to be installed and operated strictly in accordance with the terms and
conditions of the respective software licences, and in accordance with the relevant User Documentation. Unauthorised or
unlicensed use of the software is strictly prohibited.
© Copyright 2012 to current year. AVEVA Solutions Limited and its subsidiaries. All rights reserved. AVEVA shall not be
liable for any breach or infringement of a third party's intellectual property rights where such breach results from a user's
modification of the AVEVA software or associated documentation.
AVEVA Solutions Ltd, High Cross, Madingley Road, Cambridge, CB3 0HB, United Kingdom

Trademark
AVEVA™, AVEVA Everything3D™ and AVEVA E3D™ are registered trademarks of AVEVA Solutions Limited or its
subsidiaries. Unauthorised use of the AVEVA™, AVEVA Everything3D™ and AVEVA E3D™ trademarks is strictly
forbidden.
AVEVA product/software names are trademarks or registered trademarks of AVEVA Solutions Limited or its subsidiaries,
registered in the UK, Europe and other countries (worldwide).

3rd Party Software


The copyright, trademark rights, or other intellectual property rights in any other product or software, its name or logo
belongs to its respective owner.
The following 3rd party software is included in some of the AVEVA products contained in this Online Help:
• Based on Teigha® from the Open Design Alliance.
• Microsoft® Office Fluent™ user interface. Fluent is a trademark of Microsoft Corporation and the Fluent user interface is
licensed from Microsoft Corporation. The Microsoft Office User Interface is subject to protection under U.S. and
international intellectual property laws and is used by AVEVA Solutions Limited under license from Microsoft.
• DevExpress® redistributables are used by AVEVA under license from Developer Express Inc. Copyright © 2000-2014
Developer Express Inc.
AVEVA PML Studio User Guide

Revision Sheet

Date Version Comments / Remarks


May 2015 1.1 First Release
AVEVA PML Studio User Guide
AVEVA PML Studio User Guide
Introduction

1 Introduction

AVEVA PML Studio™ will be made available to AVEVA customers who want to increase
their productivity and improve the quality and maintainability of their valuable PML
customisations. AVEVA PML Studio™ will not be a commercial product, it will be an
unsupported, freely distributable tool to help experienced PML programmers to work more
efficiently.
AVEVA PML Studio™ supports the following file types:
• PML Function Files (*.pmlfnc)
• PML Object Files (*.pmlobj)
• PML Form Files (*.pmlfrm)
• PML Command Files (*.pmlcmd)
There is also some support for:
• PML Macro Files (*.pmlmac)
• PML Data Files (*.pmldat)
• PML Debug Files (*.pmldbg)
The features available include:
• Error checking
• Autocomplete
• Intellisense
• Syntax highlighting
• Smart indenting
• Code folding
• Code warnings
• Issue navigation
• Autoformatting
• Real-time feedback
• Smart tooltips
• Spell checking
• PML file/method/member navigation

1.1 Prerequisite
AVEVA PML Studio™ is based on the Microsoft Visual Studio 2010 Shell (Isolated) and it is
a prerequisite that this is installed prior to installing PML Studio. Click here to download.

© Copyright 2012 to current year. 1:1 1.1


AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
AVEVA PML Studio User Guide
Introduction

1.2 Guide Structure


The AVEVA PML Studio User Guide is divided into the following sections:

Frequently Asked Questions Gives a list of question the user might ask.

PML Menu PML Menu provides you with easy access to PML
commands.

PML Explorer PML Explorer provides you with an organized view of


your PMLLIB as well as access to many of the
commands that pertain to them.

Text Editor The editor is the word processor of the integrated


development environment (IDE).

Error List Displays errors, warnings and messages for a PML file.

Output Displays output from external tools, for example PML


Doc and PML Cop.

Properties Shows the properties of a PML file, for example the file
description and when it was last modified.

Navigation Bar Allows for easy navigation in a PML file.

PMLCop PMLCop is a console application that checks PML files


and prints a report to the Output Window.

PML Documentation PMLDoc is a console application that documents PML


files. It creates a folder of html files for each PML file.

Production Ready Check AVEVA specific check with PML Cop and cmCheckWix.
Checks if the file is production ready.

Note: this option is only available for AVEVA


employees.

Spell Checker Checks the spelling of the comments and strings in a


PML file.

Grammar Checker Checks the grammar of the comments and strings in a


PML file.

Styling Styles PML files by fixing casing, indentation and adding


brackets.

Snippets Insertable reusable snippets of PML code.

Templates The standard layout and components of a PML file are


stored in a template file

1.3 Frequently Asked Questions


• Is AVEVA PML Studio licensed?
No, it is an unlicensed PML editing tool.
• What does AVEVA PML Studio cost?

© Copyright 2012 to current year. 1:2 1.1


AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
AVEVA PML Studio User Guide
Introduction

AVEVA PML Studio is a free tool.


• How do I get a copy?
AVEVA PML Studio can be downloaded via the usual channels and freely distributed.
• Do I have to include AVEVA PML Studio in my existing contract (or similar)?
No. AVEVA PML Studio is not a commercial product, so you do not need a licence file
to work with it.
• Do I require a full implementation of Microsoft Visual Studio®?
No. There is a pre-requisite that you have Microsoft Visual Studio Isolated Shell
installed. AVEVA Pml Studio runs inside Microsoft Visual Studio Isolated Shell which
can be downloaded from Link. Microsoft Visual Studio Isolated Shell also incurs no
charge.
• Will it be supported like other products, i.e. defect fixes?
The software is provided as-is, without warranty. It is a tool that will not be supported
and bug-fix and development requests and so on will not apply.
At the moment there is no roadmap or plan for any further version.
• Are there any training requirements?
No. There is a simple document delivered with the tool. The tool is intended for use by
proficient PML programmers, and should be easily adopted by users with experience
with our programmable macro language syntax.
• Is there a limit on the number of copies a company can have?
No. It can be freely distributed.
• Does it have a PML Form Designer?
No.
• Can we debug code, i.e. insert break points and query variable values?
No.
• Can we run PML directly from AVEVA PML Studio?
No. You still need to run it in the main application.
• Does it tie in to PML Encryption?
No.
• Does it integrate with PML .NET applications developed in Visual Studio?
Calls from PML to .NET code are supported, but features such as Go to Declaration
will not transfer to .NET code.
• Is AVEVA PML Studio compatible with older products and versions?
AVEVA PML studio is compatible with all supported products that can currently use
PML customisation; this includes AVEVA Everything3D™, AVEVA PDMS™, AVEVA
Marine™, AVEVA Engineering™ and AVEVA Diagrams™.

1.4 PML Menu


The PML Menu provides you with easy access to PML commands.

© Copyright 2012 to current year. 1:3 1.1


AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
AVEVA PML Studio User Guide
Introduction

PML Explorer Opens PML Explorer. Refer to PML Explorer for further
information.

Styling Sub Menu with the PML file styling options. Refer to
Styling for further information.

Production Ready Checks Runs Production Ready Check on the current PML file.
Refer to Production Ready Check for further information.

Document Runs PML Doc on the current PML File or the PMLLIB in
the PML Explorer. Refer to PML Documentation for further
information.

View PML Help Opens a web browser containing the HTML help.

About PML Studio Opens a dialog containing information about PML Studio
including the version number.

1.5 PML Explorer


The PML Explorer provides you with an organised view of your PMLLIB as well as access to
many of the commands that pertain to them. PML Explorer can be found in the View and
PML menu.

© Copyright 2012 to current year. 1:4 1.1


AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
AVEVA PML Studio User Guide
Introduction

Toolbar
The available options are:

Select Folder Opens a dialog to select a folder. Select your PMLLIB folder
or any folder containing PML files. The folder will be added
to the explorer.

Refresh All Refreshes all folders and files in the PML Explorer. Used for
updating changes done outside PML Studio.

Collapse All Collapses the tree view of the PML folders and files.

Configuration The Configuration window is displayed which allows you to


define extra extensions. There is specific format for defining
extensions, they must start with '.' and end with ';', the ';' acts
as a separator. Multiple extensions can be defined, for
example, '.png;.txt;'.

Search Allows you to search for a PML file in the tree view of the
PML Explorer.

© Copyright 2012 to current year. 1:5 1.1


AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
AVEVA PML Studio User Guide
Introduction

Tree View
Displays a tree view of all folders and acceptable files in the selected folder. Acceptable files
are PML files or files with extensions defined in the Configuration dialog.

Folder Icon for all folders.

PML File Icon for all PML files.

Object, Form, Icon for main declaration of a PML file, for example,
Function, Command Object for a pmlobj file.

Member Icon for members. Should only be in pmlobj, pmlfrm and


pmlcmd files.

Method Icon for methods. Should only be in pmlobj, pmlfrm and


pmlcmd files.

Other File Icon for all other files. These are the extensions defined
by the user in the Configuration dialog.

Context Menu
The available options are:

Hide Hide is only available on the root folder. It removes the


folder from PML Explorer.

Open Opens PML files in PML Studio and other files in their
default editors.

Show in Windows Opens Windows Explorer at the selected file or folder.


Explorer

Refresh Refreshes all folders and files below the selected folder or
file. PML Explorer does not automatically update, so it
should be used when folders and files are altered
externally or for adding and removing methods and
members from PML files.

Add Adds existing or new files. Only available on folders.

Delete Deletes folders or files.

Run PML Cop Only visible if PML Cop is installed. Refer to PMLCop for
further information.

Production Ready Only visible on AVEVA machines. Refer to Production


Check Ready Check for further information.

Document Only visible if PML Doc is installed. Refer to PML


Documentation for further information.

© Copyright 2012 to current year. 1:6 1.1


AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
AVEVA PML Studio User Guide
Introduction

1.5.1 PMLNet Reference


To have intellisense for PMLNet objects a PMLNet Folder must be identified.

Toolbar
The available options are:

Select PMLNet Folder Opens a dialog to select a folder. Select a folder


containing your PMLNet DLLs which is probably your
PDMS/E3D folder. The folder will be used to add
intellisense to PMLNet objects in the PML code.

Refresh Refreshes the PMLNet dlls. Should be used, for example


when a PMLNet DLL is added to the folder. PMLNet
intellisense does not automatically update.

Delete Deletes the PMLNet reference.

1.6 Text Editor


The text editor is the word processor of the integrated development environment (IDE).

1.6.1 Syntax Highlighting


PML Studio highlights different parts of the code to improve readability. There are six
different types of text in a PML file displayed in the text editor window.
Keyword: BLUE
define, setup,.....

Comment: DARK GREEN


--, $(, $), $*

String: MAROON
‘,

Number: BLACK
[0-9]

© Copyright 2012 to current year. 1:7 1.1


AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
AVEVA PML Studio User Guide
Introduction

Identifier: BLACK
!variable, .refreshDraftCanvas, ...

Text: BLACK
=, *, ...

These colours and fonts can be changed in Tools, Options, Environment, Fonts and Colors.
The Display item names match the ones above.

1.6.2 Bracket Highlighting


Highlights brackets when the cursor is placed to the left of an open bracket or the right of a
close bracket. The colour of the highlight can be changed in Tools, Options, Environment,
Fonts and Colours. Change the Item Background colour for Brace Matching (Rectangle).

© Copyright 2012 to current year. 1:8 1.1


AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
AVEVA PML Studio User Guide
Introduction

From Microsoft: When you type a closing bracket, both it and its matching bracket remain
highlighted for a few seconds, or until you type another key or move the cursor. This makes
visually identifying code blocks much easier. In addition, this may help identify mismatched
or missing brackets.

1.6.3 Variable Highlighting


Highlights all references to the same local variable when the cursor is placed on a local
variable. It will also highlight the references in strings. The colour of the highlight can be
changed in the same place as Bracket Highlighting.

1.6.4 Errors, Warning and Messages


Errors, Warnings and Messages are shown in the text editor by drawing squiggly lines of
different colours under the related text.

1.6.5 Tooltips
Indicates the type and description of an object. The description is taken from comments in
the file header and above methods and members.

© Copyright 2012 to current year. 1:9 1.1


AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
AVEVA PML Studio User Guide
Introduction

1.6.6 Auto-Completion
Completion list after '!'. Local Variables, Global Variables and '!this'.

Completion list after '.' All members and methods of the previous object, including built-in
ones such as '.eq'.

Full completion list called with CTRL+SPACEBAR, ALT+RIGHT ARROW or CTRL+J. Local
Variables, Global Variables, '!this' and common code blocks (i.e. IF). It can also be activated
in Menu Edit -> IntelliSense -> List Members.

© Copyright 2012 to current year. 1:10 1.1


AVEVA Solutions Limited and its subsidiaries.
All rights reserved.

You might also like