Aveva. Pdms. Customise. UserControl

Here  you can find C# UserControl (PDMS version 12.0.6) + UserControl (PDMS version 12.1.4), that will make your life with PDMS little happier 🙂

Place genprimitives.pmlfrm to  d:\AVEVA\Plant\PDMS12.0.SP6\PMLLIB\design\forms\genprimitives.pmlfrm

and uLable.dll to D:\AVEVA\Plant\PDMS12.0.SP6\. 

Dont forget to make Backup of your files (PDMSUI\clib\files\ ) in that directory!!

Video Manual how it can be used:


Get Environment Variable in Aveva using C#

With such code its possible to get variables declared in evar.bat file:

(As an example I query network PDMSUI path that is global variable)

string pmlpath = Environment.GetEnvironmentVariable(“PDMSUI”);
string pdmsui = pmlpath.Split(‘ ‘)[0];

An with this code you can query local variable for current PDMS instance:

var pdmsexe = PdmsApplication.GetPdmsEnvironmentVariables(“PDMSEXE”);

AVEVA. PDMS.PML. Sort explorer using txt

Its possible to sort CE members by txt file(C:\array.txt) list, using this script:

!stringPath = ‘C:\array.txt’
!objectFilePath = object FILE(!stringPath)
!lines = !objectFilePath.readFile()
if( !lines.size() eq 0 OR !lines.size() eq 0)then
do !line from 2 to !lines.size() – 1
if(!lines[!line] ne ”) then
!realLine = !line – 1
reorder $!lines[$!line] after $!lines[$!realLine]

Video manual:

Aveva.PDMS.Convert DXF to PLT

Usually people use .plt for isodraft underlay, here are three methods for generating plt.

1. Pdms Command ( PLOT = D:\AVEVA\Plant\PDMS12.0.SP*\Plot\Plot.exe, Video) :

SYSCOM ‘PLOT PDMS C:\plot.dxf C:\plot.plt‘ 

2. Another good method is to use E3D, it can import dxf files without any difficulties and generate Draft Library.

3. Third method is to use Autocad and Autolisp script supplied with PDMS

How to make TTY mode auto-login shortcut to run script

Aveva PDMS arguments:

%pdms_installed_dir%\pdms.bat [mode] [project] [UN/PW] [MDB] [Load Method]


%pdms_installed_dir%\pdms.bat TTY SAM SYSTEM/XXXXXX /PIPE $M/%dir_location%\scriptName.pmlmac

Aveva E3D arguments:

CALL “C:\Program Files (x86)\AVEVA\Everything3D2.10\mon.exe” PROD E3D init “C:\Program Files (x86)\AVEVA\Everything3D2.10\launch.init” TTY XXX SYSTEM/XXXXXX /MDB $m/macroPath