Bentley Communities
Bentley Communities
  • Site
  • User
  • Site
  • Search
  • User
ProjectWise
  • Product Communities
ProjectWise
ProjectWise Design Integration Forum Environnement variable to get the file name or part of it
    • Sign In

    • State Verified Answer
    • Replies 4 replies
    • Subscribers 59 subscribers
    • Views 183 views
    • Users 0 members are here
    • file name
    • environnement
    • ProjectWise Administrator

    Environnement variable to get the file name or part of it

    JeremieDL
    Offline JeremieDL 3 months ago

    Hi, I'm trying to get the file file name and put them in a variable to display in the interface tab.  

    But my real goal is to get the begining part of the file name, 9 first characters to be exact.  Is this possible?

    Because in my project file name need to include the revision of the drawing but we need to remove this revision in the title bloc.

    So what I want is that my file name be like 45612-S01-RA.dgn but my titleblock display only the first 9 characters: 45612-S01

    So my thining was to get the file name and put it in a variable that only contain 9 caracters so that the rest would get discarded but I can't seem to find a way to have a variable that display the file name.

    Anybody can help here?

    • Sign in to reply
    • Cancel

    Top Replies

    • Sean Duphily
      Offline Sean Duphily Fri, Jun 9 2023 9:18 AM +1 verified
      Since you posted this in the ProjectWise forum, I'm assuming you are trying to set an Attribute to this value. If so, try: SELECT SUBSTRING(RIGHT('$DOCUMENT.FULLNAME$', CHARINDEX('\',REVERSE('$DOCUMENT…
    • JeremieDL
      Offline JeremieDL Fri, Jun 9 2023 9:20 AM in reply to Sean Duphily +1 verified
      Thanks I will try this right away! Where do you get the information on how to do this? I mean where did you find this?

    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