VBA with dgn's in ProjectWise

(Using Micorstation v8i)  Here is some simple code I could use to get a dgn that is in ProjectWise: 

Set myFile = OpenDesignFileForProgram("PW_WORKDIR:dms00251\46977-B-RD-DS-dck.dgn")

The problem is I have to hard code the path of the file.  I know Microstation uses the MSDIR configuration variable to search the current file system, so i don't know if there's a way to incorporate that?.....basically, what's an easy way of accessing files in ProjectWise with VBA instead of accessing the file that's in the working directory (i.e. my C:/ drive)?

 

Thanks,

dksaluki

Parents
  • dksaluki: I know Microstation uses the MSDIR configuration variable

    That's true in a normal user configuration, but isn't true with ProjectWise. PW is using its own variables and folders …

    • PW_WORKDIR: PW's top-level working folder
    • dms00251: one of many sub-folders having names invented by PW

    You can evaluate PW_WORKDIR using VBA (ActiveWorkspace.ExpandConfigurationVariable ("PW_WORKDIR")), but you become stuck with the sub-folder name.

    Regards, Jon Summers
    LA Solutions

     
    Regards, Jon Summers
    LA Solutions

Reply
  • dksaluki: I know Microstation uses the MSDIR configuration variable

    That's true in a normal user configuration, but isn't true with ProjectWise. PW is using its own variables and folders …

    • PW_WORKDIR: PW's top-level working folder
    • dms00251: one of many sub-folders having names invented by PW

    You can evaluate PW_WORKDIR using VBA (ActiveWorkspace.ExpandConfigurationVariable ("PW_WORKDIR")), but you become stuck with the sub-folder name.

    Regards, Jon Summers
    LA Solutions

     
    Regards, Jon Summers
    LA Solutions

Children
No Data