查看单个帖子
旧 2009-04-13, 09:43 AM   #1
yang686526
高级会员
 
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
yang686526 向着好的方向发展
默认 【转帖】check if part name exists

check if part name exists
hi everyone,
i want to save a part with a new name so i use the saveas function call.
is there a way to check in the directory where i want to save my new part, that the name that i intent to use does not already exist?
cheers,
--stav.
in this world i am nobody...
and nobody is perfect !!!
---------
solidworks office 2008 sp4.0
dell precision pws390
nvidia quadro fx 3450/4000 sdi
what language are you using? .net does this automatically and so does vba if you use the standard system file dialogs. if not you need to use the .net file.exists() function to check manually, and in vba use the microsoft.scripting class
answer hi luke,
it was for vba.
i used the dir function of vba and i solved the issue.
thanks for the reply though
--stav.
in this world i am nobody...
and nobody is perfect !!!
---------
solidworks office 2008 sp4.0
dell precision pws390
nvidia quadro fx 3450/4000 sdi
quick
yang686526离线中   回复时引用此帖
GDT自动化论坛(仅游客可见)