VBA
Discuss AutoCAD ActiveX and VBA (Visual Basic for Applications) questions here.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

The location of the Files Location Database must be the first item in...

6 REPLIES 6
SOLVED
Reply
Message 1 of 7
tart5425
567 Views, 6 Replies

The location of the Files Location Database must be the first item in...

I have AutoCAD 2012. When I try to run a program that requires Visual Basic, I'm getting a message that states the following:

"The location of the Files Location Database must be the first item in "\SentinelVBA" File Path in Preference Menu. It is advisable to correct before proceeding."

SentinelVBA is a folder which houses an Access database called "SentinelDB.mdb".

When I go to Preferences, Files, Support file Search Path, it reads "C:\Documents and Settings\Administrator\my documents\pacs\pacsacadcustom2005\sentinelvba". It is the first item in the list. When I change "sentinelvba" in that path to "SentinelVBA" (notice the caps) the program works properly, until I close AutoCAD and restart. Then the lower case letters are back and it does not work properly until I change it again.

Any help is greatly appreciated.

6 REPLIES 6
Message 2 of 7
Hallex
in reply to: tart5425

My guess is to store database file name in your program

using Const directive like this:

Const mdbfile as String= "SentinelDB.mdb"

then i your sub routine you can load it directly

something like this:

 

Public MySub()

 

mdbfile = MyFolderName & "\" & mdbfile

 

End Sub

 

or without backslash if you've already added it to the folder path before

 

_____________________________________
C6309D9E0751D165D0934D0621DFF27919
Message 3 of 7
Alfred.NESWADBA
in reply to: tart5425

Hi,

 

>> Then the lower case letters are back and it does not work properly until I change it again.

Have you tried to rename the folder on your harddisk to lower characters?

 

>> The location of the Files Location Database must be the first item in "\SentinelVBA"

Is this a 3rd-party application for AutoCAD that's suggesting you to set this as first path? Or who told you that this is the rule for getting it to work?

 

- alfred -

------------------------------------------------------------------------------------
Alfred NESWADBA
Ingenieur Studio HOLLAUS ... www.hollaus.at ... blog.hollaus.at ... CDay 2024
------------------------------------------------------------------------------------
(not an Autodesk consultant)
Message 4 of 7
tart5425
in reply to: Alfred.NESWADBA

It doesn't seem to matter if the folder name is upper case, lower case or a combination. In Autocad 2012 I have to change the Support File Search Path in Options/Files to "C:\Documents and Settings\Administrator\my documents\pacs\pacsacadcustom2012\SentinelVBA" and not "sentinelvba". It doesn't matter if it's first or last in the Support File Search Path, so I don't know if the message "The location of the Files Location Database must be the first item in "\SentinelVBA" File Path in Preference Menu. It is advisable to correct before proceeding." is referring to that. By the way, that is a message that appears in Autocad.

This was some custom programming that someone did years ago. I don't know too much about how it works but I checked the cui in 2012 and it shows in the macro field "^C^C-vbarun main.MakeLegend". It seems to be running that macro in Visual Basic file "acad.dvb", which is in folder called "C:\Documents and Settings\Administrator\my documents\pacs\pacsacadcustom2005\SentinelVBA".

It works fine with Autocad 2007. The "Support File Search Path" will stay "SentinelVBA". But in 2012, it will always change back to lower case when it’s first opened, and it won't work until I change it.

Message 5 of 7
Alfred.NESWADBA
in reply to: tart5425

Hi,

 

if you can modify the VBA-file then check where the errormessage comes from and verify there how it tries (and fails) to access the MDB-file. If it compares foldernames then try to convert the verification-syntax to convert the foldernames first to upper-case and then do the comparision.

 

Second question: are you running 2012 on a 64bit os or 32bit. If 64bit you may have some troubles accessing the MDB-file as of missing drivers for ODBC-MDB access (at least there is >>>one way<<<, but not sure if the guy in 2005 has programmed it in that way).

 

- alfred -

------------------------------------------------------------------------------------
Alfred NESWADBA
Ingenieur Studio HOLLAUS ... www.hollaus.at ... blog.hollaus.at ... CDay 2024
------------------------------------------------------------------------------------
(not an Autodesk consultant)
Message 6 of 7
dgorsman
in reply to: tart5425

This sounds suspicously like the original programmer is doing a literal string comparison on the paths, without considering character case.  If the programmer isn't available, you might be able to hire somebody to check that other general updates/diagnostics.  If you don't have access to the source code... you're pretty much hosed.

----------------------------------
If you are going to fly by the seat of your pants, expect friction burns.
"I don't know" is the beginning of knowledge, not the end.


Message 7 of 7
tart5425
in reply to: Alfred.NESWADBA

Haven't had time to do anything with this until now but, problem solved.

I searched the code and found this:

DBLocation = ParseFromList("SentinelVBA", preferences.Files.SupportPath, ";")

I changed SentinelVBA to sentinelvba and that did the trick.

Thanks Alfred.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost