VBA's inside projectwise

We have a project that we are utilizing some VBA's on, these applications work fine outside of the projectwise environment, however, when we try to run these applications inside of projectwise we get errors where the VBA's are still looking to files in locations outside of projectwise.  Would these VBA's need to have their specific code changed?  Is there a simpler way??  Any suggestions would be appreciated.  I do not know how to code VBA personally, but have someone in house that knows this language.

Parents
  • If your code tries to read the VBA project to get a project file path, it will fail often. The VBA project stores a path internally as opposed to reading it on the fly. We have had similar issues from DOT workspaces that tried to get the folder where the VBA project was stored to locate the VBA's INI files. These had to be re-written to use configuration variables because they always saw the DOT's server path and not the current path to the VBA project. If you use a config variable, the managed PW workspace should redefine the variable. If you are not using a managed workspace, then once a variable is setup and the code written to read it based upon the variable, you should be good to go.

    Charles (Chuck) Rheault
    CADD Manager

    MDOT State Highway Administration

    • MicroStation user since IGDS, InRoads user since TDP.
    • AutoCAD, Land Desktop and Civil 3D, off and on since 1996
Reply
  • If your code tries to read the VBA project to get a project file path, it will fail often. The VBA project stores a path internally as opposed to reading it on the fly. We have had similar issues from DOT workspaces that tried to get the folder where the VBA project was stored to locate the VBA's INI files. These had to be re-written to use configuration variables because they always saw the DOT's server path and not the current path to the VBA project. If you use a config variable, the managed PW workspace should redefine the variable. If you are not using a managed workspace, then once a variable is setup and the code written to read it based upon the variable, you should be good to go.

    Charles (Chuck) Rheault
    CADD Manager

    MDOT State Highway Administration

    • MicroStation user since IGDS, InRoads user since TDP.
    • AutoCAD, Land Desktop and Civil 3D, off and on since 1996
Children
No Data