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进行信息的输入和展示,配置方式还是老样子,写一个输 ...
随机推荐
- mapreduce实现学生平均成绩
思路: 首先从文本读入一行数据,按空格对字符串进行切割,切割后包含学生姓名和某一科的成绩,map输出key->学生姓名 value->某一个成绩 然后在reduce里面对成绩进行遍历 ...
- <转载>获取运行中的TeamViewer的账号和密码
#define WIN32_LEAN_AND_MEAN #include <windows.h> #include <iostream> #pragma comment( li ...
- pandas读取Excel
time31 = pd.read_excel('F:/save_file/3问出车表.xlsx', sheetname='Sheet1') # 读取‘3问出车表.xlsx’中的Sheet1表单, ti ...
- Excel 导入到处问题处理!
1.未在本地计算机上注册"Microsoft.Jet.OLEDB.4.0" 因为没有安装64位的Jet40驱动.可以到 http://www.microsoft.com/downl ...
- git 上传项目到分支
步骤 git init git add . git commit -m'代码描述' git remote add origin 远程仓库地址 git branch xxx # 创建新分支 git ch ...
- hdu-2544-最短路(SPFA模板)
题目链接 题意很清晰,入门级题目,适合各种模板,可用dijkstra, floyd, Bellman-ford, spfa Dijkstra链接 Floyd链接 Bellman-Ford链接 SPFA ...
- python lambda 用途
可以让一个带参数函数,传递并以无参调用 def test(a): print a a=test # #a() a=897987 fun=lambda : test(a) fun()
- OpenCV - opencv3 图像处理 之 图像缩放( python与c++实现 )
转自:https://www.cnblogs.com/dyufei/p/8205121.html 一. 主要函数介绍 1) 图像大小变换 cvResize () 原型: voidcvResize(co ...
- 反编译(javap)操作和可视化界面
1.反编译(javap)操作和可视化界面 演示:
- LeetCode Beautiful Arrangement
原题链接在这里:https://leetcode.com/problems/beautiful-arrangement/description/ 题目: Suppose you have N inte ...