AVEVA Community
AVEVA Community
  • Site
  • User
  • Site
  • Search
  • User
General
  • AVEVA World
General
Show Off Your Work! Piping Component Dimensions
  • Forums
  • Resources
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
  • Replies 36 replies
  • Subscribers 1 subscriber
  • Views 144 views
  • Users 0 members are here
Options
  • Share
  • More
  • Cancel
Related

Piping Component Dimensions

Aurelio Hinampas
Aurelio Hinampas over 11 years ago
 
  • Sign in to reply
  • Cancel
  • Aurelio Hinampas
    Aurelio Hinampas over 11 years ago
     

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Aurelio Hinampas
    Aurelio Hinampas over 11 years ago
     

    https://aveva.dev-verintcommunity.com/cfs-file/__key/communityserver-discussions-components-files/1635/280683pcompDim.pmlfrm

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Raul Perez May
    Raul Perez May over 11 years ago
    Excelent!!
    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Venkata Rao Peta
    Venkata Rao Peta over 11 years ago
    Good work rhel.
    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Wouter
    Wouter over 11 years ago
    Thank you, very helpful tool.
    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Aurelio Hinampas
    Aurelio Hinampas over 11 years ago
    Welcome, Woutr...

    Some additional fixed with the macro, please replace the method dimRemove with the code below: Purpose is not to overload the Aid Number array, it might cause to slow down your PC if the Array is not Cleared and contains too many items in the array when you Remove All Dimensions...

    define method .dimRemove( !action is string )
    if (!action.eq('ALL')) then
     do !i values !this.aidNum
      aid clear all $!
     enddo
     !this.aidNum.clear()
    else
     !ceRefe = !!ce
     branch
     handle any
      return error 1 '$!!error.text'
     endhandle
     !number = !!ce.string().substring(2).replace('/','').substring(6)
     !!ce = !ceRefe
     aid clear all $!
    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Tomas Veleman
    Tomas Veleman over 11 years ago
    Good job.
    By the way, this mentioned method work just with bran ... so i did small modification let we can use it on PIPE :

    define method .dimRemove( !action is string )
     if (!action.eq('ALL')) then
       do !i values !this.aidNum
         aid clear all $!
       enddo
       !this.aidNum.clear()
     else
       !ceRefe  = !!ce

       var !delaid coll all branch for ce
       do !dd values !delaid
        $!dd
        handle any
          return error 1 '$!!error.text'
        endhandle
        !number  = !!ce.string().substring(2).replace('/','').substring(6)
        !!ce  = !ceRefe
        aid clear all $!
    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Aurelio Hinampas
    Aurelio Hinampas over 11 years ago
    Tomek, thanks for the comment. You can freely modify the macro. A little modification with the code below.
    define method .dimRemove( !action is string )
     if (!action.eq('ALL')) then
       do !i values !this.aidNum
         aid clear all $!
       enddo
       !this.aidNum.clear()
     else
       !ceRefe  = !!ce
       var !delaid coll all branch for ce
       do !dd values !delaid
        !number  = !dd.substring(2).replace('/','').substring(6)
        aid clear all $!
    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Aurelio Hinampas
    Aurelio Hinampas over 11 years ago
    Tomek, I have modified the method dimRemove that will supports the type Branch, Pipe & etc...

    define method .dimRemove( !action is string )
    if (!action.eq('ALL')) then
    do !i values !this.aidNum
    aid clear all $!
    enddo
    !this.aidNum.clear()
    else
    !ceRefe = !!ce
    branch
    handle any
    -- Collect All Branch:
    var !branch collect all branch for ce
    if (!branch.size().eq(0)) then
    return
    endif
    golabel /skipBran
    endhandle
    !branch[1] = !!ce.string()
    label /skipBran
    do !bran values !branch
    !number = !bran.substring(2).replace('/','').substring(6)
    aid clear all $!
    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Tomas Veleman
    Tomas Veleman over 11 years ago
    i did the same changes, but in different way :-)
    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
>