Headers
stringlengths
3
162
Content
stringlengths
12
32.8k
Function Keys
SCALE To Scale a StruCtural Element by selecting a Base Point
Function Keys
SECARC Creates an ARC GENSEC and also gives multiple oPtions to choose the way they are created
Function Keys
SECCUR Creates a Curved GENSEC and also gives multiplE options to choose the way they are created
Function Keys
SECRING Creates a RING GENSEC and also gives multiPle options to choose the way they are created
Function Keys
SECTION Creates a Straight GENSEC and gives multIple options to choose the way they are created
Function Keys
SELALL To select all the elements in 3D View
Function Keys
SPLICE To Splice any Structural Element(s) in multiple ways
Function Keys
SPLIT To split any Structural Element(s) in multiple ways
Function Keys
STRETCH To Stretch any Structural Element along a defined path
Function Keys
SURFACE To create Surface
Function Keys
SPACE To create space arrangement
Function Keys
TOWER Enables option to create a Rectangular Tower Grid
Function Keys
TOWERT Enables option to create a Triangular Tower Grid
Function Keys
U To Undo any current operation
Function Keys
UNDO Enables user to UNDO all operation or to desired no.Of counts
Function Keys
WALK Enables user to WALK around a Model
Function Keys
Z or ZOOM Enables Zoom options
Function Keys
-VIEW or -V To change any View between Isometric or Orthographic or Plan View
Function Keys
-PAN or -P PANs view wrt base point selection
Function Keys
In Canvas Commands (Primitives)
Function Keys
Command Description
Function Keys
BOX Invokes function to create BOX
Function Keys
CYLI Invokes function to create CYLINDER
Function Keys
CONE Invokes function to create CONE
Function Keys
CTOR Invokes function to create CIRCULAR TORUS
Function Keys
DISH Invokes function to create DISH
Function Keys
EXTR Invokes function to create EXTRUSION
Function Keys
PYRA Invokes function to create PYRAMID
Function Keys
RTOR Invokes function to create RECTANGULAR TORUS
Function Keys
REVO InvokesFunction to create REVOLUTION PRIMITIVE
Function Keys
SLCY Invokes function to create SLOPING CYLINDER
Function Keys
SNOU Invokes function to create SNOUT
Function Keys
NBOX Invokes function to create BOX
Function Keys
NCYLInvokes function to create CYLINDER
Function Keys
NCON Invokes function to create CONE
Function Keys
NCTO Invokes function to create CIRCULAR TORUS
Function Keys
NDIS Invokes function to create DISH
Function Keys
NPYR Invokes function to create PYRAMID
Function Keys
NRTO Invokes function to create RECTANGULAR TORUS
Function Keys
NREV Invokes function to create REVOLUTION PRIMITIVE
Function Keys
NSLC Invokes function to create SLOPING CYLINDER
Function Keys
NSNO Invokes function to create SNOUT
Function Keys
NXTR Invokes function to create EXTRUSION
PDMS PML Objectives PML 1&2
Programming •Acquire the basics of programming in PML •Know the programming conventions •Understand the cCommunication between DABACON databases and the PML language •Be able to create a user interface •Browsing development possibilities (PML/C# interface)
PDMS PML Simple macros
Presentation of macros A macro is a sequence of commands interpreted and executed by PDMS software. These commands can be filled in one at One in the "command window" and will give the same result.To launch a macro, simply drag the .pmlmac file into the "command window" of PDMS or write the following line: $m Macro path, example: $m C:\Path \mySimpleMacro.pmlmac NOTE: A macro does not require a particular extension.A *.txt file can be a macro however, the *.pmlmac extension allows them to differentiate from Other text files.
PDMS PML Simple macros with parameters
Presentation of macros The parameterized macros allow, when launching them, to fill in arguments that will be used by macros. The arguments are read using the syntax: $1, $2, etc. The arguments are to rTeach following the macro call command and separated by a space. $m C: \Path \mySimpleMAcro.pmlmac MYEQUI 200 300 500 $1 $2 $3 $4 If an argument contains a space, we use the syntax: $m C: \Path \mySimpleMAcro.pmlmac $<TEXT WITH SPACE$> 200 300 500 (for a description for example) $1 $2 $3 $4
PDMS PML Programmable macros
Presentation of macrosPML1 variables make it possible to program macros to make them intelligent. Variables are memory blocks that will make it possible to store data (numbers, string, etc.). The variables can be compared to Labeled drawers.For example, we can store the number "32" in the "Age" drawer. To define a variable in PML, the following syntax must be used: VAR! nameVariable value of the variable Or ! nameVariable = value of the variable To retrieve the value of the variable, you must use:$! nameVariable To display the value of the variable in the "commands window" you must write: $p $! nameVariable → Returns the value of the variable Or Q var! nameVariable → Returns the type and value of the variable ►The variables are defined with one or two "!": "! Variable": to define a local variable (Usable only by the macro that created it). “!! Variable": to define a global variable (Usable by all macros during the same PDMS session). ►Never start the name of a variable with a digit.►Never use "." or "_" in a variable name. NOTE: It is important to choose the name of the variables so that the code is as readable as possible. For this, he You must choose names that represent as much as possible the content of the variable.PML 1 PML 2
PDMS PML String (string)
Type of variables There are different types of variables that do not store data in the same way.NOTE: Lasyntax "var! myVar "works only for the definition of STRING variables. String-type variables can contain strings. Declaration of variable of type string: Var! myString 'String of characters' Or Var! myString |Character string|Or ! myString = |String| Real-type variables are used to store numerical values. Declaration of variable of type real: ! myReal = 23 Boolean variables can have values only equal to "TRUE" or "FALSE", ! myBOolean = TRUENOTA: It is preferable to use "||" rather than "''" For the definition of a string type variable. In Effect, with this syntax, the use of characters As "'", "é", is then possible. 2.2. Real (real) 2.3. Boolean (bouléens)
PDMS PML Array (tables)
Type of variables A table is a set of variables stored in a table. The tables must be defined as follows: ! myTable = array ()! myTable [1] = |Chain| ! myTable [2] = |de| ! myTable [3] = |characters| Or ! myTable.append (|Chaine|) ! myTable.append (|de|) ! myTable.append (|characters|) ! Brand = 1 ! Model = 2 ! Year = 3 ! Garage = array () ! Garage[1][! Brand] = |Citroën| ! Garage[1][! Model ] = |Xsara|! Garage[1][! Year ] = |1999| ! Garage[2][! Brand] = |Renault| ! Garage[2][! Model ] = |Clio| ! Garage[2][! Year ] = |2003| ! Garage[3][! Brand] = |Alfa Romeo| ! Garage[3][! Model ] = |159| ! Garage[3][! Year ] = |2005|NOTA: In this case, we define the value of eachLines of the table. 2.5. Array of Array (multidimensional arrays) Citroën ! garage[1][brand]Xsara ! Garage[1][ model ]1999 ! Garage[1][ year ] Renault ! garage[2][brand]Clio ! Garage[2][ model ]2003 ! Garage[2][ year ] Alfa Romeo ! Garage[3][brand]159! Garage[3][ model ]2005 ! Garage[3][ year ][brand] [ model ] [ year ] [1] [2] [3]NOTE: In this case, one increments a new Line atlatable with the value between Parentheses.
PDMS PML G-string
PML1 Var! nameOfCE NAME The variable! NameOfCE is of type string and will take the value of the NAME attribute of the current element. Var! posOfCE POS wrt/* The variable! posOfCE is of the string type and takes the valEur of the POSITION attribute of the current element. ! Real1 = 3 ! Real2 = 5 ! Sum =! Real1 +! Real2 ! Average = (! Real1 +! Real2 ) / 2 Operations +, -, *, / are possible in the same way.NOTA: This syntax can be used with all the attributes of an element.3.2. RealIt is possible to concatenate string-type variables. ! String1 = |Hello| ! String2 = |world| ! Result = ! String1 & | | & ! String2 Q var! Result <STRING> 'hello world' 3.3. array Var! Listcollect all PIPE for CE ! List is a string arrayS containing the refnos of all PIPEs ('=23584/5442')PML 1 is a language for performing actions and manipulating variables. This version of the language is mainly used When it is necessary to obtain a value in one lIgne of code, otherwise we will prefer the use of PML2.
PDMS PML PML2
PML2 is a so-called object-oriented language. An object has its own functions (Objects will be more detailed later in this manual).When we define a variable as a STRING object, we associate it with all the functions specific to a STRING object. The functions are used as follows: ! Variable.function (Arguments) 4.1. G-string Here are some examples of essential functionsTielles to manipulate string-type variables. Function. PART( Part to be kept, 'Delimiter') returns a STRING type variable ! Identity = 'DUPONT -François -18/08/1964' ! Name = ! Identity.part ( 1 , ' -' ) Q var! Behalf <STRING> 'DUPONT' ! First name = !Identity.part ( 2 , ' -' ) Q var! First name <STRING> 'François' ! Test = ! Identity.part ( 1 , '/' ) Q var! Behalf <STRING> 'DUPONT -François -18' Function. SPLIT( 'Delimiter' ) returns a variable of type ARRAY ! identityArray = ! Identity.split ( '-' ) Q var!identityArray <ARRAY> [1] <STRING> 'DUPONT' [2] <STRING> 'François' [3] <STRING> '18/08/1964 ' NOTE: An exhaustive list of functions that can be applied to each of the object types can be found in the "Software Customisation Reference Manual »
PDMS PML ARRAY
Voici quelques exemples de fonctions essentielles pour manipuler les variables de type ARRAY. Fonction .SIZE() retourne une variable de type REAL qui indique le nombre de lignes dans la table. Fonction .DELETE( ) retourne une variable de type ARRAY, suppression de la ligne et de l’index. !table[3]. delete () Q var !table <ARRAY> [1] <STRING> 'un' [2] <STRING> 'deux' [4] <STRING> 'quatre‘ Fonction .REMOVE( REAL ) retourne une variable de type ARRAY, suppression de la ligne et décalage de l’index. !table.remove ( 3 ) Q var !table <ARRAY> [1] <STRING> 'un' [2] <STRING> 'deux' [3] <STRING> ' quatre ' Fonction .FIND( STRING ) Retourne une variable de type ARRAY contenant les index des lignes correspondantes trouvées. Fonction .FINDFIRST( STRING ) Retourne une variable de type REAL contenant l’index de la première ligne correspondante trouvée NOTA surlesfoncions FIND etFINDFIRST : Siaucun élément n’est trouvé alors une variable sera créée mais pas renseignée, elle sera alors en«unset ». Fonction .SORT() Retourne une variable de type ARRAY triée par ordre alphabétique (si STRING) ou numérique (si REAL).
PDMS PML Real
Real Variables of REAL types allow us to faIre of mathematical operations. Function. POWER(REAL) returns a variable of type REAL. Function. SQRT() returns a variable of type REAL. Function. SINE( ) returns a variable of type REAL. Function. COSINE( ) returns a variable of type REAL.Function. TANGENT( ) returns a variable of type REAL. Function. ASIN( ) returns a variable of type REAL. Function. ACOS( ) returns a variable of type REAL. Function. ATAN( ) returns a variable of type REAL. Function. LOG( ) returns a variable of type REAL.
PDMS PML
It may be that a variable is not of the desired type it is possible to convert them using specific functions: It may be that a variable is not of the desired type it is possible to convert them using specific functions: It may be that a variable is not of the desired type it is possible to convert them using specific functions: .Real(), .string(), . boolean (), position(), ... ! ageSTRING = |23| ! ageREAL =! ageSTRING.real () Q var! ageREAL <REAL> 23Var! posSTRING POS WRT /* Q var! posSTRING <STRING> 'E 12490mm N 12280mm U 2150mm' ! posPOSITION = ! posSTRING.position () Q var! posPOSITION <POSITION> E 12490mm N 12280mm U 2150mm WRT /* EAST <REAL> 12490mm NORTH <REAL> 12280mm ORIGIN <DBREF> =15392/0 UP <REAL> 2150mmQ var! posPOSITION.north <REAL> 12280mm 4 . PML2 4.4. Conversions NOTE: The conversion of variable types is applicable all the time when possible, an alpha and/or alphanumeric character chain does not Cannot be converted into REAL.( Ex:! AgeSTRING =|23years|)Pseudo -attribute "sequen": Give the order of the element In relation to his parent
PDMS PML The conditions
Yew IF ( condition ) THEN OrdersENDIF Or, also: IF ( condition ) THEN Orders ELSEIF ( condition ORcondition AND condition ) THEN Orders ELSE Orders ENDIF$*IF (condition) THEN $*END $*IF ( condition ) THEN $*IF NOT IF ( condition ) THEN $*The AND has priority over the OR$*IF NOT $*END 5.2. Comparators EQ EQUAL NEQ NON EGAL GT BIGGER LT SMALLER GE BIGGER OR EQUAL THE SMALLEST OR EQUAL IF ( ! Age GE 18 ) THEN ! Major = TRUE ELSE ! Major = FALSE ENDIF NOTE: As soon as it is necessary to write a surplus orderLines (example the "if"), it becomes imperative to go through a macro file, the Window command requiring to validate each line a parune.
PDMS PML The conditions
Matchwild IF ( MATCHWILD( ! Name, |? ABC*|) ) THEN Orders ENDIF The MATCHWILD function returns the TRUE value if the search is Conclusion, orFALSE silachaine of characters is not present in The variable to test. 5.4. Game IF ( MATCH( ! Name, |? ABC*|) GE 1 ) THENOrders ENDIF The match function returns the number of times the search (|? ABC*|) Is present in the variable to be tested. The number is larger or equal to 1 is that the research is conclusing. NOTE: We use "?" ifUNcharacter is anyone. We Use "*"sAll a chain of characters is anyone. Condition matchwild
PDMS PML The loops
C Loops allow you to execute the same command several times, TheyAre controlled by a counter. DO! X FROM 4 TO 10 BY 2 Orders ENDDO ! X Variable incremented automatically at each turn of the loop. If no variable is filled in, an unknown variable will be used. FROM Defines the initial value of the variable for the first round.If the initial value is not entered, then it will be equal to 1. TO Sets the final value of the variable for the last round. If the final value is not filled in, then the loop will be infinite. BY Defines the step of the increment. If the paS is not informed so it will be 1. 6.2. DO Index Using this syntax, the variable! X will value the index of each row of the table ! Mytable. DO! X INDEX! myTable Orders ENDDO 6.3. DO Value Using this syntax, the variable!X will hang the value of each row of the table! Mytable. DO! X VALUE! myTable Orders ENDDO
PDMS PML The loops
Estate car If no final "to" condition isIs defined for the loop, then it will be infinite. It is possible to stop it by using the "BREAK" syntax Related to a condition. DO! X IF ( ! X GT 15 ) THEN Estate car ENDIF ENDDO 6.5. SKIP The "SKIP" command is used to go directly to the next value of!XDO! X BREAK IF (! X GT 15 ) ENDDO DO! X IF ( ! X GT 15 ) THEN SKIP ENDIF Orders ENDDODO! X SKIP IF ( ! X GT 15 ) Orders ENDDO NOTE: ! Inset variable (value 1, value 2,...) allows you to verify that the variable is part of a set of predefined values.
PDMS PML Comments
The comments Since the codes are not always explicit, it is important to comment on each operation carried out by the macro. This allows during a ModificationN of the code, to find the operation of it more quickly. Several methods are available to comment on a macro. --This is a new comment ! X = ! Y +! Z $*! X is equal to the sum of! Y and! Z $( New comment On several lines $)NOTE: By using the "PML language" option in notepad ++(c.f.pml_notepadd ++.xml), comments will be automatically displayed envert
PDMS PML Handle
Error management "HANDLE" PendaNt the progress of a program, it is possible that some lines of code generate errors and block the continuation of the program. It is possible to manage them with the "HANDLE" blocks. HANDLE If errors are expected, the "HANDLE" syntax makes it possible not to stop theCode and enter specific commands in case of errors. ANY The command block will be read for any error. ERROR CODE (46, 28), the error code is specific to a specific error, the block of Orders will be read only for this errorELSEHANDLE Allows you to manage several errors NONE The command block will be read if there is no error ENDHANDLE Ends the command block HANDLE (46,28) Orders ELSEHANDLE ANY Orders ELSEHANDLE NONE Orders ENDHANDLE The "HANDLE" syntax must beFind directly below the line of code that can generate an error. NOTE: The syntax "old/elementName" allows you to decemmettre enCEsurl'element.
PDMS PML Object oriented
PML2 object-oriented language The strength of PML2 is the use of objects that make it possible to optimize programs. This technology is inspired by other languages such as The C# developed by Microsoft.9.1. Notion of object !! PHONE Fon directory attributeCtion(argument) Call(number) Web(url)! myPhoneVariable Object ! myPhone = OBJECT PHONE() ! myPhone. directory [X] ! myFunction = ! myPhone.function (argument) ! myPhone.call ('0623589xxx') ! myWeb = ! myPhone.Web ('http://www.rg -services.fr/')
PDMS PML Object oriented
PML2 object-oriented language. DBREF object DBREF objects are elements of the database, the object!! It's defined by default, so!! This.name will return the name of the element Running,!! This type, its type, etc. 9.3. Object COLLECTION() ! myCollection = Object COLLECTION() ! myCollection.scope (CE) ! myCollection.addType ('PIPE') ! allPipe = ! myCollection.results () The equivalent syntax in PML1 is as follows: Var! myCollect Collect all PIPE for CEHere is the variable! myCollect is a table of STRING ( Refno ) and not DBREF.Function(Argument) Reference Description Scope(DBREF) Defines the target for the collection AddType (STRING) Defines the type of item to be collected. Results () Array of DBREF RenvoIe the a table containing the search resultNOTA: The name of an element is stored in a variable in String format, it is then Possible to access the element in the database with the function ! nameElement .dbref ()
PDMS PML Functional repertoires
Functional Directories It is possible to add dialog boxes, functions, and objects to those already created by AVEVA. These files must be placed under a "pmllib" folder declared in the evars. In this folder, there is a file called "pml.index" generated by PDMS that lists all these elements. To update it, you must write in the commands window: Pmlrehash all. PMLLIB Design Forms Functions Objects Draft Paragon Pml.index NOTE: You can consult the PMLLIB folder in the software installation directory to take examples from the forms, functions, and objects developed by AVEVA.
PDMS PML Role
Functions, Arguments and References The functions are used for coOf tasks frequently used by other developed programs. They are widely used to divide a development project into specific tasks. The file must have, as extension: *.pmlfnc Command to call the function: !! myFunction ()Create the function: Define Function!! myFunction () . . . EndFunction11.1. The functions ( function ) NOTE: Once the function is created in the "Functions" folder of dupmllib, it must Run a "pml rehash all" to refresh lepml.index. NOTE: The file *.pmLfnc must have the same name as the function.
PDMS PML Role
Functions, Arguments and References As with parameterized macros, it is possible to call a function with arguments.Command to call the function: !! myFunction (! Name,! Age,! City) Create the function: Define Function!! myFunction (! Name isstring,! Age isreal,! City isstring) . . . EndFunction11.2. Functions with arguments NOTE: It is not mandatory dedoNner the same name to the arguments in the call and in the definition of the function, only the order and type of the Arguments are important. It is still advisable to keep the names of the arguments used in the definition of the function.
PDMS PML Role
Functions, Arguments and References The functions are also able to return a result to a program that launched it. Command to call the function: ! Result = !! myFunction (! Name,! Age,!City) Create the function: Define Function!! myFunction (! Name isstring,! Age isreal,! City isstring) isarray ! myResult = array () . . . Return! myResult EndFunction11.3. Functions with referral
PDMS PML Creation of objects
Creation of objects Objects are composed of different methods. Methods are functions attached to an object or a "form". Methods Work on the same principle as the functions. It's-I.e. they can receive arguments and send values. One Variable defined in a method is unknown to other methods. To use a variable in several methods of an object, it is necessary to Define as a member of this object outIliser global variables (not recommended). Lavariable! This is automatically equal to the object or "form" in which it is used. The file containing the object code must be *.pmlobj to be recognized by PDMS. Define object myObject Member .Member1 is string Member .member2 is real endObject Define method . setMember () ! This.member1 = 'Hello' --! This= !! myObject EndMethod Define method .readmember () $p $! This.member1 EndmethodMembers MethodsObject NOTE: In the same object, two methods littleVent have the same name provided that their arguments are different.
PDMS PML Creation of objects
Creation of objects Members MethodsDeclaration of a Instance of the objectCalling a method On the object
PDMS PML Example of creation
Example of c Reation Of a Diff It is possible to customize the main "form" by adding toolbars.You must first create a text file without extension in the Addins folder so that when it is opened, PDMS knows how to get the new Toolbar, with the following information: Then, you have to create an object placed in the folder:\pmllib \design \objectsName: DIFFNAME Object: myOBJECT Directory: myOBJECT Synonym: CALL myOBJECT Define object myOBJECT Endobject Define method .modifyForm () ! This.toolbars () Endmethod Define method .toolbars () ! iconSize = !! comSysOpt.iconSize () Frame .myToolBar toolbar 'myFrame Tag' ! Pixmap = !! Pml.getpathname ('image.png') Button .myButton 'myButton Tag' pixmap "$! <pixmap >" width $! iconSize height $! iconSize callback | CallbackCommand | Exit !! appTbarCntrl.addToolbar (myToolBar ', 'ALL')endmethodKeywod ! Pixmap = path to an image in the PMLLIB folder Modules in which the new bar will be displayed Tools (ALL, DESIGN, PARAGON,...
PDMS PML Forms dialog box
A dialog box is a set of gadgets (buttons, options, list, etc.) that offers a graphical interface between the user and the Programmed functions. The file containing the delaform code must be *.pmlfrm to be recognized by PDMS. Necessary and sufficient syntax:Setup form!! myForm $*Declaration of the form !! myForm .initCall =|! This.init()| $*Declaration of the initialization method Options: Setup form!! Myform DIALOG /DIALOG RESIZABLE /DIALOG DOCKING (SIZE width height) DIALOG: Fixed form RESIZEABLE: Non-fixed formDOCKING: Built-in and unfrozen shape (to embed the shape at its opening, it is enough to specify where to hang it, L=Left, R=Right, T=Top, B=Bottom, compared to the graphic view) !! myForm .quitcall =|! This.quit()| $*Definition of the closure method !! myForm .Autocall =|! This.autocall ()| $*Automatic method declaration, when any delaform attribute is Modified. 14.1. Definition
PDMS PML Forms gadget
METHOD 1:Gadget 1 PATH DOWN $*Slet down HALIGN CENTRE $*Horizontal alignment Compared to the center VDIST $2*Vertical offset Of 2 units Gadget 2 Gadget $3*the information of Gadget 2 are always Valid PATH RIGHT $* Delay to the Right VALIGN BOTTOM $* Vertical alignmentCompared to the bottom HDIST $3* Horizontal offset Of 3 units Gadget 414.2. Position of gadgets Gadget1 Gadget 2 Gad.3Gadget5
PDMS PML Forms gadget
METHOD 2: Gadget1 at X3 Y3Gadget2 atXMIN.Gadget1 YMAX.Gadget1+114.2. Position of gadgets Gadget1X YYMINXMIN YMAXXMAX Gadget3
PDMS PML Forms
Gadget2 atX...Y... Anchor Top + Right14.2. Position of gadgetsGadget2 Gadget3
PDMS PML Forms
The Gadgets BAR: These are menus located under the title of the "form". Bar ! this.bar.add('Control', 'control') $*BAR.add('Text displayed', 'MENU Reference ')Menu .control ! This.control .add('CALLBACK', 'Select CE', '! This.init()') $*MENU .add('TYPE', 'Text displayed' ,'Reference' ) ! This.control .add('Separator ') ! This.control .add('MENU', 'Info', 'info' ) ! This.control .add('TOGGLE', 'active', 'this.activeMethod ()')MENU: The Menus can use: ►Menus ►Methods/functions ►DesToggles (boxes to check) POPUP: Including contextual menus called parunclicdroit. Menu .menupopup ! This.menupopup .add('CALLBACK', 'Select CE', '! This.init()') To attach a popup menu toungadget:! myGadget .setpopup (! This.menupopup ) NOTE: The forms of type DOCKING and RESIZEABLE do not netoledeBAR.
PDMS PML Forms
The Gadgets BUTTON: Without icon: Button .myButton |BUTTON |atxpos ypos tooltip |description |CALLBACK |Callback Command |dock/ anchor With icon: Button .myButton pixmap width 50height 17atxpos ypos tooltip |desc |CALLBACK |Callback Command |dock/ anchor In the initialization method: ! This.myButton .addPixmap (!! pml.getPathname ('icon .png')) LinkLabel: Button .myButton LinkLabel|BUTTON |atxpos ypos tooltip |description |CALLBACK |Callback Command |dock/ anchor Attributes: . Tag: Title / name dugadget (STRING) . Val: Equal to TRUE when the button is clicked (BOOLEAN). Popup: Context menu attached (MENU) . Active: Greyed active (BOOLEAN) . Visible: Visible or not (BOOLEAN) . Callback:Command / Attached method (STRING) . Background:Background color (REAL /STRING)NOTE: The icons must be in the PMLLIB challenge folderNit for them to be filled in in lepml.index.
PDMS PML Forms
The Gadgets Toggle: The .valgarde attribute the TRUE value after the click Button .myButton TOggle| BUTTON |atxpos ypos tooltip |description |CALLBACK |Callback Command |dock/ anchor
PDMS PML Forms
- Gadgets LIST: List.myList |ListTitle|atxpos ypos dock/ anchor CALLBACK |Callback Command |multiple width 35 height 15 Attributes: .Dtext: Visible field (ARRAY of STRING) .Rtext: Invisible field (ARRAY of STRING with the same number of values as Dtext) .Val: Number of selected line(s) (REAL or ARRAY for multiple selection) .Pickedfield: Last selected line (REAL) .Tag: Title of the gadget (STRING) .Active: Active or grayed out (BOOLEAN) .Visible: Visible or not (BOOLEAN) .Popup: Attached context menu (MENU) .Callback: Attached command/method (STRING) Retrieving values from selected fields: !val = !this.myList.val !dtext = !this.myList.dtext !rtext = !this.myList.rtext DO !refvalue !val $p$!dtext[$!ref] $p$!rtext[$!ref] ENDDO Single or multiple selection
PDMS PML Forms
The Gadgets OPTION: Option .myOption |Option Title|atxpos ypos CALLBACK |Callback Command |dock/ anchor width 10►Attributes: . Dtext: Visible field (ARRAY ofSTRING) . Rtext: Invisible field (ARRAY ofSTRING with the same number of values as ledtext) . Val: Selected line number (REAL or ARRAY silalisteesten multiple selection) . Pickedfield: Last line selected (REAL). Tag: Title dugadget (STRING) . Active: Greyed active (BOOLEAN) . Visible: Visible or not (BOOLEAN) . Popup: Context menu attached (MENU) . Callback:Command / Attached method (STRING) ►Retrieval of the values of the selected fields: The results are found more simply :$!this.myOption returns the delatable value of substitution (! this.myOption .rtext )of the selected field.
PDMS PML Forms
The Gadgets TEXT (The user can enter text):Text .myText dock/ anchor atxpos ypos tooltip |Desciption |CALLBACK |Command |width 20isSTRING ►Attributes: . Echo: Display of fields or****(BOOLEAN) . Val:Value entered in the field( =DATATYPE) . Scroll: Max length of characters (REAL) . Tag: Title (STRING). Active: Greyed active (BOOLEAN) . Datatype: 'STRING', 'REAL' or 'BOOLEAN' (STRING) . Popup: Context menu attached (MENU) . Callback:Command / Attached method (STRING) . Editable: Editable or frozen (BOOLEAN) PARAGRAPH (the user of a text is not possible):Paragraph .myPara dock/ anchor atxpos ypos text |Paragraph |width 10height 1 ►Attributes: . Val: Value duchamp (SRTING) . Tag: Title (STRING) . Active: Greyed active (BOOLEAN) . Popup: Context menu attached (MENU) . Background:Background color (REAL/STRING) TVariable ype (Isstring or isreal)
PDMS PML Forms
The Gadgets TOGGLE Checkbox: Toggle .myToggle |TEXTE| atxpos ypos tooltip |Desciption |tagwidth 10►Attributes: .val:Returns TRUE sileTOGGLE is clicked (BOOLEAN) .tag:Title (STRING) COMBOBOX Combines a text and an option: Combobox .myCombo |Title|dock/ anchor atxpos ypos CALLBACK |command |tagwidth 10width 10 ►Attributes: . Val: Number of the line of the selected options (REAL). Dtext: Visible field (ARRAY ofSTRING) . Rtext: Invisible field (ARRAY ofSTRING having the same number of value as ledtext) . Editable: Editable or not (BOOLEAN) . Scroll: Max length of characters (REAL) . Count:Number of choices in the list(REAL)Tag lengthLength of the tag Length of the field of Seizure
PDMS PML Forms
The Gadgets FRAME: Frame .myFrame |Title|atxpos ypos dock/ anchor width 80height 15 ►Attributes:.tag:Title (STRING) .Visible: Visible or not (BOOLEAN) ►Option Foldup The foldup option allows you to make a drop-down Frame Frame .myFrame foldup |Title|atxpos ypos dock/ anchor width 80height 15 ►Option Tabset Allows you to have several tabs in a frameFrame .myFrame TABSET |Title|atxpos ypos dock/ anchor width 80height 15 Frame .tab 1 Exit Frame .tab 2 Exit Exit
PDMS PML Forms
Form structure Setup form!! myForm $*Declaration of the form !! myForm .initCall =|! This.init()| $*Declaration of the initialization method Frame .myFirstFrame Foldup ... $*Definition of theFrame Button .button 1... Button .button 1... Exit $*FindelaFrame Frame .mySecondFrame Foldup ... List.myList .... Toggle .myToggle ... Exit Menu .myMenu ! this.myMenu .add(....) Member .name isstring $*Definition of members of theForm Member .age isREAL EXIT $*End of theForm definition Define Method .myForm () $*Definition of the construction method that will be executed duringOrders $*from theForm download EndMethod Define Method .init() $*Definition of the initialization method that will be executed during Orders $*the delaform display EndMethod
PDMS PML Forms
ALERT() object ! myAlert =!! Alert .confirm (|Do you want to continue? |) If(! myAlert eq'YES')then Orders Endif NOTE: We see here that the same object can integrate several forms. Function(Argument) Reference Description Confirm (MessageSTRING)'YES' or 'NO' Displays a question with the possibility of answering 'YES' or 'NO' Error (Message STRING) 'YES' Displays an error message Message(Message STRING)'YES' Displays a message Question(Message STRING)'YES', 'NO', 'CANCEL'Post a questionWarning(Message STRING)'YES' Displays a message Input(Message STRING, Default value STRING)STRING Displays a field that the user must fill in, a value by Defect can be filled in.
PDMS PML Forms
Syscom The easiest way to communicate with Windows is the integration of simple commands in DOS. --Sil'address! Directory does not exist, so create it ! Directory ='C:\temp \logFolder ' SYSCOM 'IFNOT EXIST "$!Directory" mkdir "$! Directory"' --File deletion! Line SYSCOM 'DEL "$! File"' --Opening a *.txt file SYSCOM 'Explorer .exe''C:\temp \test.txt'' ' NOTE: No referral is available with Syscom commands.
PDMS PML Communicate with the Windows environment
LeC#is a recommended language for programming on Windows, it is inspired by JAVA and C++. LeC#estassocié auneFramework . NET is a DLL library, a file format of software libraries files. NOTE: Libraries must be imported only once, otherwise an error message appears. It's for That it is wise to use the codeFollowing after importing the DLL: "Handle any Endhandle »15.2. Introduction of the C# and the Framework. Net 15.3. Dynamic Link Librairy (DLL) or Assembly A DLL is a library containing ready-to-use function classes and data that can be used at the same time bySeveral programs. PDMS uses an uncertain number of DLLs that we find in the PDMS installation folder. We can, from macros programmed in PML, use these libraries provided that they are [PMLNetCallable ]. The PMLNet assembly.Dllestlapasserelle that allows you to integrate the DLLentant as reference in PDMS. It's only if DLLs use This gateway that they are [PMLNetCallable ], To use a DLL in a PML program, you must first load the library with the commAnde: import 'library name'.
PDMS PML Communicate with the Windows environment
Then you have to indicate the spaceNames used with the code:using namespace 'space name'. They bring together slots of variables, objects, Functions, this allows the program to know where to get its variables. A frequently used name space is 'Aveva. Pdms . Presentation '. LesbiLibraries that can contain several classes containing several functions themselves, we must define which one we want to use. It's necessary So define a PML object in this way:! Myvar =object nomobject () Once the object is defined, we can know ifMethods entering the command "QMETH! myVar" in the "command window". Recommended software: JetBrains dotPeek, Freeware It allows you to open and decompile the content of DLLUsingNameSpace1 •! Name = Jacques •! Age = 32 •Function split()UsingNameSpace2 •! Name = Francois•Function create () Name of the DLL Namespace Object
PDMS PML Communicate with the Windows environment with PMLFileBrowser
DLL: 'PMLFileBrowser' Namespace: 'Aveva.Pdms.Presentation' OBJECT PMLFILEBROWSER: Allows displaying the Windows navigation window to save and open files. Our object must be defined with an argument ('SAVE' or 'LOAD') to indicate whether we want to save or open a file. Then, to display the file search window, we need to call the 'show' method of our Object with several arguments: string path: Default path string seedFile: Default file name string title: Title of the window bool existFlag: Allows or disallows the creation of a new file string filter: Type of file to save or open double filterIndex: If multiple filters are defined, the filterIndex indicates the default one. Once the file is selected, its path must be retrieved using the 'file' method: !myFile = !browser.file()
PDMS PML Communicate with the Windows environment
OBJECT PMLFOLDERBROWSER: Allows you to display the Windows navigation window to select a folder. For this object, there is no argument to enter when defining. To display the file search window, you must call the method'sHow' denotre Object with two arguments: String description: description text intended for the user Bool showNewFolderButton: the user right to create a new folder15.4. PMLFILEBROWSER.DLL Once the file is selected, it is necessary to recover itsNpath using the 'SelectedPath' method: ! myPath =! Browser . SelectedPath ()
Form Concepts Overview
A type of object represented by a global variable Owns a set of predefined member variables and built -in Methods It can also have user -defined members Form variables, form gadgets It can also have user -defined methods Form members are always accessed using the dotNotation Example: !! MyForm.Textfield Form name Form member
Form Concepts Overview
GadgetS own a set of predefined member variables and Built-in methods and can be accessed using the dot Notation Example: !! MyForm.Textfield.Val Callbacks are user -defined actions assigned to a form And its gadgets and that are executed when the Operator interacts with the formVantage Plant Design Software Customization Reference Manual con tains A list of all the members and methods of forms and gadget typesGadget as a member Member variable
Naming Forms
Their Members Format: !! MyForm $* name of the form !! MyForm.GadgetName $* name of a gadget on a form !! MyForm.GadgetName.Val $* data value held by that Gadget Within the forM definition, the members should be referred to by Using! Thisto replace the form name part of the gadget name. From the above example: ! This.GadgetName $* just equal to !! Myform.GadgetName ! This.GadgetName.Val $* just equal to!! Myform.GadgetName.Val PML1 (obsolete method but still supported): _GadgetName $* just equal to !! Myform.GadgetName
Forms
Syntax: Setup form!! Formname............ Exit Example: Setup form!! Hello Paragraph . Message text 'Hello world ' Button . Bye 'Goodbye 'OK Exit paragraph command adds a paragraph gadget Message is the name of the gadget and the dot( .) indicates that the gadget is a Member of the form buttOncommand adds a button gadget named . Bye.The text on the button will be'Goodbye ' The keyword OKis aform control attribute that specifies that the action of this button is to Remove the form from the screen
Form Attributes
Form Types: MAIN DOCUMENT DIALOG BLOCKINGDIALOG Examples: Setup form!! MyFormdialog dock left -creates a resizable docking dialogSetup form!! MyFormdialogresizeable -creates a resizable floating dialog Setup form!! MyFormdialog -creates a non -resizable floating dialog Setup form!! MyForm -creates a non -resizable floating dialog Setup form!! MyFormdocument -creates a resizable MDI child documentSetup form!! MyFormblock -creates a non -resizable blocking dialog Setup form!! MyFormblockresizeable -creates a resizable blocking dialog
Form Attributes
Minimum Size and Resizability A form will automatically stretch to fit the gadgets you Add to it You can use the SIZEkeyword to give minimum size in Multiples of the character width and line height Setup form!! MyFormsize 25.5 10 TheRESIZEABLE command means that the form will be Displayed with re -sizing controls at its corners Setup form!! MyFormresizeable Setup form!! MyFormsize 25.5 10resizeable
Form Title and Icon Title
TheTITLEsub-command is used to supply a string that is displayed in Its banner at the top of the form 's window TheICONTITLE sub-commandIs used to supply a string that is used When a form is iconized Setup form!! MyForm ............ TITLE 'My Form Title ' ICONTITLE 'Short Title ' ............ Exit Gold Setup form!! MyForm ............ ! This.FormTitle = 'My Form Title ' ! This.IconTitle = 'Short Title ' ............ Exit
Form Callbacks ( Initcall)
The form 's initialization callback allows the form 's gadgets to beInitialized to reflect the current state of the application You can set the callback by assigning to the form 'sinitcallmember: Setup form!! MyForm ............ INITCALL '! This.init() ' ............ Exit Gold Setup form!! MyForm ............ !! Myform.InitCall = '! This.init() ' ............ Exit
Form Callbacks ( OK)
TheOKCALL callback allows the operator to Approve the current gadget settings You can assign to the form 'sOKCALL member by: Setup form!! MyForm ............ OKCALL '! this.approveData1() ' ............ Exit You can modify the OK callback at any time using, ! this.OKCall= '! this.approveData2() '
Form Callbacks ( Cancel)
TheCANCELCALL callback allows the operator Not to proceed with the function of the form You can assign to the form 'sCANCELCALL Member by:Setup form!! MyForm ............ CANCELCALL '! this.cancelForm1() ' ............ Exit You can modify the Cancel callback at any time using, ! this.CancelCall = '! this.cancelForm2() '
Form Callbacks ( Quitcall )
TheQUITCALL callback is executed whenever the user Presses the QUIT/CLOSE icon (X) on the title bar of forms You can assign to the form 'sQUITCALL member by:Setup form!! MyForm ............ QUITCALL '! this.quitForm1() ' ............ Exit You can modify the Quit callback at any time using, ! this.QuitCall= '! this.quitForm2() '
Form Control Attributes
A button may optionally have a form control Attribute which takes effect after the callback Command is invoked Control Attributes: OK APPLY CANCEL RESET HELP