几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量  


返回   几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量 » 仿射空间:CAX软件开发(三)二次开发与程序设计 » CAD二次开发 » SolidWorks二次开发
用户名
密码
注册 帮助 会员 日历 银行 搜索 今日新帖 标记论坛为已读


 
 
主题工具 搜索本主题 显示模式
旧 2009-04-12, 09:35 PM   #1
yang686526
高级会员
 
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
yang686526 向着好的方向发展
默认 【转帖】loop through material data base

loop through material data base ?
has anybody ever been successful to loop through a material database to see what type of materials are all in it ?
if so i could really use some pointers.
thanks.
solidworks 2006,2007,2008,2009 (office premium.)
core 2 duo e6850 @ 3.00 mhz
window xp pro sp3 32 bit
ati firegl v7350
xml parsing is required. i could never be bothered to do it. just open up the database file with notepad and have a look at the structure. there is no direct api for this (unless its new to 2009 not looked yet)
thanks luke,
the reason why i need it is because i am making a small program to change material properties for a batch of parts and i wanted to display the list of all available types.
i did find a couple of examples of this sort of thing that i will try.
"i could never be bothered to do it."
you sound like it is a bad idea to do such a thing, may i ask why ?
solidworks 2006,2007,2008,2009 (office premium.)
core 2 duo e6850 @ 3.00 mhz
window xp pro sp3 32 bit
ati firegl v7350
edited: 01/27/2009 at 11:45 am by ben guenther
i don't think he's saying it's a bad thing to do, he just never needed to do it.
i'll get you eh steve, if it's the last thing i dooooo!
yea probably is i just misunderstood him.
i just cannot get it. this is what i found but do to my inexperience am not able to get it to work could somebody lend a few words ?
public articledoc as new domdocument
private sub cmdclose_click()
unload me
end sub
sub form_load()
loaddocument "c:\programme\solidworks\solidworks\lang\english\sldmaterials\solidworks materials.sldmat"
dim sections as ixmldomnodelist
dim ss as ixmldomnode
set ss = articledoc.childnodes.item(i)
set sections = ss.childnodes
sectionslist.clear
for i = 1 to sections.length - 1
c = sections.item(i).xml
sectionslist.additem sections.item(i).attributes.item(0).nodevalue, x = 1
next
sectionslist.listindex = 0
end sub
function loaddocument(url as string)
articledoc.async = false
articledoc.load url
end function
the above is the code i have and i keep getting an error on "set sections = ss.childnodes" if i open material database. if i open an actual xml document then i get to "sectionslist.additem sections.item(i).attributes.item(0).nodevalue, x = 1 and then it errors out there.
solidworks 2006,2007,2008,2009 (office premium.)
core 2 duo e6850 @ 3.00 mhz
window xp pro sp3 32 bit
ati firegl v7350
i have emails api for some schema and structure documentation on the databases, i will let you know when i hear back.
thanks luke.
solidworks 2006,2007,2008,2009 (office premium.)
core 2 duo e6850 @ 3.00 mhz
window xp pro sp3 32 bit
ati firegl v7350
quick
yang686526离线中   回复时引用此帖
GDT自动化论坛(仅游客可见)
 


主题工具 搜索本主题
搜索本主题:

高级搜索
显示模式

发帖规则
不可以发表新主题
不可以回复主题
不可以上传附件
不可以编辑您的帖子

vB 代码开启
[IMG]代码开启
HTML代码关闭

相似的主题
主题 主题发起者 论坛 回复 最后发表
【转帖】can i import points data from excel yang686526 SolidWorks二次开发 0 2009-04-12 05:43 PM
【转帖】getting data from cdmis - c-dmis user forum.txt huangyhg PC-DMIS 0 2009-04-06 07:32 PM
【转帖】for cmm data imort -finally originalwork self-use sha.txt huangyhg PC-DMIS 0 2009-04-06 07:21 PM
data base system error:-127 huangyhg PC-DMIS 0 2009-04-06 06:49 PM


所有的时间均为北京时间。 现在的时间是 10:04 AM.


于2004年创办,几何尺寸与公差论坛"致力于产品几何量公差标准GD&T | GPS研究/CAD设计/CAM加工/CMM测量"。免责声明:论坛严禁发布色情反动言论及有关违反国家法律法规内容!情节严重者提供其IP,并配合相关部门进行严厉查处,若內容有涉及侵权,请立即联系我们QQ:44671734。注:此论坛须管理员验证方可发帖。
沪ICP备06057009号-2
更多