• Industries
  • Products
  • Buy
  • Services & Support
  • Communities
  • Discussion Groups

    Visual Basic Customization

    Reply
    Contributor
    Posts: 15
    Registered: ‎04-24-2003
    Accepted Solution

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

    141 Views, 6 Replies
    09-23-2012 08:57 AM

    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.

    Please use plain text.
    *Expert Elite*
    Hallex
    Posts: 1,338
    Registered: ‎10-08-2008

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

    09-24-2012 02:24 AM 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
    Please use plain text.
    *Expert Elite*
    Posts: 6,469
    Registered: ‎06-29-2007

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

    09-24-2012 03:41 AM 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
    -------------------------------------------------------------------------
    Please use plain text.
    Contributor
    Posts: 15
    Registered: ‎04-24-2003

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

    09-24-2012 06:37 PM 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.

    Please use plain text.
    *Expert Elite*
    Posts: 6,469
    Registered: ‎06-29-2007

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

    09-24-2012 10:15 PM 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
    -------------------------------------------------------------------------
    Please use plain text.
    *Expert Elite*
    dgorsman
    Posts: 3,297
    Registered: ‎10-12-2006

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

    09-25-2012 11:22 AM 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.
    Adopt. Adapt. Overcome. Or be overcome.


    Please use plain text.
    Contributor
    Posts: 15
    Registered: ‎04-24-2003

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

    09-29-2012 02:09 PM 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.

    Please use plain text.