The question of how to simplify the creation of plots is often raised. If you want to create a plot, there are several steps that are generally necessary. If the plot is finished being created, there are often adjustments that were forgotten or steps performed incorrectly.
To prevent these problems, you can automate the settings.
MicroStation provides an example of a large amount of keyboard shortcuts that allow full control of plots.
This is a simple example for creating PDF documents.
First of all, we have to find out which Key-in commands MicroStation provides for plotting.
All Key-in commands start with the keyword "print", but the list will be empty at first, shown below:
To display the list of commands, give the order "mdl load plotdlg":
In this example, I have used "silentload" rather than "load". These commands do the same thing, but "silentload" does not show a dialog box.
This is often desirable if you do not want the PlotPreview or for performance reasons.
After loading the application, all key-in commands will be displayed:
The individual Key-in Command can easily be combined with a macro. Here is a summary of Key-in Commands in a VBA macro. For this, the "CadInputQueue.SendKeyin" VBA command is needed to be able to run VBA Key-ins. In this example, the following steps were performed:
Customizing the plot on paper:
Sub printPDF ()
'All print load commands and view the Key-in dialog
CadInputQueue.SendKeyin "mdl load plotdlg"
Select 'driver, here output to PDF
CadInputQueue.SendKeyin "print driver pdf.pltcfg"
'Specify paper size
CadInputQueue.SendKeyin "print paper-name ANSI D"
CadInputQueue.SendKeyin "print boundary fit all"
'Maximize plot size
CadInputQueue.SendKeyin "print maximize"
'Output of the PDF file in the same path of the drawing with model name and extension PDF:
Dim file-name As String
dateiname = ActiveDesignFile.FullName + "--" + ActiveModelReference.Name + "-PDFPLOT.PDF"
CadInputQueue.SendKeyin "print execute " + dateiname