Bentley Communities
Bentley Communities
  • Site
  • User
  • Site
  • Search
  • User
ProjectWise
  • Product Communities
ProjectWise
ProjectWise Design Integration Forum Environment Attribute to display Document Name
    • Sign In

    • State Verified Answer
    • +1 person also asked this people also asked this
    • Replies 11 replies
    • Answers 1 answer
    • Subscribers 62 subscribers
    • Views 438 views
    • Users 0 members are here

    Environment Attribute to display Document Name

    Lonnie Frater
    Offline Lonnie Frater 5 months ago

    Hi All,

    How can I create an attribute to display the "document name" as opposed to file name? There is no system variable, so how is it addressed.

    Thanks

    • Sign in to reply
    • Cancel

    Top Replies

    • Dave Cumming
      Online Dave Cumming Thu, Mar 30 2023 11:01 PM in reply to Lonnie Frater +1 verified
      Hi Lonnie, If you are just looking to bind the Document Name property to a tag/field in a file for attribute exchange with a Title Block (or with a Word or Excel file), you don't need to pass it to an…
    • Dave Cumming
      Online Dave Cumming Fri, Jun 23 2023 2:34 PM in reply to Lonnie Frater +1 suggested
      Hi Lonnie, Setting up the Attribute Exchange as I described in my March 30th post will still get you the result that it sounds like you are seeking - the ProjectWise Document Name is pushed to and displayed…
    • Dave Cumming
      0 Online Dave Cumming Fri, Jun 9 2023 4:02 PM in reply to JeremieDL

       JeremieDL  Lonnie Frater 

      You would need to do this with a SQL SELECT statement. There are a couple ways to accomplish it, but doing so might be something that you regret doing in the future. Doing so would result in a static value that would not change if the Document Name changed ... Unless you also write some sort of custom automation, such as scheduling a PowerShell script to find and update the attribute value when it is out of synch. 

      I am curious though... What is the use case for having the Document Name on the Attributes tab?

      • Cancel
      • Vote Up 0 Vote Down
      • Sign in to reply
      • Verify Answer
      • Cancel
    • JeremieDL
      0 Offline JeremieDL Wed, Jun 21 2023 8:47 AM in reply to Dave Cumming

      In my case is to have the attribute driven by the file name instead of having the file name driven by the attributes... I manage to find what I was looking for (Environnement variable to get the file name or part of it - ProjectWise Design Integration Forum - ProjectWise - Bentley Communities) I will use this to populate our title block.  We do this because the file name need to be partialy in the titleblock.  I know that to update the attribute of the file name we need to change or modifiy any attribute but so far it's working fine for everyone because we change the file name when we add a revision in the title block or if nothing is nneed to realy change, just add a space bar somewhere and projectwise will re-read the title name and upgrade the attribute.

      What problems do you think we will face later on with this?

      • Cancel
      • Vote Up 0 Vote Down
      • Sign in to reply
      • Verify Answer
      • Cancel
    • Lonnie Frater
      0 Offline Lonnie Frater Wed, Jun 21 2023 9:05 AM in reply to JeremieDL

      Sorry for being late to the party, I have been away.

      Our case was this, we have a structured file naming convention internally and traditionally the document name would follow the file name, so yes for us we could reflect the file name attribute to the title block. However, when we bring in a drawing from a 3rd party source and they wish to keep their own naming convention, using the document name attribute gives us the flexibility to accommodate the 3rd party's convention, whilst retaining our file naming convention and not having to break it.

      So, in short, document name can follow the file name for our work or can follow the client's convention for their work. and both are reflected to the title block via same attribute/tag.

      • Cancel
      • Vote Up 0 Vote Down
      • Sign in to reply
      • Verify Answer
      • Cancel
    • Dave Cumming
      0 Online Dave Cumming Fri, Jun 23 2023 2:06 PM in reply to JeremieDL

      Hi JeremieDL 

      As Sean Duphily mentioned in the answer that he posted (see the link you provided in previous post) there are better ways to do this with MicroStation. Because you are focused on part of the actual filename and not on metadata that can only be sourced from ProjectWise, then targeting the property of the file itself is more reliable and more efficient than pulling the filename into an environment attribute and relying on the database to ensure it is valid. Especially if doing so involves triggering it (manually or otherwise). 

      Check this out for some ideas: [V8i] Pen Table Text Substitutions - Printing and Plotting Forum - Printing and Plotting - Bentley Communities

      Something that stands out as an "expensive" database operation with the method you are using is that I think the attribute that you have set up to accommodate your partial filename is triggered (for update) when any other attribute value changes. I'd consider setting up another dedicated attribute - perhaps one that uses a checkbox - to be the specific attribute used to trigger the update. Not only will that help prevent eventual strain on the database, but it doesn't involve adding a "space" or any other random character to the value of some other attribute, which to be totally honest is just sloppy. 

      Anyway, there are several different ways to approach the outcome that you desire. But some are definitely better than others. This is a good place to have a conversation about why that is. 

      • Cancel
      • Vote Up 0 Vote Down
      • Sign in to reply
      • Verify Answer
      • Cancel
    • Dave Cumming
      0 Online Dave Cumming Fri, Jun 23 2023 2:34 PM in reply to Lonnie Frater

      Hi Lonnie, 

      Setting up the Attribute Exchange as I described in my March 30th post will still get you the result that it sounds like you are seeking - the ProjectWise Document Name is pushed to and displayed in the drawing's title block - and you do not need to pull the Document Name into an environment attribute in order to accomplish that.

      Incidentally, you could also do the same with the File Name, but I understand why you prefer to use the Document Name. I only mention it here to avoid any confusion by pointing out that there is a distinction between Document Name and File Name properties, for those who may not already realize that.

      You said that (in addition to) appearing in the drawing's title block, you also want the Document Name to be displayed on the Attributes Tab of the Document Properties interface. I'd point out that the Document Name does appear in the header of the interface, above the tabs. But if you need it to also appear in the field with the other environment attributes, then you would use a SQL Select Statement to (optionally) define its Default Value and/or its Update Value. For Example: SELECT RIGHT('$DOCUMENT.FULLNAME$', CHARINDEX('\',REVERSE('$DOCUMENT.FULLNAME$'))-1)

      • Cancel
      • Vote Up +1 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