• it is possible, you change it to glab so that you can bend it.. we experience that. first it was tag by pltext of the dimension, after that if we need to adjust or arrange to avoid congested tag we change this pltxt to glab.. i will look for the macro I hope i will find it.. but the method is that, the macro will change the pltxt from dimension to glab and it is attached on the overshoot of the dimension.. or you can request your pdms admit to make that kind of macro..
  • Oke Herculez
    Thanks for response, I will to try you advise. Hope you can find the macro and share to us.

    Best Regards,
    Hilman
  •  

    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
    

  • Salamat herculez1980. makaktulong samin to.

    "Thank You herculez1980. It can help us."


    -JaysonX96
  • [QUOTE=HILMAN;94676]Hercules.
    Thank you so much.
    I have create button to make the button call the code. And have modify some code to matching between pltxt and glab attributes.
    I try it in sample project .
    Here I attached the result.

    [ATTACH=CONFIG]8579[/ATTACH]

    best regards,
    Hilman

    Why not share the modified code here.

    Your screenshot also too small to see the details
  •  

    https://aveva.dev-verintcommunity.com/cfs-file/__key/communityserver-discussions-components-files/1605/240153comb.pmlfrm

  • [QUOTE=HILMAN;94694]Guru4life
    Thanks for your advise.
    Please find attached, the modified code.

    here the step to run the macro :
    1. copy the macro to pmllib folder  C:\AVEVA\Plant\PDMS12.1.SP2\PMLLIB\design\forms
    2. Open draft and open sheet
    3.In command window, type
    PML REHASH ALL
    PML INDEX
    SHOW !!comb

    4. The form will shown in your screen
    5. Pick the button
    6. Pick projection line and arrange the glab.



    Best Regards.
    Hilman

    I have error encountered using your form what would be the possible cause?

    (61,528)  User exit from submode
    In line 15 of PML function comb.METD1
         ID DPOI DPPT DPBA ADIR APPT @
    Called from line 1 of Command/Form Callback Command
    !this.metd1()


    -Thanks

    -JaysonX96
  • Jayon
    If you press ESC the error will shown but not affected to result.
    To handle error (61,528) will relevant in macro topic or you request to your admin :joyous:.

    Best Regars,
    Hilman