TheSwamp
Code Red => VB(A) => Topic started by: Bryco on January 03, 2007, 12:50:44 AM
-
I messed with forcing cad to use the current folder as the starting place for the xattach command. Below is the key I found, and this key updates as you use the command.
'HKEY_CURRENT_USER\Software\Autodesk\AutoCAD\R16.2\ACAD-4001:409\Profiles\<<Unnamed Profile>>\Dialogs\XattachFileDialog
With a registry module from the old Cadvault I can successfully change this key, but unfortunately it doesn't work, has anyone figured out how to do this?
-
What is it exactly that you're trying to accomplish? You want the current folder to always be the default folder when using XATTACH?
-
Yes, the start folder =thisdrawing.path.
I do this for creating pdfs and its nice so I thought I'ld keep going but this one is playing up.
-
Try setting REMEMBERFOLDERS to 1.
Controls the default path displayed in standard file selection dialog boxes.
0 Restores the behavior of AutoCAD 2000 and previous releases. When you start the program by double-clicking a shortcut icon, if a Start In path is specified in the icon properties, that path is used as the default for all standard file selection dialog boxes.
1 Uses standard Microsoft behavior. When you first start the program after installation, the default path in each standard file selection dialog box is My Documents. When you open or save a file to another folder, that folder is remembered for future file selection. The Start In folder specified for the shortcut icon is not used)
-
Thanks Matt but I would much rather have the start path from option 0 than My Documents.
But I'll look into it, perhaps it has to be set for the key change to work.
-
Bryco,
Take a look at this thread:
http://www.theswamp.org/index.php?topic=5029.msg60820#msg60820
It's not VBA but may give you some ideas.
Ron
-
Thanks Matt but I would much rather have the start path from option 0 than My Documents.
But I'll look into it, perhaps it has to be set for the key change to work.
From option 0...
Should have been 'From option 1' instead. Sorry.
When you open or save a file to another folder, that folder is remembered for future file selection.
That means if you open a drawing in C:\Temp\Work, when you run XATTACH, the default folder will be C:\Temp\Work. There's no need for code.
-
Thanks Matt but I would much rather have the start path from option 0 than My Documents.
But I'll look into it, perhaps it has to be set for the key change to work.
From option 0...
When you open or save a file to another folder, that folder is remembered for future file selection.
That means if you open a drawing in C:\Temp\Work, when you run XATTACH, the default folder will be C:\Temp\Work. There's no need for code.
Matt,
This does not work in AutoCAD 2005.
Ron
-
Matt Good tip, so far setting REMEMBERFOLDERS to 1 allows the code to work. Thanks.
Ron that link is handy thanks.
-
If you set REMEMBERFOLDERS = 1 in 2005 it doesn't "remember" the drawing's path as the default folder to xattach, insert, etc...?? It worked for me when I had 2005.
-
I take that back...it works as advertised, but the above code makes the start folder the same as the drawing opened which IMO is more efficient. More time actually attaching files rather than browsing all over the network looking for them.
Ron