Please enable JavaScript to view this site.

A-Shell Consolidated Reference

//SETVMI, #

SETVMI sets vertical line spacing, where # is the desired number of units (must be an integer) in the current map mode to set the "Vertical Motion Increment" to—i.e., vertical line spacing. This can be useful when filling in pre-designed forms that require a certain uniform line spacing that isn't quite what you would otherwise get from setting the LPP value in the printer ini file or by setting a particular font and then using RESETLPP.

Note that if you want 6 lines per inch, to be precise, you may need to first switch to the TWIPS mapmode, since its units per inch can be evenly divided by 6. For example:

//SETMAPMODE,TWIPS

//; set 6 lines per inch (1440/240 = 6)

//SETVMI,240

 

You can then switch back to another map mode, but that defeats the purpose, since the units will be converted and rounded down. So converting to LOENGLISH, for example, would give you the equivalent of //SETVMI,16. In that case, you might have done better by just setting //SETVMI,17.

History

2009, May, A-Shell build 1149:  Printing bug fix/refinement: SETVMI vertical spacing is now interpolated to fractional pixels, rather than being rounded to the nearest pixel. This corrects a problem where, depending on the VMI factor and resolution, you might have ended up with vertical spacing that was off by a fraction of a pixel. That doesn't sound like much, but by the time you get to the bottom of a page (60+ lines) a half pixel error multiplies to 30 pixels, which might be as much as an entire line. This problem typically showed up when switching between a laser printer (at 600 or 1200 DPI) and a PDF or FAX device at 100-300 DPI. And even then, it would generally have gone unnoticed unless you were using a mixture of GDI directives to draw boxes (which wouldn't have been subject to a per-line error accumulation) and regular print lines to fill them in.

Compatibility Note:  Existing printouts which used SETVMI to set the vertical spacing necessary for print lines to line up with boxes drawn with GDI primitives may be affected by this (generally in a way that improves the alignment, unless you happened to have relied on the accumulated rounding error without realizing it).

See the A-Shell forum discussion "GDI spacing variance between printers" for more detailed information.