Option   Explicit

ValidationMode   =   True

InteractiveMode =   im_Batch

Dim   mdl   '当前model

'获取当前活动model

Set   mdl   =   ActiveModel

dim isCdm

isCdm=0

If   (mdl   Is   Nothing)   Then

MsgBox   "There   is   no   current   Model "

ElseIf   mdl.IsKindOf(PdCDM.cls_Model)  or mdl.IsKindOf(PdPDM.cls_Model)   Then

If   mdl.IsKindOf(PdCDM.cls_Model) Then

isCdm=1

end if

If   mdl.IsKindOf(PdPDM.cls_Model)  Then

isCdm=0

end if

dim search

search= inputbox("输入要在PDM/CDM查找的字符,如要进行模糊查找,以%开始")

search=lcase(search)

ProcessFolder   mdl,isCdm

Else

MsgBox "文件类型不支持"

End   If

Private   sub   ProcessFolder(folder,isCdm)

dim tab

dim col

dim collect

if isCdm=0 then

set collect=folder.tables

else

set collect=folder.Entities

end if

for   each   tab   in  collect

if   not   tab.isShortcut   then

if  lcase(tab.code)=search or (mid(search,1,1)="%" and instr(lcase(tab.code),mid(search,2)) >0) then

output "[表]:  "+ folder.parent.name+"--->"+folder.name+"--->"+tab.name

end  if

dim subcollect

if isCdm=1 then

set  subcollect=tab.Attributes

else

set subcollect=tab.columns

end if

for each col in subcollect

if lcase(col.code)=search or (mid(search,1,1)="%" and instr(lcase(col.code),mid(search,2)) >0)  then

output "[字段]:  "+folder.parent.name+"--->"+folder.name+"--->"+tab.name+"--->"+col.name

end if

next

end if

next

'递归遍历子文件夹

Dim   f   '子文件夹

For   Each   f   In   folder.Packages

if   not   f.IsShortcut   then

ProcessFolder   f, isCdm

end   if

Next

end   sub

PDM/CDM中进行搜索的更多相关文章

  1. SAP CRM 在Web UI中创建搜索帮助

    多数情况下,在Web UI为一个特定的字段提供搜索帮助需要在事务SE11中创建搜索帮助. (注:也可以通过在SE24中创建一个类并实现实现IF_BSP_WD_CUSTOM_F4_CALLBACK接口来 ...

  2. 解决Select2控件不能在jQuery UI Dialog中不能搜索的bug

    本文使用博客园Markdown编辑器进行编辑 1.问题呈现 项目中使用了jQuery UI的Dialog控件,一般用来处理需要提示用户输入或操作的简单页面.逻辑是修改一个广告的图片和标题. 效果截图如 ...

  3. 详细解读Android中的搜索框—— SearchView

    以前总是自己写的 今天看看别人做的 本篇讲的是如何用searchView实现搜索框,其实原理和之前的没啥差别,也算是个复习吧. 一.Manifest.xml 这里我用一个activity进行信息的输入 ...

  4. 在stream流和byte[]中查找(搜索)指定字符串

    在 stream流 和 byte[] 中查找(搜索)指定字符串 这里注重看的是两个 Search 的扩展方法,一个是 stream 类型的扩展,另一个是 byte[] 类型的扩展, 如果大家有更好的“ ...

  5. extjs在窗体中添加搜索框

    在extjs中添加搜索框,搜索框代码如下: this.searchField = new Ext.ux.form.SearchField({            store : this.store ...

  6. 在 Angular 中实现搜索关键字高亮

    在 Angular 中,我们不应该试图直接修改 DOM 的内容,当需要更新 DOM 内容的时候,应该修改的其实是我们的数据模型,也就是 $scope 中的数据,Angular 会帮助我们将修改之后的数 ...

  7. MWeb for Mac使用教程-如何在文档库中快速搜索

    使用MWeb for Mac专业的 Markdown 编辑写作软件,可以让你随时记录自己的想法,灵感,创意,为您的工作节省宝贵的时间.本篇文章带来的是MWeb for Mac如何在文档库中快速搜索使用 ...

  8. ABAP 中的搜索帮助

    ABAP 中的搜索帮助 https://blog.csdn.net/u011576750/article/details/50999078 一.简介:在abap中,用到的搜索帮助个人遇到的情况如下,进 ...

  9. 详细解读Android中的搜索框(三)—— SearchView

    本篇讲的是如何用searchView实现搜索框,其实原理和之前的没啥差别,也算是个复习吧. 一.Manifest.xml 这里我用一个activity进行信息的输入和展示,配置方式还是老样子,写一个输 ...

随机推荐

  1. 按F12 IE浏览器的开发工具打不开解决方法

    在电脑的任务栏中选中开发人员工具窗体右击,出现以下页面: 点击移动菜单项,然后用键盘的上下左右键移动,直到开发人员工具的最小化窗体出现:

  2. Codeforces Round #368 (Div. 2) A , B , C

    A. Brain's Photos time limit per test 2 seconds memory limit per test 256 megabytes input standard i ...

  3. python中常见的日期换算

    time模块提供各种操作时间的函数  说明:一般有两种表示时间的方式:       第一种是时间戳的方式(相对于1970.1.1 00:00:00以秒计算的偏移量),时间戳是惟一的       第二种 ...

  4. Unity3d 异常与解决方案集合(持续)

    1:更新完unity的5.3.1 版本 后,打开SimpleFrameworld_UGUI 后出现 error CS0117: 'System.IO.Directory' does not conta ...

  5. python中set类型总结

    set的创建无非有两种方式: 一 直接使用{}创建新的set并初始化 例如: set1 = {1,2,3,"good news",(1,2,3)} #声明的时候可以包含元组,但不能 ...

  6. hdu3157有源汇上下界最小流

    题意:有源汇上下界最小流裸题,主要就是输入要用字符串的问题 #include<bits/stdc++.h> #define fi first #define se second #defi ...

  7. gulp插件之-----转化es6代码到es5 取消严格模式 remove "use strict" directive

    Installation npm install babel-plugin-transform-remove-strict-mode && yarn add babel-plugin- ...

  8. 28 python 并发编程之多进程

    一 multiprocessing模块介绍 python中的多线程无法利用多核优势,如果想要充分地使用多核CPU的资源(os.cpu_count()查看),在python中大部分情况需要使用多进程.P ...

  9. hdoj-3791-二叉搜索树(二叉搜索树模板题)

    #include <cstring> #include <cstdio> #include <iostream> using namespace std; type ...

  10. 安装Windows系统指南

    安装系统指南 WIN10PE内核与WIN8PE内核区别: Win10PE内核支持NVME(M.2)新硬盘,WIN8PE不支持NVME. 但是WIN8PE对老机器的适配更好一些,其他功能均一致. 多一个 ...