Pdf Printer Vector Screen Capture


Links

 PDF_Printer_All      PDF_Printer_GCT     PDF_Printer_MVBA

purpose

This tool allows sequential pdfs to be printed of a model.

This means that it's possible to set up a parameter to change and then capture the results.

implementation

This is a very convoluted process, which I'd imagine can be further streamlined (see future directions)

It is implemented within a transaction script that causes the model to change and also calls the KeyIn() function to call a VBA macro that does the printing.

As this solution uses GCscript and VBA it requires 2 source files, one GCT, and one MVBA. The GCT currently uses a relative file path to find the MVBA in the same folder as itself.
If a different folder is required, the path must be entered into the LOAD VBA transaction.

example

In the attatched example a very simple model is updated in a for loop. In the same for loop the 'printer' gets it's instructions.

possible uses

animation

As with a conventional screen capture, i.e. SaveImageToFile etc. this can be used to produce many vector images. Stitching PDFs together is harder than JPGs as there are fewer packages that do it, but the swfTools software will take a sequence of PDFs and output an animated SWF file. It may also be possible in Adobe Flash (with more control).

iterative improvement

In any improvement algorithm, there is often a need to store the results visually to see how the algorythm is performing. For example, this could be used to record the fittest population member from a genetic algorythm in a vextor format suitable for publication.

future directions

The VBA macro is largely created by editing code that is generated by the macro recorder, and as such is probably very sub optimal.

Ultimately, a .Net extension could be written, but so far I can't find any documentation related to the printing API

Usability is still very low, a wizard, or series of Ask() prompts might be helpful.