In MicroStation V8i, how do I incorporate the date into the name of the output file from a Bentley D


 Product:MicroStation
 Version:All
 Environment:N\A
 Area:Print/Plot
 Subarea:N\A

Problem

In MicroStation V8i, how do I incorporate the date into the name of the output file from a Bentley Driver? 

Solution

This is an example of a "Named Expression" to include the date in the default output file name.

Open the DGN library in which you want to store the named expression.
Open the Named Expressions dialog (Utilities->Named Expressions) and in its toolbar, select the "New" icon.
In the Internal Name field, type in PrintDate
In the External Name field, type the expression name . This name appears in Print Organizer's dialogs.
(Optional) In the Description field, key in a description of the Named Expression.

Under Keywords, select Print Set.
Note: Named expressions stored in a DGN library must have the Print Set keyword checked in order to be displayed in Print Organizer
Under Symbol Sets, add the symbol sets such as PrintSet, and PrintDefinition. In this case add System.String and System.DateTime

In the Expression field enter:
System.String.Format ("{0:yyyyMMdd}", System.DateTime.Now())
Click on Test and you should see today's date.
Click on "Save" icon and exit from the dialog box

Now modify the default print file name in the .plt or .pltcfg file to read:
$(MS_PLTFILES) <expr?name=PrintDate>-$(basename(_DGNFILE))-$(MS_PLTMODELNAME)-<autoInc?digits=3?base=0>

Please note that this is just an example of what can be done. If you want more specifics look at the following link:

Tutorial: Including the Date in Print Output File Names - Printing Great Things

See also

Other language sources

 Original Author:Edwin Yepes