• <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>

            eryar

            PipeCAD - Plant Piping Design Software.
            RvmTranslator - Translate AVEVA RVM to OBJ, glTF, etc.
            posts - 603, comments - 590, trackbacks - 0, articles - 0

            AVEVA PDMS PML 二次開發之模糊查找工具

            Posted on 2012-08-15 19:58 eryar 閱讀(4890) 評論(7)  編輯 收藏 引用 所屬分類: 4.AVEVA Solution

            AVEVA PDMS PML 二次開發之模糊查找工具FuzzySearch

            在AVEVA Plant(PDMS)/AVEVA Marine中,要查找一個不是很清楚的元素可能有些不便,使用PML開發了一個模糊查找的小工具,如下圖所示:

            Main GUI

            使用方法:

            1. 在key word中輸入需要查找的部件的名字或名字的一部分;

            2. 也可輸入通配符,如*表示求知的任意幾個字符, ?表示求知的一個字符;

            3. 查找到的元素將會在列表中顯示出來,在列表中選擇,將會在模型中定位到選擇的元素;

             


            2012.12.6
            看很多人比較喜歡這個工具,將其源代碼陳列如下:

              1 -------------------------------------------------------------------------------
              2 -- Copyright (C) 2010 eryar@163.com All Rights Reserved.
              3 --
              4 -- File:            FuzzySearch.pmlfrm
              5 --   Type:          Form Definition
              6 --   Group:         Application
              7 --     Keyword:     MDS
              8 --   Module:        DESIGN
              9 --
             10 -- Author:          eryar@163.com
             11 -- Created:         2012-8-15 19:22
             12 --
             13 -- Description:     Fuzzy search element.
             14 --
             15 -------------------------------------------------------------------------------
             16 setup form !!fuzzysearch
             17     !this.formtitle     = 'Fuzzy Search'
             18     !this.cancelCall    = '!this.OnCancel()'
             19     !this.formRevision  = '0.1v'
             20 
             21     frame .fuzzySearchFrame
             22         text    .tKeyWord   'Key Word:' width 18 is string
             23         button  .bGo        'Go'    callback    '!this.OnOk()'
             24         button  .bHelp      '?'     callback    '!this.OnHelp()'
             25         list    .lResult    at xmin.tKeyWord ymax+0.2    width 36 height 16
             26     exit
             27 
             28     path down
             29 
             30     button  .bCancel    'Cancel'    callback    '!this.OnCancel()'
             31 
             32 exit
             33 -------------------------------------------------------------------------------
             34 --
             35 -- Method:      fuzzySearch()
             36 --
             37 -- Description: default constructor.
             38 --
             39 -- Method Type: Function/Procedure
             40 -- Arguments:
             41 --   [#] [R/RW] [Data Type] [Description]
             42 -- Return:
             43 --   [Data Type] [Description]
             44 --
             45 -------------------------------------------------------------------------------
             46 define method .fuzzysearch()
             47     !this.lResult.callback  =   '!this.zoomSelection()'
             48 endmethod
             49 -------------------------------------------------------------------------------
             50 --
             51 -- Method:      apply()
             52 --
             53 -- Description: apply the operation.
             54 --
             55 -- Method Type: Function/Procedure
             56 -- Arguments:
             57 --   [#] [R/RW] [Data Type] [Description]
             58 -- Return:
             59 --   [Data Type] [Description]
             60 --
             61 -------------------------------------------------------------------------------
             62 define method .OnOk()
             63     -- 1. Check the input name;
             64     if(!this.tKeyWord.val.Empty()) then
             65         !!alert.message('Please input the key word!')
             66         return 
             67     endif
             68 
             69     -- 2. Collect all elements for the whole world;
             70     var !allElements collect all for world
             71 
             72     -- 3. Search the element include the keyword;
             73     -- If include the keyword, add the element to
             74     -- the result list.
             75     !dtext  = array()
             76     !rtext  = array()
             77     !strName= string()
             78     !strKeyWord = !this.tKeyword.val
             79 
             80     do !element values !allElements
             81         -- 
             82         !current    = object dbref(!element)
             83         !strName    = !current.namn
             84         
             85         if(!strName.MatchWild(!strKeyWord)) then
             86             !dtext.append(!strName)
             87             !rtext.append(!element)
             88         endif
             89         
             90     enddo
             91 
             92     -- 4. Add to the result list.
             93     !this.lResult.dtext = !dtext
             94     !this.lResult.rtext = !rtext
             95 
             96 endmethod
             97 -------------------------------------------------------------------------------
             98 --
             99 -- Method:      ZoomSelection()
            100 --
            101 -- Description: Zoom to the selected element.
            102 --
            103 -- Method Type: Function/Procedure
            104 -- Arguments:
            105 --   [#] [R/RW] [Data Type] [Description]
            106 -- Return:
            107 --   [Data Type] [Description]
            108 --
            109 -------------------------------------------------------------------------------
            110 define method .ZoomSelection()
            111     !selection  = !this.lResult.Selection()
            112     !selected   = object dbref(!selection)
            113     
            114     -- Zoom to selection.
            115     add $!selected
            116     auto $!selected
            117 
            118 endmethod
            119 -------------------------------------------------------------------------------
            120 --
            121 -- Method:      OnCancel()
            122 --
            123 -- Description: 
            124 --
            125 -- Method Type: Function/Procedure
            126 -- Arguments:
            127 --   [#] [R/RW] [Data Type] [Description]
            128 -- Return:
            129 --   [Data Type] [Description]
            130 --
            131 -------------------------------------------------------------------------------
            132 define method .OnCancel()
            133     !this.hide()
            134 endmethod
            135 -------------------------------------------------------------------------------
            136 --
            137 -- Method:      OnHelp()
            138 --
            139 -- Description: Show how to use information.
            140 --
            141 -- Method Type: Function/Procedure
            142 -- Arguments:
            143 --   [#] [R/RW] [Data Type] [Description]
            144 -- Return:
            145 --   [Data Type] [Description]
            146 --
            147 -------------------------------------------------------------------------------
            148 define method .OnHelp()
            149     !!alert.message('In the KeyWord * for any number of characters and ? for any single chararcter.')
            150 endmethod
            151 -------------------------------------------------------------------------------

            Feedback

            # re: AVEVA PDMS PML 二次開發之模糊查找工具  回復  更多評論   

            2012-08-15 23:24 by tb
            不錯的工具 下載了 謝謝博主

            # re: AVEVA PDMS PML 二次開發之模糊查找工具  回復  更多評論   

            2012-08-18 14:55 by dsmilely
            無法下載?

            # re: AVEVA PDMS PML 二次開發之模糊查找工具  回復  更多評論   

            2012-08-19 20:01 by eryar
            可以發郵件給我, 我發給你......@dsmilely

            # re: AVEVA PDMS PML 二次開發之模糊查找工具  回復  更多評論   

            2012-08-25 16:33 by xiaoxin
            收錄你的文章到www.3d-sharp.com pdms論壇了 請多多支持

            # re: AVEVA PDMS PML 二次開發之模糊查找工具  回復  更多評論   

            2012-09-09 17:30 by eryar
            歡迎轉載,注明出處即可。@xiaoxin

            # re: AVEVA PDMS PML 二次開發之模糊查找工具  回復  更多評論   

            2014-03-21 11:02 by 王德軍
            您好,可以請教個問題嗎?PDMS的數據庫文件支持不安裝PDMS就能訪問他的數據嗎?還是需要先轉一下。

            # re: AVEVA PDMS PML 二次開發之模糊查找工具  回復  更多評論   

            2014-03-21 12:54 by eryar
            你好,
            可以使用AVEVA提供的Dars, C#的SDK等二次開發庫來直接訪問他的Design及其他類型數據庫,這樣就可以不安裝PDMS。
            @王德軍
            亚洲精品无码久久久久sm| 久久99国产综合精品免费| 久久成人国产精品| 99久久精品免费看国产| 99久久国产综合精品网成人影院| 久久亚洲熟女cc98cm| 97久久婷婷五月综合色d啪蜜芽| 久久久久亚洲国产| 国产一级持黄大片99久久| 国产精品成人精品久久久| 国产精品久久新婚兰兰| 亚洲国产日韩欧美久久| 蜜臀av性久久久久蜜臀aⅴ麻豆 | 久久精品国产久精国产果冻传媒| 亚洲精品无码久久久影院相关影片| 一级做a爰片久久毛片毛片| 伊人色综合九久久天天蜜桃| 久久se精品一区精品二区国产| 久久久高清免费视频| 国内精品久久久久影院薰衣草| 色偷偷88888欧美精品久久久| 久久国产色AV免费看| 国产—久久香蕉国产线看观看 | 久久精品国产清高在天天线| 亚洲乱码中文字幕久久孕妇黑人| 国产午夜福利精品久久2021| 国产精品久久久久久| 无码超乳爆乳中文字幕久久| 色综合久久久久综合体桃花网| 久久精品一区二区国产| 久久精品人妻一区二区三区| 亚洲精品国产综合久久一线| 久久91精品国产91| 欧美日韩中文字幕久久久不卡| 国产呻吟久久久久久久92| 亚洲人成网站999久久久综合| 精品久久无码中文字幕| 久久精品青青草原伊人| 久久这里只有精品视频99| 久久国产三级无码一区二区| 无码国内精品久久综合88|