Author Topic: Setting initial open directory to folder with given name  (Read 5336 times)

0 Members and 1 Guest are viewing this topic.

ELOQUINTET

  • Guest
Re: Setting initial open directory to folder with given name
« Reply #15 on: March 22, 2007, 11:59:02 AM »
Ughh Keith  :cry: It sort of worked. Here's the deal when I tried it it opened to a folder called Drawings but when I expanded she also had a drawings folder on her C:. I looked inside it and there was one file so I moved it to the folder on her E: and deleted the drawings folder from her C:. Now when I run the routine I get this message:

Bad file name or number

What do I need to fix this?

Keith™

  • Villiage Idiot
  • Seagull
  • Posts: 16899
  • Superior Stupidity at its best
Re: Setting initial open directory to folder with given name
« Reply #16 on: March 22, 2007, 01:33:50 PM »
a simple fix in the FindPath function add an error handler ..

Code: [Select]
On Error Resume Next

Well, not really an error handler .. but it does the same ...
Put it right after the Dims in the function
Proud provider of opinion and arrogance since November 22, 2003 at 09:35:31 am
CadJockey Militia Field Marshal

Find me on https://parler.com @kblackie

ELOQUINTET

  • Guest
Re: Setting initial open directory to folder with given name
« Reply #17 on: March 22, 2007, 02:35:28 PM »
yeeeeessss thank you thank you thank you Keith it works now. I have a question to ask about VBA in general now. I have several file which load from acad.lsp for all of my users, this being one of them. Everytime I need to make a change I have to save it as something else which isn't bas as I am still in the very early learning stages. Once I get it working however I want to be able to Save it as the original without having to have everyone exit Autocad. Is this possible or am I just going about loading things wrong?

Keith™

  • Villiage Idiot
  • Seagull
  • Posts: 16899
  • Superior Stupidity at its best
Re: Setting initial open directory to folder with given name
« Reply #18 on: March 22, 2007, 03:06:09 PM »
If the dvb is loaded you cannot overwrite it while they are using it (with lisp you can)...
You could create a lisp in the acad.lsp file that copies the file to the local hard drive, then whenever you open up a drawing, it copies the dvb over so they always have the newest file. You will need to make the lisp unload the dvb and reload it.
Proud provider of opinion and arrogance since November 22, 2003 at 09:35:31 am
CadJockey Militia Field Marshal

Find me on https://parler.com @kblackie

ELOQUINTET

  • Guest
Re: Setting initial open directory to folder with given name
« Reply #19 on: March 23, 2007, 08:28:43 AM »
hmmm interesting thought. at this point i don't have and am not modifying vba stuff enough to warrant this but maybe eventually thanks again keith for your help with this