Author Topic: xattach and registry  (Read 4019 times)

0 Members and 1 Guest are viewing this topic.

Bryco

  • Water Moccasin
  • Posts: 1883
xattach and registry
« 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?

Guest

  • Guest
Re: xattach and registry
« Reply #1 on: January 03, 2007, 08:23:25 AM »
What is it exactly that you're trying to accomplish?  You want the current folder to always be the default folder when using XATTACH?

Bryco

  • Water Moccasin
  • Posts: 1883
Re: xattach and registry
« Reply #2 on: January 03, 2007, 09:48:13 AM »
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.

Guest

  • Guest
Re: xattach and registry
« Reply #3 on: January 03, 2007, 10:09:28 AM »
Try setting REMEMBERFOLDERS to 1.

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

Bryco

  • Water Moccasin
  • Posts: 1883
Re: xattach and registry
« Reply #4 on: January 03, 2007, 10:28:23 AM »
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.

ronjonp

  • Needs a day job
  • Posts: 7527
Re: xattach and registry
« Reply #5 on: January 03, 2007, 10:31:24 AM »
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

Windows 11 x64 - AutoCAD /C3D 2023

Custom Build PC

Guest

  • Guest
Re: xattach and registry
« Reply #6 on: January 03, 2007, 10:38:29 AM »
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.
Quote
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.
« Last Edit: January 03, 2007, 10:49:15 AM by Matt W »

ronjonp

  • Needs a day job
  • Posts: 7527
Re: xattach and registry
« Reply #7 on: January 03, 2007, 10:41:00 AM »
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...
Quote
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

Windows 11 x64 - AutoCAD /C3D 2023

Custom Build PC

Bryco

  • Water Moccasin
  • Posts: 1883
Re: xattach and registry
« Reply #8 on: January 03, 2007, 10:51:22 AM »
Matt Good tip, so far setting REMEMBERFOLDERS  to 1 allows the code to work. Thanks.
Ron that link is handy  thanks.

Guest

  • Guest
Re: xattach and registry
« Reply #9 on: January 03, 2007, 10:54:06 AM »
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.

ronjonp

  • Needs a day job
  • Posts: 7527
Re: xattach and registry
« Reply #10 on: January 03, 2007, 11:04:01 AM »
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

Windows 11 x64 - AutoCAD /C3D 2023

Custom Build PC