Bentley Communities
Bentley Communities
  • Site
  • User
  • Site
  • Search
  • User
ProjectWise
  • Product Communities
ProjectWise
ProjectWise Design Integration Forum [CONNECT] Harvest Active PW Path
    • Sign In

    • State Suggested Answer
    • +1 person also asked this people also asked this
    • Replies 9 replies
    • Answers 1 answer
    • Subscribers 63 subscribers
    • Views 1389 views
    • Users 0 members are here
    • connect
    • File
    • logical path
    • path
    • Configuration Variables

    [CONNECT] Harvest Active PW Path

    Jon Summers
    Offline Jon Summers over 2 years ago

    MicroStation has many configuration variables that an Admin uses to define the operating parameters of a CAD session.  Some variables are defined in configuration files, some variables are dynamic and change during a MicroStation session as a user opens and closes DGN files.

    An example of a MicroStation dynamic variable is _dgnfile, which contains the file path of the active DGN file. You can see its value in MicroStation using key-in EXPAND ECHO $(_dgnfile).  The path is displayed in MicroStation's Message Center.

    Consider this question from the MicroStation Forum by mwlong: We need the PW path. If a subconsultant looks at a pdf file and would like to reference that file to one of their files they will have issues locating the file on PW. I've run into this many times. Even looking at our own files. If we have the PW path displayed it aids others in locating the files so you don't need to track down the person who knows where the files are located.

    Is there an analogous PW configuration variable that contains the PW logical path to the active document? 

    • Sign in to reply
    • Cancel

    Top Replies

    • Kevin van Haaren
      Offline Kevin van Haaren Thu, Oct 7 2021 10:54 AM +1
      The original question was for putting the path on a PDF. I know of 2 ways to accomplish this. The question here is how to get the path inside of MicroStation itself, I know of zero ways to accomplish this…
    • Chris Andrew
      0 Offline Chris Andrew Thu, Oct 7 2021 1:59 AM

      Morning Jon.

      I thinks the variable your after is $(_DGNDIR).

      I would define a new variable in the csb/cfg that you can then report. Like below.

      MS_ACTIVE_FILE_FOLDER=$(_DGNDIR)

      Regards

      Chris


      AECOM Roads UK&I Digital Engineering, Design & Solutions Lead | Sector Information Management Lead

      Associate Director – Digital

      OpenRoads Designer 10.12 | MicroStation 2023 | ProjectWise CE 10.3.4 | ContextCapture | ProjectWise PowerShell 2023 | ProjectWise WSG API | Generative Components | OpenBridge Designer 10.12

      Civil 3D 2023 | Dynamo | Navisworks Manage

      PowerShell | Visual Studio | Office 365 | Power Platform | Teams | SharePoint | Visio

      Speckle | BIMVision | Revizto | Solibri

      • Cancel
      • Vote Up 0 Vote Down
      • Sign in to reply
      • Verify Answer
      • Cancel
    • Jon Summers
      0 Offline Jon Summers Thu, Oct 7 2021 4:29 AM in reply to Chris Andrew
      Chris Andrew said:
      I thinks the variable your after is $(_DGNDIR)

      Thanks, but that's not the answer.  Perhaps I wasn't clear in my question.

      Its name indicates that _DGNDIR obtains a path, not a file.  _dgnfile obtains the full file name.  I cited _dgnfile as an example that works in MicroStation whether or not ProjectWise (PW) is connected.

      What I'm after is the PW logical path.  That is, not the path to the DGN file that PW copies to your local C: drive when you check-out a document, but the logical organisation of folders and files in a project.

      File Open

       
      Regards, Jon Summers
      LA Solutions

      • Cancel
      • Vote Up 0 Vote Down
      • Sign in to reply
      • Verify Answer
      • Cancel
    • Chris Andrew
      0 Offline Chris Andrew Thu, Oct 7 2021 4:52 AM in reply to Jon Summers

      Ok. Closest i can get is using $(PW_WORKDIR) but that doesn't include the dms folder

      Regards

      Chris


      AECOM Roads UK&I Digital Engineering, Design & Solutions Lead | Sector Information Management Lead

      Associate Director – Digital

      OpenRoads Designer 10.12 | MicroStation 2023 | ProjectWise CE 10.3.4 | ContextCapture | ProjectWise PowerShell 2023 | ProjectWise WSG API | Generative Components | OpenBridge Designer 10.12

      Civil 3D 2023 | Dynamo | Navisworks Manage

      PowerShell | Visual Studio | Office 365 | Power Platform | Teams | SharePoint | Visio

      Speckle | BIMVision | Revizto | Solibri

      • Cancel
      • Vote Up 0 Vote Down
      • Sign in to reply
      • Verify Answer
      • Cancel
    • Jon Summers
      0 Offline Jon Summers Thu, Oct 7 2021 5:30 AM in reply to Chris Andrew
      Chris Andrew said:
      Closest i can get is using $(PW_WORKDIR) but that doesn't include the dms folder

      Thanks, but not close enough.  Consider this comment from the MicroStation Forum by mwlong: We need the PW path. If a subconsultant looks at a pdf file and would like to reference that file to one of their files they will have issues locating the file on PW. I've run into this many times. Even looking at our own files. If we have the PW path displayed it aids others in locating the files so you don't need to track down the person who knows where the files are located.

       
      Regards, Jon Summers
      LA Solutions

      • Cancel
      • Vote Up 0 Vote Down
      • Sign in to reply
      • Verify Answer
      • Cancel
    • Chris Andrew
      0 Offline Chris Andrew Thu, Oct 7 2021 5:56 AM in reply to Jon Summers

      Could use Item Types and Expressions.

      Regards

      Chris


      AECOM Roads UK&I Digital Engineering, Design & Solutions Lead | Sector Information Management Lead

      Associate Director – Digital

      OpenRoads Designer 10.12 | MicroStation 2023 | ProjectWise CE 10.3.4 | ContextCapture | ProjectWise PowerShell 2023 | ProjectWise WSG API | Generative Components | OpenBridge Designer 10.12

      Civil 3D 2023 | Dynamo | Navisworks Manage

      PowerShell | Visual Studio | Office 365 | Power Platform | Teams | SharePoint | Visio

      Speckle | BIMVision | Revizto | Solibri

      • Cancel
      • Vote Up 0 Vote Down
      • Sign in to reply
      • Verify Answer
      • Reject Answer
      • Cancel
    >

    Communities
    • Home
    • Getting Started
    • Community Central
    • Products
    • Support
    • Secure File Upload
    • Feedback
    Support and Services
    • Home
    • Product Support
    • Downloads
    • Subscription Services Portal
    Training and Learning
    • Home
    • About Bentley Institute
    • My Learning History
    • Reference Books
    Social Media
    •    LinkedIn
    •    Facebook
    •    Twitter
    •    YouTube
    •    RSS Feed
    •    Email

    © 2023 Bentley Systems, Incorporated  |  Contact Us  |  Privacy |  Terms of Use  |  Cookies