define method .drmview4() do !repick PROMPT OFF PROMPT LOAD ESCAPE |Identify any item within the dimension| ID DPOI DPPT DPBA ADIR APPT @ !tproj1 = dbfile !tproj = !tproj1.substring(3,3) !tagCE = !!ce var !tddnam ddname own var !tldimpos dpos var !tldimdir dir !tldimposX1 = !tldimpos.after('X ').before(' Y') !tldimposY1 = !tldimpos.after('Y ') !tldimposX = real() !tldimposY = real() !tldimposX = $!tldimposX1 !tldimposY = $!tldimposY1 view var !tvname name var !tvdir dir var !tvadeg adeg var !tvscal1 vscale !tvscal = real() !tvscal = $!tvscal1 var !tvpos xypos !tvposX1 = !tvpos.after('X ').before(' Y') !tvposY1 = !tvpos.after('Y ') !tvposX = real() !tvposY = real() !tvposX = $!tvposX1 !tvposY = $!tvposY1 var !tvsize size !tvsizeX1 = !tvsize.before(' ') !tvsizeY1 = !tvsize.after(' ') !tvsizeX = real() !tvsizeY = real() !tvsizeX = $!tvsizeX1 !tvsizeY = $!tvsizeY1 !tvsizeXh = !tvsizeX / 2 !tvsizeYh = !tvsizeY / 2 var !vlimit :CDLIMITS !vlimitF = !vlimit.after('From ').before(' To') !vlimitT = !vlimit.after(' To') !vlimitFE1 = !vlimitF.after('E ').before(' N') !vlimitFN1 = !vlimitF.after('N ').before(' U') !vlimitFU1 = !vlimitF.after('U ') !vlimitTE1 = !vlimitT.after('E ').before(' N') !vlimitTN1 = !vlimitT.after('N ').before(' U') !vlimitTU1 = !vlimitT.after('U ') !vlimitFE = real() !vlimitFN = real() !vlimitFU = real() !vlimitTE = real() !vlimitTN = real() !vlimitTU = real() !vlimitFE = $!vlimitFE1 !vlimitFN = $!vlimitFN1 !vlimitFU = $!vlimitFU1 !vlimitTE = $!vlimitTE1 !vlimitTN = $!vlimitTN1 !vlimitTU = $!vlimitTU1 $!tddnam !tddnpos = pos in world !tddnposE1 = !tddnpos.east !tddnposN1 = !tddnpos.north !tddnposU1 = !tddnpos.up !tddnposE = real() !tddnposN = real() !tddnposU = real() !tddnposE = $!tddnposE1 !tddnposN = $!tddnposN1 !tddnposU = $!tddnposU1 var !tddinsu ispec of pipe !ldimoffL = (!tvposX - !tldimposX) - !tvsizeXh !ldimoffR = (!tldimposX - !tvposX) - !tvsizeXh !ldimoffD = (!tvposY - !tldimposY) - !tvsizeYh !ldimoffU = (!tldimposY - !tvposY) - !tvsizeYh if (!tvdir eq 'D')then if (!tvadeg eq '0')then !tdddiffR = !vlimitTE - !tddnposE !tdddiffL = !tddnposE - !vlimitFE !tdddiffU = !vlimitTN - !tddnposN !tdddiffD = !tddnposN - !vlimitFN elseif (!tvadeg eq '90')then !tdddiffR = !tddnposN - !vlimitFN !tdddiffL = !vlimitTN - !tddnposN !tdddiffU = !vlimitTE - !tddnposE !tdddiffD = !tddnposE - !vlimitFE elseif (!tvadeg eq '-90')then !tdddiffR = !vlimitTN - !tddnposN !tdddiffL = !tddnposN - !vlimitFN !tdddiffU = !tddnposE - !vlimitFE !tdddiffD = !vlimitTE - !tddnposE elseif (!tvadeg eq '180')then !tdddiffR = !tddnposE - !vlimitFE !tdddiffL = !vlimitTE - !tddnposE !tdddiffU = !tddnposN - !vlimitFN !tdddiffD = !vlimitTN - !tddnposN endif elseif (!tvdir eq 'N')then !tdddiffR = !vlimitTE - !tddnposE !tdddiffL = !tddnposE - !vlimitFE !tdddiffU = !vlimitTU - !tddnposU !tdddiffD = !tddnposU - !vlimitFU elseif (!tvdir eq 'S')then !tdddiffR = !tddnposE - !vlimitFE !tdddiffL = !vlimitTE - !tddnposE !tdddiffU = !vlimitTU - !tddnposU !tdddiffD = !tddnposU - !vlimitFU elseif (!tvdir eq 'W')then !tdddiffR = !vlimitTN - !tddnposN !tdddiffL = !tddnposN - !vlimitFN !tdddiffU = !vlimitTU - !tddnposU !tdddiffD = !tddnposU - !vlimitFU elseif (!tvdir eq 'E')then !tdddiffR = !tddnposN - !vlimitFN !tdddiffL = !vlimitTN - !tddnposN !tdddiffU = !vlimitTU - !tddnposU !tdddiffD = !tddnposU - !vlimitFU endif !leadRX = (!tdddiffR * !tvscal) + !ldimoffR + 12 !leadLX = (!tdddiffL * !tvscal) + !ldimoffL + 8 !leadUY = (!tdddiffU * !tvscal) + !ldimoffU + 12 !leadDY = (!tdddiffD * !tvscal) + !ldimoffD + 8 !distRX = (!tdddiffR * !tvscal) + !ldimoffR + 15 !distLX = (!tdddiffL * !tvscal) + !ldimoffL + 60 !distUY = (!tdddiffU * !tvscal) + !ldimoffU + 15 !distDY = (!tdddiffD * !tvscal) + !ldimoffD + 60 if (!tvdir eq 'D')then if ((!tvadeg eq '0') or (!tvadeg eq '180'))then if ( ((!tldimdir eq 'N') or (!tldimdir eq 'S')) and (!tldimposX gt !tvposX))then $!tagCE pltxt '' overshoot 12 $!tvname/USER_Labs new glab ddname $!tddnam if(!tproj eq 'GRF')then btext '#:LINENO<FROM PIP> #/BOP EL #PABOPU(C3:)' else btext '#PIPE(C2:) #/BOP EL #PABOPU(C3:)' endif apoff $!leadRX 0 if (!tddinsu eq '=0/0')then cpoff 87 -1 else cpoff 87 -1 endif bpoff 0 100 xypos $!distRX 6 justification left chei 4 adegree 0 Lshape Angled Horizontal alignment base LLStyle Solid LLColour Red LFStyle Solid LFColour Red Txcolour yellow Lframe false at @ LEAD 90 DEG HORI elseif (((!tldimdir eq 'N') or (!tldimdir eq 'S')) and (!tldimposX lt !tvposX))then $!tagCE pltxt '' overshoot 8 $!tvname/USER_Labs new glab ddname $!tddnam if(!tproj eq 'GRF')then btext '#:LINENO<FROM PIP> #/BOP EL #PABOPU(C3:)' else btext '#PIPE(C2:) #/BOP EL #PABOPU(C3:)' endif apoff -$!leadLX 0 cpoff 0 -1 bpoff 0 100 xypos -$!distLX 6 justification left chei 4 adegree 0 Lshape Angled Horizontal alignment base LLStyle Solid LLColour Red LFStyle Solid LFColour Red Txcolour yellow Lframe false at @ LEAD 90 DEG HORI elseif (((!tldimdir eq 'E') or (!tldimdir eq 'W')) and (!tldimposY gt !tvposY))then $!tagCE pltxt '' overshoot 12 $!tvname/USER_Labs new glab ddname $!tddnam if(!tproj eq 'GRF')then btext '#:LINENO<FROM PIP> #/BOP EL #PABOPU(C3:)' else btext '#PIPE(C2:) #/BOP EL #PABOPU(C3:)' endif apoff 0 $!leadUY if (!tddinsu eq '=0/0')then cpoff 87 -1 else cpoff 87 -1 endif bpoff 100 0 xypos -6 $!distUY justification left chei 4 adegree 90 Lshape Angled Vertical alignment base LLStyle Solid LLColour Red LFStyle Solid LFColour Red Txcolour yellow Lframe false at @ LEAD 90 DEG VERT bpoff 100 0 elseif (((!tldimdir eq 'E') or (!tldimdir eq 'W')) and (!tldimposY lt !tvposY))then $!tagCE pltxt '' overshoot 8 $!tvname/USER_Labs new glab ddname $!tddnam if(!tproj eq 'GRF')then btext '#:LINENO<FROM PIP> #/BOP EL #PABOPU(C3:)' else btext '#PIPE(C2:) #/BOP EL #PABOPU(C3:)' endif apoff 0 -$!leadDY cpoff 0 -1 bpoff 100 0 xypos -6 -$!distDY justification left chei 4 adegree 90 Lshape Angled Vertical alignment base LLStyle Solid LLColour Red LFStyle Solid LFColour Red Txcolour yellow Lframe false at @ LEAD 90 DEG VERT bpoff 100 0 endif elseif ((!tvadeg eq '90') or (!tvadeg eq '-90'))then if ( ((!tldimdir eq 'E') or (!tldimdir eq 'W')) and (!tldimposX gt !tvposX))then $!tagCE pltxt '' overshoot 12 $!tvname/USER_Labs new glab ddname $!tddnam if(!tproj eq 'GRF')then btext '#:LINENO<FROM PIP> #/BOP EL #PABOPU(C3:)' else btext '#PIPE(C2:) #/BOP EL #PABOPU(C3:)' endif apoff $!leadRX 0 if (!tddinsu eq '=0/0')then cpoff 87 -1 else cpoff 87 -1 endif bpoff 0 100 xypos $!distRX 6 justification left chei 4 adegree 0 Lshape Angled Horizontal alignment base LLStyle Solid LLColour Red LFStyle Solid LFColour Red Txcolour yellow Lframe false at @ LEAD 90 DEG HORI elseif (((!tldimdir eq 'E') or (!tldimdir eq 'W')) and (!tldimposX lt !tvposX))then $!tagCE pltxt '' overshoot 8 $!tvname/USER_Labs new glab ddname $!tddnam if(!tproj eq 'GRF')then btext '#:LINENO<FROM PIP> #/BOP EL #PABOPU(C3:)' else btext '#PIPE(C2:) #/BOP EL #PABOPU(C3:)' endif apoff -$!leadLX 0 cpoff 0 -1 bpoff 0 100 xypos -$!distLX 6 justification left chei 4 adegree 0 Lshape Angled Horizontal alignment base LLStyle Solid LLColour Red LFStyle Solid LFColour Red Txcolour yellow Lframe false at @ LEAD 90 DEG HORI elseif (((!tldimdir eq 'N') or (!tldimdir eq 'S')) and (!tldimposY gt !tvposY))then $!tagCE pltxt '' overshoot 12 $!tvname/USER_Labs new glab ddname $!tddnam if(!tproj eq 'GRF')then btext '#:LINENO<FROM PIP> #/BOP EL #PABOPU(C3:)' else btext '#PIPE(C2:) #/BOP EL #PABOPU(C3:)' endif apoff 0 $!leadUY if (!tddinsu eq '=0/0')then cpoff 87 -1 else cpoff 87 -1 endif bpoff 100 0 xypos -6 $!distUY justification left chei 4 adegree 90 Lshape Angled Vertical alignment base LLStyle Solid LLColour Red LFStyle Solid LFColour Red Txcolour yellow Lframe false at @ LEAD 90 DEG VERT bpoff 100 0 elseif (((!tldimdir eq 'N') or (!tldimdir eq 'S')) and (!tldimposY lt !tvposY))then $!tagCE pltxt '' overshoot 8 $!tvname/USER_Labs new glab ddname $!tddnam if(!tproj eq 'GRF')then btext '#:LINENO<FROM PIP> #/BOP EL #PABOPU(C3:)' else btext '#PIPE(C2:) #/BOP EL #PABOPU(C3:)' endif apoff 0 -$!leadDY cpoff 0 -1 bpoff 100 0 xypos -6 -$!distDY justification left chei 4 adegree 90 Lshape Angled Vertical alignment base LLStyle Solid LLColour Red LFStyle Solid LFColour Red Txcolour yellow Lframe false at @ LEAD 90 DEG VERT bpoff 100 0 endif endif -- elseif ((!tvdir eq 'N') or (!tvdir eq 'S'))then if ( ((!tldimdir eq 'U') or (!tldimdir eq 'D')) and (!tldimposX gt !tvposX))then $!tagCE pltxt '' overshoot 12 $!tvname/USER_Labs new glab ddname $!tddnam if(!tproj eq 'GRF')then btext '#:LINENO<FROM PIP> #/BOP EL #PABOPU(C3:)' else btext '#PIPE(C2:) #/BOP EL #PABOPU(C3:)' endif apoff $!leadRX 0 if (!tddinsu eq '=0/0')then cpoff 87 -1 else cpoff 87 -1 endif bpoff 0 100 xypos $!distRX 6 justification left chei 4 adegree 0 Lshape Angled Horizontal alignment base LLStyle Solid LLColour Red LFStyle Solid LFColour Red Txcolour yellow Lframe false at @ LEAD 90 DEG HORI elseif (((!tldimdir eq 'U') or (!tldimdir eq 'D')) and (!tldimposX lt !tvposX))then $!tagCE pltxt '' overshoot 8 $!tvname/USER_Labs new glab ddname $!tddnam if(!tproj eq 'GRF')then btext '#:LINENO<FROM PIP> #/BOP EL #PABOPU(C3:)' else btext '#PIPE(C2:) #/BOP EL #PABOPU(C3:)' endif apoff -$!leadLX 0 cpoff 0 -1 bpoff 0 100 xypos -$!distLX 6 justification left chei 4 adegree 0 Lshape Angled Horizontal alignment base LLStyle Solid LLColour Red LFStyle Solid LFColour Red Txcolour yellow Lframe false at @ LEAD 90 DEG HORI elseif (((!tldimdir eq 'E') or (!tldimdir eq 'W')) and (!tldimposY gt !tvposY))then $!tagCE pltxt '' overshoot 12 $!tvname/USER_Labs new glab ddname $!tddnam if(!tproj eq 'GRF')then btext '#:LINENO<FROM PIP> #/BOP EL #PABOPU(C3:)' else btext '#PIPE(C2:) #/BOP EL #PABOPU(C3:)' endif apoff 0 $!leadUY if (!tddinsu eq '=0/0')then cpoff 87 -1 else cpoff 87 -1 endif bpoff 100 0 xypos -6 $!distUY justification left chei 4 adegree 90 Lshape Angled Vertical alignment base LLStyle Solid LLColour Red LFStyle Solid LFColour Red Txcolour yellow Lframe false at @ LEAD 90 DEG VERT bpoff 100 0 elseif (((!tldimdir eq 'E') or (!tldimdir eq 'W')) and (!tldimposY lt !tvposY))then $!tagCE pltxt '' overshoot 8 $!tvname/USER_Labs new glab ddname $!tddnam if(!tproj eq 'GRF')then btext '#:LINENO<FROM PIP> #/BOP EL #PABOPU(C3:)' else btext '#PIPE(C2:) #/BOP EL #PABOPU(C3:)' endif apoff 0 -$!leadDY cpoff 0 -1 bpoff 100 0 xypos -6 -$!distDY justification left chei 4 adegree 90 Lshape Angled Vertical alignment base LLStyle Solid LLColour Red LFStyle Solid LFColour Red Txcolour yellow Lframe false at @ LEAD 90 DEG VERT bpoff 100 0 endif -- elseif ((!tvdir eq 'E') or (!tvdir eq 'W'))then if ( ((!tldimdir eq 'U') or (!tldimdir eq 'D')) and (!tldimposX gt !tvposX))then $!tagCE pltxt '' overshoot 12 $!tvname/USER_Labs new glab ddname $!tddnam if(!tproj eq 'GRF')then btext '#:LINENO<FROM PIP> #/BOP EL #PABOPU(C3:)' else btext '#PIPE(C2:) #/BOP EL #PABOPU(C3:)' endif apoff $!leadRX 0 if (!tddinsu eq '=0/0')then cpoff 87 -1 else cpoff 87 -1 endif bpoff 0 100 xypos $!distRX 6 justification left chei 4 adegree 0 Lshape Angled Horizontal alignment base LLStyle Solid LLColour Red LFStyle Solid LFColour Red Txcolour yellow Lframe false at @ LEAD 90 DEG HORI elseif (((!tldimdir eq 'U') or (!tldimdir eq 'D')) and (!tldimposX lt !tvposX))then $!tagCE pltxt '' overshoot 8 $!tvname/USER_Labs new glab ddname $!tddnam if(!tproj eq 'GRF')then btext '#:LINENO<FROM PIP> #/BOP EL #PABOPU(C3:)' else btext '#PIPE(C2:) #/BOP EL #PABOPU(C3:)' endif apoff -$!leadLX 0 cpoff 0 -1 bpoff 0 100 xypos -$!distLX 6 justification left chei 4 adegree 0 Lshape Angled Horizontal alignment base LLStyle Solid LLColour Red LFStyle Solid LFColour Red Txcolour yellow Lframe false at @ LEAD 90 DEG HORI elseif (((!tldimdir eq 'N') or (!tldimdir eq 'S')) and (!tldimposY gt !tvposY))then $!tagCE pltxt '' overshoot 12 $!tvname/USER_Labs new glab ddname $!tddnam if(!tproj eq 'GRF')then btext '#:LINENO<FROM PIP> #/BOP EL #PABOPU(C3:)' else btext '#PIPE(C2:) #/BOP EL #PABOPU(C3:)' endif apoff 0 $!leadUY if (!tddinsu eq '=0/0')then cpoff 87 -1 else cpoff 87 -1 endif bpoff 100 0 xypos -6 $!distUY justification left chei 4 adegree 90 Lshape Angled Vertical alignment base LLStyle Solid LLColour Red LFStyle Solid LFColour Red Txcolour yellow Lframe false at @ LEAD 90 DEG VERT bpoff 100 0 elseif (((!tldimdir eq 'N') or (!tldimdir eq 'S')) and (!tldimposY lt !tvposY))then $!tagCE pltxt '' overshoot 8 $!tvname/USER_Labs new glab ddname $!tddnam if(!tproj eq 'GRF')then btext '#:LINENO<FROM PIP> #/BOP EL #PABOPU(C3:)' else btext '#PIPE(C2:) #/BOP EL #PABOPU(C3:)' endif apoff 0 -$!leadDY cpoff 0 -1 bpoff 100 0 xypos -6 -$!distDY justification left chei 4 adegree 90 Lshape Angled Vertical alignment base LLStyle Solid LLColour Red LFStyle Solid LFColour Red Txcolour yellow Lframe false at @ LEAD 90 DEG VERT bpoff 100 0 endif endif enddo endmethod
https://aveva.dev-verintcommunity.com/cfs-file/__key/communityserver-discussions-components-files/1605/240153comb.pmlfrm