几何尺寸与公差论坛

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

【转帖】show file name

[复制链接]
发表于 2009-4-13 14:20:14 | 显示全部楼层 |阅读模式
show file name
how to show the active doc name?
thx, chris
solidworks 2007 (office pro.) sp5.0
testing solidworks 2009 (pro) sp0.0
dell precision t3400
2 cpu (8500) 3.16 ghz, 3.25 gb of ram
window xp pro sp2
nvidia fx 570 6.14.11.6262
for your version i believe you want
(if someone more experinced could confirm this)
sldworks 2007 type library. (make sure you have it checked in references)
sldworks.getopenedfileinfo ( filename, options)
output:
(bstr) filename
name of the last-requested file to open
note: the last-requested file to open can be in the process of opening or can be finished opening.
hey chris,
you can use modeldoc2::gettitle to get the active doc name (including its extension) and you can also use
modeldoc2::getpathname
to get the full path name for this document, including the file name
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
you have to be careful with the modeldoc2::gettitle. it may or may not get the file extension. if you have your windows folder options to "hide extensions for known file types" it will not return the extension.
wayne matus
texas engineering systems
gettitle when used with drawings also will have the sheet name included and wont include the extension, even if "hide extensions for known file types" is disabled.
"349901363 - sheet 1" for the first sheet of drawing 349901363.slddrw
drc inc.
minneapolis, mn
.designreadycontrols.com
sw2007 sp5.0
core2 quad
3gb ram
xp pro sp2
ati firegl v3600
quick
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2024-12-22 23:18 , Processed in 0.034563 second(s), 19 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2023 Discuz! Team.

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