100% found this document useful (1 vote)
852 views

PDMS - Pml.addin Part2 EnglishSE

The document provides steps to create a custom toolbar in the Design module in MYCPN. It involves: 1) Creating folders MYCPN-PMLLIB and MYCPN-PDMSUI on the C drive to store toolbar functions and definitions. 2) Adding files to define a new "My Company" toolbar and menu item and methods to modify the toolbar layout and add buttons. 3) Running PML REHASH ALL to load the new toolbar configuration.

Uploaded by

Erden Baldži
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
852 views

PDMS - Pml.addin Part2 EnglishSE

The document provides steps to create a custom toolbar in the Design module in MYCPN. It involves: 1) Creating folders MYCPN-PMLLIB and MYCPN-PDMSUI on the C drive to store toolbar functions and definitions. 2) Adding files to define a new "My Company" toolbar and menu item and methods to modify the toolbar layout and add buttons. 3) Running PML REHASH ALL to load the new toolbar configuration.

Uploaded by

Erden Baldži
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

HOW TO CREATE YOUR OWN TOOLBARS IN MODULE DESIGN.

Conditions: Conditional company name: MYCPN. Will be used in folder names. Adds a new panel My Company in the list of toolbars module Design. We consider the local variant, the C: drive

Actions: Create a folder MYCPN-PMLLIB on drive C. This folder will store all PML 2 functions, including a description of new menu items. Assigning a new path in the variable in the file PMLLIB evars.bat Example: SET PMLLIB=C:\MYCPN-PMLLIB% PMLLIB% Create a folder MYCPN-PDMSUI on drive C. This folder will store all own functions written in a PML, as well as a label to refer to definition of toolbars. Assigning a new path in the variable in the file PDMSUI evars.bat Example: SET PDMSUI=C:\MYCPN-PDMSUI% PDMSUI% Inside the folder MYCPN-PDMSUI create a folder named des, but inside a new folder folder named addins. Inside the folder addins create a file named mycpndesignaddin. Open it text editor and write the following lines: name: mycpndesignaddin object: APPMYCPNDESIGN Inside the folder MYCPN-PMLLIB create a folder mycpnmenus Inside the newly created folder, create a file named appmycpndesign.pmlobj Add the following to the file contents to a new item "My Company" in the main menu bar:
define object APPMYCPNDESIGN endobject -define method .APPMYCPNDESIGN() endmethod ---- Method: .modifyForm() -- Description: Modifying toolbars define method .modifyForm() !this.toolbars()

endmethod --- Method: .toolbars() -- Description: Creating toolbars define method .toolbars() frame .f1 TOOLBAR 'My Company' button .b1 tooltip Call of Form 1' pixmap /%PMLLIB%\icons\1.png width 32 height 32 callback 'show !!form1 free' button .b2 tooltip Request Attributes' pixmap /%PMLLIB%\icons\2.png width 32 height 32 callback Q ATT' exit !!appTbarCntrl.addToolbar('f1', 'ALL') endmethod

Then go to the module Monitor, open a command line and run command PML REHASH ALL.

Result: After these steps are performed in module Design will be a new panel tools My Company, can be mapped in any application. Note: form form 1 must be pre-determined - be in the folder% PMLLIB% and initialized team PML REHASH ALL specified files to a graphic display of buttons must exist in the folder % PMLLIB% / icon

You might also like