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

0% found this document useful (0 votes)
834 views13 pages

PML Macro PDF - Compress

- The document describes how to create a simple tank and holes in Aveva E3D and PDMS using PML macros and forms. - It provides instructions for saving PML files in the correct directories and running commands to make the macros and forms available. - Macros are then used to quickly generate tanks with different parameters or add holes to existing primitives by selecting them and running the macro.
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)
834 views13 pages

PML Macro PDF - Compress

- The document describes how to create a simple tank and holes in Aveva E3D and PDMS using PML macros and forms. - It provides instructions for saving PML files in the correct directories and running commands to make the macros and forms available. - Macros are then used to quickly generate tanks with different parameters or add holes to existing primitives by selecting them and running the macro.
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/ 13

 

([email protected] )
By : Mansyur Usman ([email protected] PML & Macro for Aveva E3D and PDMS

PML AND MACRO FOR AVEVA E3D AND PDMS

- Save file  MSRTANK.pmlfrm  to C:\Program Files


(x86)\AVEVA\Plant\E3D1.1.0\PMLLIB\design\forms\
- Open Aveva E3D

slam is My Way
 

([email protected] )
By : Mansyur Usman ([email protected] PML & Macro for Aveva E3D and PDMS

- Type in Command line  PML REHASH ALL


- Type in Command line  PML INDEX
- Type in Command line  SHOW!!MSRTANK

- Position in Zone Area of Design Explorer


- Fill the parameter value of that tank that you wanted or
or used default
- Click Create

slam is My Way
 

([email protected] )
By : Mansyur Usman ([email protected] PML & Macro for Aveva E3D and PDMS

- Right now we will use the macro of MSRHOLE.mac


- Save File  MSRHOLE.mac in that drive that you wanted, in this case we save
in O Drive
- Select Primitive that you wanted to make hole

- Drag Macro
Macro MSRHOLE.mac
MSRHOLE.mac to the command line or Type
Type in Command line
$M O:\MSRHOLE.mac

slam is My Way
 

([email protected] )
By : Mansyur Usman ([email protected] PML & Macro for Aveva E3D and PDMS

- Now we will try them in Aveva PDMS


- Save file  MSRTANK.pmlfrm to
C:\AVEVA\Plant\PDMS12.1.SP4\PMLLIB\design\forms\
- Open PDMS

slam is My Way
 

By : Mansyur Usman ([email protected]


([email protected] ) PML & Macro for Aveva E3D and PDMS

- Type in Command line  PML REHASH ALL


- Type in Command line  PML INDEX
- Type in Command line  SHOW!!MSRTANK

- Position in Zone Area of Design Explorer


- Fill the parameter value of that tank that you wanted or
or used default
- Click Create

slam is My Way
 

([email protected] )
By : Mansyur Usman ([email protected] PML & Macro for Aveva E3D and PDMS

- Right now we will use the macro of MSRHOLE.mac


- Save File  MSRHOLE.mac in that drive that you wanted, in this case we save
in O Drive
- Select Primitive that you wanted to make hole

- Drag Macro
Macro MSRHOLE.mac
MSRHOLE.mac to the command line or Type
Type in Command line
$M O:\MSRHOLE.mac

slam is My Way
 

([email protected] )
By : Mansyur Usman ([email protected] PML & Macro for Aveva E3D and PDMS

-- Created by : Mansyur Usman ([email protected])


([email protected])
-- PML for Creating Simple Tank
-- PML run in Aveva E3D and Aveva PDMS
-- Name : MSRTANK.pmlfrm
-- Created dated 15 - September - 2015

-- Chemical Engineering Sriwijaya University (UNSRI) Palembang - Indonesia

setup form !!msrtank size 64 8


!this .formtitle='T
.f ormtitle='Tank
ank Form'
path d
text .L1 'Diameter Tank ' at 0 1 width 8 is REAL
text .L2 'Tinggi Tank ' at 0 2 width 8 is REAL
text .L3 'Tinggi Atap ' at 0 3 width 8 is REAL
text .L4 'Tebal Plate ' at 0 4 width 8 is REAL
text .L5 'Diameter Plate ' at 0 5 width 8 is REAL
text .L6 'Tebal Pondasi ' at 0 6 width 8 is REAL
text .L7 'Diameter Pondasi ' at 0 7 width 8 is REAL
text .L8 'Nama Tank ' at 0 8 width 8 is STRING

frame .framepos 'Form' at 28 1


button .msr 'Create' at 0 1 callback '!this.create()' backg yellow
button .usm 'Dismiss' at 18 1 backg green CANCEL

button .yen 'Delete' at 9 1 callback '!this.hapus()' backg pink

paragraph .p1 AT 0 2.5 text 'This PML is used for Creating Simple Tank in Aveva E3D and
 Aveva PDMS' width 34 lines 2
paragraph .p2 AT 0 4.5 text 'your faithfully
f aithfully
Mansyur Usman' width 34 lines 3

!this.L1.val = 10000
!this.L2.val = 60000

!this.L3.val = 2000
!this.L4.val = 300

slam is My Way
 

By : Mansyur Usman ([email protected]


([email protected] ) PML & Macro for Aveva E3D and PDMS

!this.L5.val = 13000
!this.L6.val = 600
!this.L7.val = 16000
!this.L8.val = 'T-0001'
exit

Define method .create()


!L1 = !this.L1.val
!L2 = !this.L2.val
!L3 = !this.L3.val
!L4 = !this.L4.val
!L5 = !this.L5.val
!L6 = !this.L6.val
!L7 = !this.L7.val
!L8 = !this.L8.val

new equi
name /$!L8
new sube /$!L8/Body

new cyl
Diameter $!L1

Height $!L2
new dish
Height $!L3
Diameter $!L1
by U $!L2/2
enhance sube colour green
new sube /$!L8/Foundation
new cyl
Diameter $!L5
Height $!L4

slam is My Way
 

By : Mansyur Usman ([email protected]


([email protected] ) PML & Macro for Aveva E3D and PDMS

by d $!L2/2
by d $!L4/2

new cyl
Diameter $!L7

Height $!L6
by d $!L2/2
by d $!L6/2
by d $!L4

new sube /$!L8/Nozzle


new sube /$!L8/Datum
new sube /$!L8/Obstruction

new cyl
Level 7 10
Diameter ($!L1 * 2)
Height ($!L2 * 2)

 ADD EQUI
auto equi

DO !i FROM 1 TO 24 BY 1
rotate about N WRT /* by 15 thr cyli1
REPRE OBST ON TRANSLUCENCY 25
REM CE
 ADD CE
refresh
pause 0.5

slam is My Way
 

([email protected] )
By : Mansyur Usman ([email protected] PML & Macro for Aveva E3D and PDMS

REPRE OBST OFF


REM CE
 ADD CE
refresh
pause 0.5

enddo
Endmethod

Define method .hapus()


EQUI
delete EQUI
!this.L1.val = 100000
!this.L2.val = 50000
!this.L3.val = 20000
!this.L4.val = 600
!this.L5.val = 110000
!this.L6.val = 900
!this.L7.val = 120000
!this.L8.val = 'T-0002'
Endmethod
exit

slam is My Way
 

([email protected] )
By : Mansyur Usman ([email protected] PML & Macro for Aveva E3D and PDMS

-- Created by : Mansyur Usman ([email protected])


([email protected])
-- Macro for Creating Primitive Hole
-- The Macro run in Aveva E3D and Aveva PDMS
-- Name : MSRHOLE.mac
-- Created dated 15 - September - 2015

-- Chemical Engineering Sriwijaya University (UNSRI) Palembang Indonesia


Indonesia

Handle any
Elsehandle none
Endhandle

repre hole on
repre update

If !!CE.type eq 'BOX' then


!xl = !!ce.Xlength
!! ce.Xlength
!yl = !!ce.Ylength
!! ce.Ylength
!zl = !!ce.Zlength

new nbox
!xle = 0.95 * !xl
!yle = 1.2 * !yl

!zle = 0.95 * !zl


Xlength $!xle
Ylength $!yle
Zlength $!zle

elseIf !!CE.type eq 'CYLI' then


t hen
!dia = !!ce.diameter
!! ce.diameter
!hei = !!ce.height

slam is My Way
 

([email protected] )
By : Mansyur Usman ([email protected] PML & Macro for Aveva E3D and PDMS

new ncyl
!diam = !dia * 0.95
!heigh = 1.2 * !hei
! hei
diameter $!diam
height $!heigh

elseIf !!CE.type eq 'CONE' then


!dt = !!ce.dtop
!db = !!ce.dbottom
!hei = !!ce.height

new ncone
!dto = !dt * 0.95
!dbt = !db * 0.95
!heigh = 1. * !hei

Dtop $!dto
Dbottom $!dbt
Height $!heigh

elseIf !!CE.type eq 'DISH' then


!dia = !!ce.diameter
!! ce.diameter

!hei = !!ce.height
!ra = !!ce.radius

new ndish
!diam = !dia * 0.65
!heigh = 0.75 * !hei
! hei
diameter $!diam
height $!heigh
radius $!ra

slam is My Way
 

([email protected] )
By : Mansyur Usman ([email protected] PML & Macro for Aveva E3D and PDMS

elseIf !!CE.type eq 'CTOR' then


!ria = !!ce.rinside
!rio= !!ce.routside
!ang = !!ce.angle
!! ce.angle

new nctor
Rinside ($!ria - 1)
Routside ($!riod -1)
angle ($!ang + 10)

else
endif

slam is My Way

You might also like