几何尺寸与公差论坛

 找回密码
 注册
查看: 767|回复: 0

【转帖】pdmworks search via api

[复制链接]
发表于 2009-4-12 22:02:14 | 显示全部楼层 |阅读模式
pdmworks search via api
the api help doesn't even mention search, but the search methods are exposed -but i am doing something wrong with declarations - can anyone help? the follwing does not run because of the declaratino of search criteria and search options
dim opt as pdmworks.ipdmwsearchoptions
dim crit as pdmworks.pdmwsearchcriteria
dim searchresults as pdmworks.pdmwsearchresults
dim r as pdmworks.pdmwsearchresult
dim szname as string
szname = listbox1.selecteditem.tostring
opt = pdmworks.pdmwsearchoptions<----- this is not valid
crit = opt.searchcriteria
crit.addcriteria(pdmworks.pdmwandor.pdmwand, pdmworks.pdmwpropertytype.pdmwowner, "owner", pdmworks.pdmwconditiontype.pdmwcontains, szname)
with opt
.ignorecase = true
.ignorelinks = true
.includehiddendocuments = true
.searchconfigspecificproperties = false
.searchonlychildrenof = ""
end with
searchresults = pdm.search(opt)
for each r in searchresults
msgbox(r.name)
next
from searchcriteria example
set opt = connection.getsearchoptionsobject
quick
您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|Archiver|小黑屋|几何尺寸与公差论坛

GMT+8, 2024-12-23 19:20 , Processed in 0.033816 second(s), 19 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表