[CONNECT Update 14 VBA] Issue with CreateDesignFile Method

Hi, Im relatively new to Microstation VBA and this is my first time posting here.   My company recently upgraded from Microstation V8i (Select Series 4) to Microstation Connect Edition (Update 14).  Code that includes the CreateDesignFile Method will run in V8i but returns a "File not found" error message in Microstation Connect.  Any ideas as to what could be causing this error?

Regards

Tim

CreateDesignFile "Seed3d", "C:\Microstation Files\Test", False

Parents Reply Children
  • Hi Jan, My workspace and MS_SEEDFILES configuration variables are set up by our survey department.  The config variable is just a folder path with two seed files in the folder "seedsishenlocal2d.dgn" and "seedsishenlocal3d.dgn", if I use "seedsishenlocal3d.dgn" in the CreateDesignFile Method it works, although I feel this is also bad practice as it is using a specific file name on the network. 

    Is there still something missing or incorrect in my setup, like I said before I could just use "Seed3d" when running the code with V8i.

    Regards

    Tim  

  • My workspace and MS_SEEDFILES configuration variables are set up by our survey department.

    If there is an application, used in company, the workflow has to support it and to be configured properly.

    Fortunately there are more ways (places) how configuration variable can be defined. Not only on system level, but e.g. using own application cfg file, or, in the worst case, in .ucf file.

    although I feel this is also bad practice as it is using a specific file name on the network. 

    There is no difference whether files are on network or on local drive.

    Seed file is important when pre-configured to contain specific settings, even when with increasing usage of dgnlibs a number of settings in seed file is decreasing.

    So based on why the new file is created, a proper seed file should be used. And when it's not important, probably the best is to use some from seed files delivered with MicroStation itself.

    Is there still something missing or incorrect in my setup, like I said before I could just use "Seed3d" when running the code with V8i.

    Compare used workspace (or generate msdebug files for V8i and CE) to find what is set differently.

    Regards,

      Jan

  • Thank you for the help Jan.  I checked some older files, prior to Connect our V8i projects were setup with a seed file called "Seed3d" that they put on our c drive's with the Config variable containing the local path.  Now they use "seedsishenlocal3d.dgn" on the network drive. 

  • Our V8i projects were setup with a seed file called "Seed3d" that they put on our c drive's with the Config variable containing the local path

    There are a number of MicroStation configuration variables concerning seed files.

    The two that are relevant to you are:

    • MS_SEEDFILES Search path(s) for all seed files
    • MS_DESIGNSEED Default seed file

    In a configuration file your CAD admin can write something like this:

    MS_SEEDFILES  = //NetworkServer/Common Files/MicroStation/Seed Files/
    MS_DESIGNSEED = seedsishenlocal3d.dgn 

    You can write VBA code to get those configuration variable values...

    Dim seedFileFolder As String
    seedFileFolder = ActiveWorkspace.ConfigurationVariableValue("MS_SEEDFILES")
    Dim defaultSeedFile As String
    defaultSeedFile = ActiveWorkspace.ConfigurationVariableValue("MS_DESIGNSEED")
    Dim seedFileName As String
    seedFileName = seedFileFolder & seedFileName

    Now you don't have to hard-wire your seed file name or location into your code.

     
    Regards, Jon Summers
    LA Solutions