You are currently reviewing an older revision of this page.
How to add relative path to referenceHow to automatically add a relative path to a reference attachmentHow to automatically remove the relative path when the attachment is in the same folder as the active file
Example mdl application mkrefrelative.maftp://ftp.bentley.com/pub/knowledgebase/attachments/mkrefsrelative.maPut the MDL application is the folder that MS_MDLAPPS is point toKey-in: MDL LOAD mkrefsrelativeThis will scan all the attached references and convert the found path into a relative path, if possible.Note:- If the reference file is inside the same folder as the active file, the relative path will be NULL, which will effectively clear the file name field in the attachment.- The key-in can be ran in Batch Processor. You can use it in conjunction with batch process to process many files. In your command file, just put something like: mdl load mkrefsrelative -n d:\tmp\relative.log (or put '-y' instead of '-n' if you want it to ask you before it changes the attachments to relative).-It is a good idea to turn ON the user preference Reference->"Cache When Display Off" when running mkrefsrelative, because otherwise MicroStation doesn't bother to try to find references whose display is off, and mkrefsrelative can only work on references that MicroStation successfully finds.