PDM/CDM中进行搜索
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中进行搜索的更多相关文章
- SAP CRM 在Web UI中创建搜索帮助
多数情况下,在Web UI为一个特定的字段提供搜索帮助需要在事务SE11中创建搜索帮助. (注:也可以通过在SE24中创建一个类并实现实现IF_BSP_WD_CUSTOM_F4_CALLBACK接口来 ...
- 解决Select2控件不能在jQuery UI Dialog中不能搜索的bug
本文使用博客园Markdown编辑器进行编辑 1.问题呈现 项目中使用了jQuery UI的Dialog控件,一般用来处理需要提示用户输入或操作的简单页面.逻辑是修改一个广告的图片和标题. 效果截图如 ...
- 详细解读Android中的搜索框—— SearchView
以前总是自己写的 今天看看别人做的 本篇讲的是如何用searchView实现搜索框,其实原理和之前的没啥差别,也算是个复习吧. 一.Manifest.xml 这里我用一个activity进行信息的输入 ...
- 在stream流和byte[]中查找(搜索)指定字符串
在 stream流 和 byte[] 中查找(搜索)指定字符串 这里注重看的是两个 Search 的扩展方法,一个是 stream 类型的扩展,另一个是 byte[] 类型的扩展, 如果大家有更好的“ ...
- extjs在窗体中添加搜索框
在extjs中添加搜索框,搜索框代码如下: this.searchField = new Ext.ux.form.SearchField({ store : this.store ...
- 在 Angular 中实现搜索关键字高亮
在 Angular 中,我们不应该试图直接修改 DOM 的内容,当需要更新 DOM 内容的时候,应该修改的其实是我们的数据模型,也就是 $scope 中的数据,Angular 会帮助我们将修改之后的数 ...
- MWeb for Mac使用教程-如何在文档库中快速搜索
使用MWeb for Mac专业的 Markdown 编辑写作软件,可以让你随时记录自己的想法,灵感,创意,为您的工作节省宝贵的时间.本篇文章带来的是MWeb for Mac如何在文档库中快速搜索使用 ...
- ABAP 中的搜索帮助
ABAP 中的搜索帮助 https://blog.csdn.net/u011576750/article/details/50999078 一.简介:在abap中,用到的搜索帮助个人遇到的情况如下,进 ...
- 详细解读Android中的搜索框(三)—— SearchView
本篇讲的是如何用searchView实现搜索框,其实原理和之前的没啥差别,也算是个复习吧. 一.Manifest.xml 这里我用一个activity进行信息的输入和展示,配置方式还是老样子,写一个输 ...
随机推荐
- Windows 配置Apache以便在浏览器中运行Python script的CGI模式
打开httpd.conf,找到”#ScriptInterpreterSource Registry “,移除前面的注释# (如果找不到这行,就自己添加进去) 找到“Options Indexes Fo ...
- openstack-ansible -- 3 Target hosts
Installing the operating system Install the Ubuntu Server 14.04 (Trusty Tahr) LTS 64-bit operating s ...
- js模板方法
模板方法模式,定义一个操作中的算法的骨架,而将一些步骤延迟到子类中.模板方法使得子类可以不改变一个算法的结构即可重定义该算法的某些特定步骤.模板方法模式把不变行为搬到超类中,从而去除了子类中的重复代码 ...
- phalcon: 开启模板缓存和缓存路径
/** * 设置view */ $di->set('view', function () use ($config) { $view = new \Phalcon\Mvc\View(); $vi ...
- WCF实现REST服务
REST 表述性状态转移(Representational State Transfer,REST),不是一种标准,而是一种软件架构风格. 基于REST的服务与基于SOAP的服务相比,性能.效率和易用 ...
- js设计模式理解干货
构造函数本身就是一个函数,只不过该函数是出于创建对象的目的而定义的. 创建Object实例的两种方式: new 操作符 var person = new Object(); person.name = ...
- 解决:easygui.msgbox("Hello there!")报错:Tcl_Init error: Can't find a usable init.tcl in the following directories问题的解决
今天学习<父与子的编程之旅>,当看到运行第一个gui时(代码如下): import easygui easygui.msgbox("Hello there!") 发现报 ...
- mac中的echo颜色输出
mac: echo "\033[1;36mSister Lin Fall from the Sky\033[0m" ubuntu: echo -e "\e[1;36mSi ...
- 51nod 1428 贪心
http://www.51nod.com/onlineJudge/questionCode.html#!problemId=1428 1428 活动安排问题 基准时间限制:1 秒 空间限制:13107 ...
- Mysql进程管理
mysql> show processlist;+----+------+-----------+------+---------+------+-------+---------------- ...