|
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 |
|