[MS CE up15] Trying to store a configuration variable in the attachement filename

I have tried this to be able to make my reference files portable

https://docs.bentley.com/LiveContent/web/MicroStation%20Help-v19/en/GUID-6CD8765F-908C-68F9-5352-73435874C285.html

But the variable seems to be resolved and not stored in the attachement filename

Am i missing something ?

Many thanks

Parents
  • Do you have MS_RFDIR defined in your workspace?

    Microstation CONNECT 10.17.00.209

    ORD CONNECT 2021 R1 10.10.1.3

    Microstation v8i SS 10 08.11.09.919

    Power InRoads v8i 08.11.09.615

    ORD CONNECT 2021 R1 10.10.1.3

    ProjectWise 10.0.3.453

  • Do you have MS_RFDIR defined in your workspace?
    No, But I do not see the connection with the question

    MicroStation always searchs the folders specified by MS_RFDIR.  It is directly connected to your question.

    MS_RFDIR specifies one or more folders that MicroStation will search...

    MS_RFDIR = V:/cad/folders/references/
    MS_RFDIR > V:/maps/my-maps/

    MicroStation looks for reference files in the references and my-maps folders.

    Another way to specify a configuration variable in the attachment properties uses this syntax...

    REMY_REF_PATH:file-name

    MicroStation will search the folder specified by REMY_REF_PATH for the specified file.

     
    Regards, Jon Summers
    LA Solutions

  • Yes,

    I am trying to achieve what Jon suggests here

    Another way to specify a configuration variable in the attachment properties uses this syntax...

    REMY_REF_PATH:file-name

    MicroStation will search the folder specified by REMY_REF_PATH for the specified file.

    I know how to setup a variable but I do not achieve to use it in my reference file path

    Remy

  • I know how to setup a variable but I do not achieve to use it in my reference file path

    What is the definition of your variable?

     
    Regards, Jon Summers
    LA Solutions

  • I have tried several things

    Direct reference to Environnment variable Onedrive:  OneDrive:subdir\filename.dgn

    or Environnement varaiable setup in the workset ONE_DRIVE_PATH = $(OneDrive) and using this variable One_Drive_Path:subdir\filename.dgn

    Anyway, My problem is that I do not succed to store a path variable in the reference file name, whatever the variable is

  • using this variable One_Drive_Path:subdir\filename.dgn

    MicroStation doesn't understand that syntax.  Try this...

    Define a new configuration variable:

    ONE_DRIVE_SUBDIR = $(OneDrive)subdir/

    Attach the reference using the new variable:

    ONE_DRIVE_SUBDIR:filename.dgn

     
    Regards, Jon Summers
    LA Solutions

  • I do not think you can have part of the path as a configuration variable. I believe it is an all or nothing proposition. Either the entire path is the variable, in which case the above syntax will work, or it's a full device/drive path.

    I don't know how your projects are set up, but one way that we get around defining a million paths for every project is to define our MS_RFDIR using "Variable Definition Resources". You can search the Help for these.

    As an example, we have a consistent directory structure. Each project has a CADD directory, and each CADD directory has subdirectories for Base, Sheets, and Image files.

    The parentdevdir() definition means "device and parent directory" which means (kind of) "go one directory up and look from there". We use this with the $(DGNDIR) variable, which is built-in to mean "the directory of the active file". Combining this with the definition resource, we get

    MS_RFDIR = parentdevdir (DGNDIR)/Base/
    MS_RFDIR > parentdevdir (DGNDIR)/Sheets/
    MS_RFDIR > parentdevdir (DGNDIR)/Image/

    This way, no matter what project we are working on, MS_RFDIR will always find the Base, Sheets and Image directories for that project.

    MaryB

    Power GeoPak 08.11.09.918
    Power InRoads 08.11.09.918
    OpenRoads Designer 2021 R2

        

    Answer Verified By: Rémy Weill 

Reply
  • I do not think you can have part of the path as a configuration variable. I believe it is an all or nothing proposition. Either the entire path is the variable, in which case the above syntax will work, or it's a full device/drive path.

    I don't know how your projects are set up, but one way that we get around defining a million paths for every project is to define our MS_RFDIR using "Variable Definition Resources". You can search the Help for these.

    As an example, we have a consistent directory structure. Each project has a CADD directory, and each CADD directory has subdirectories for Base, Sheets, and Image files.

    The parentdevdir() definition means "device and parent directory" which means (kind of) "go one directory up and look from there". We use this with the $(DGNDIR) variable, which is built-in to mean "the directory of the active file". Combining this with the definition resource, we get

    MS_RFDIR = parentdevdir (DGNDIR)/Base/
    MS_RFDIR > parentdevdir (DGNDIR)/Sheets/
    MS_RFDIR > parentdevdir (DGNDIR)/Image/

    This way, no matter what project we are working on, MS_RFDIR will always find the Base, Sheets and Image directories for that project.

    MaryB

    Power GeoPak 08.11.09.918
    Power InRoads 08.11.09.918
    OpenRoads Designer 2021 R2

        

    Answer Verified By: Rémy Weill 

Children