me2any
a tool to plot pdf tif jpeg etc.
from ME10
Version 1.54  25.Februar 2003
Klaus Lörincz CoCreate Holding Germany

0. Content

    1. Whats New
    2. What is me2any
    3. How to install
    4. How me2any works
    5. Customization
1. Whats New

New printer driver

me2any is now focused on ADOBE© PS Driver PostScript Printer Driver wit a special PPD File (ME2ANY.PPD) on the Windows platform.
On UNIX the built in PostScript driver will be used. However the differance is that this driver is not supporting the embedded format information.
The available plotting formats for both platforms are:
Name Width [mm] Height [mm]
A4P 21.0 29.7
A4L 29.7 21.0
A3P 29.7 42.0
A3L 42.0 29.7
A2P 42.0 59.4
A2L 59.4 42.0
A1P 59.4 84.0
A1L 84.0 59.4
A0P 84.0 118.8
A0L 118.8 84.0

The format string is detected automatically within me2any without the following "P" or "L" and will be completed with them in the following way:
        The format is converted to the "L" format if m2a_val_orientation =1 has been set
        or is choosen automaticly when m2a_val_orientation is set to 0.

An new variable to control the paper orientation is available :      m2a_val_orientation.
The varaiable is initialized by the environment variable M2A_ORIENTATION.
Available values are:
 
Value Effect
0 Automatic selection, if drawing width > height -> landscape else portrait
1 Landscape
2 Portrait

New Autoformat feature

If you provide an empty format string the format and the rotation is choosen according to the size of the drawing:
plot_pdfs 'C:\test.pdf' '' 1

New Oversized Format feature

If you have formats which are exceeding the std. printer sizes (e.g. A4 - A0) for an AO for example we will automatically
choose to fit the format onto an A0 paper. However if it does not seem to fit to any of the specified formats it will be put
onto an A4 in PORTRAIT mode.

Supported Format Sizes

New Default Printer  feature

At startup time from me2any the current default printer will be captured from the system panel and reset after every
postscript file generation. The associated commands to this function are:

m2a_reset_to_default_printer      to reinvoke the default print setting from startup  

New ME_VERSION feature

At startup time from me2any the current ME_VERSION will be determined. This Version String is used to trigger
actions which are appropriate for the specific ME10 version.

New APPLICATION  feature

At startup time from me2any the current APPLICATION typ is determined and set. 

Value Effect
OSDD ME 10 is running the me2any module. This will also load the basic integration into the "EightMenuSlot" area.
ANNO Annotation is running the me2any module (Annotation from 11.60 on is supported by me2any)

New ME_MULTI_SHEET feature

From version 1.54 on we will support the multisheet feature of ME10 and Annotation. Well the basis of this enhancment
is based on either making the multipage drawings in Annotation or if you using ME10 you should activate the ME10-Annotation
module at startup and create the multischeet drawings with this module. If you do not use this module we will not determine the 
number of sheets and their id's correct - an Error would be the result.

New ME_MULTI_SHEET Output for TIFF and PDF

From version 1.54 on we will support the multisheet output of multisheet ME10 and Annotation drawings into PDF and TIFF.
Due to the file convention of PDF and TIFF multisheet is allowd and wanted in this output formats. The limitation from the
ME_MULTI_SHEET feature is also applicable to this output option.

New ME_PLATFORM_DETECTOR

From version 1.54 on we will support the Windows and UNIX platform. Due to some limitations we will face on UNIX only uniform
page definitions when converting to multisheet TIFF and PDF. The other formats as JPEG and BPM wil nor suffer from this limitation.
However the content and scaling of the drawing to the desired target format will not be influanced by his limitation.

New disabling/dummy function

You can disable me2any by setting the environment variable M2A_ENABLE to 0 (SET M2A_ENABLE=0). If You disable me2any
no dll is loaded. If You use a me2any plotfunction when me2any is diabled a dummy drawing is generated in the outputfile.Dummy
drawings are available for tif, pdf, ps, bmp, jpg. If You select an other format a simple text file is generated. You can also disable me2any
in Me10 by setting the Me10 global variable m2a_val_enable to 0.
 

2. What is me2any

me2any enables CoCreate Me10© to plot to different vector and bitmap formats. The supported formats are listed in table 3.
The printer settings like orientation, scaling, colors, line types and printing area are taken from the normal plotting menu.
me2any provides different user level routines which are listed below.
The following routines use a scaling factor of 1 (independent of the selection of the plot menu) :
 
Function, Arguments Example
plot_pdf (L_File L_Format) plot_pdf 'C:\temp\4711.pdf' 'A4L' Plot to pdf file 
plot_ps  (L_File L_Format) plot_ps 'C:\temp\4711.ps' 'A4L' Plot to ps file
plot_tiff (L_File L_Format L_Resolution)  plot_tiff  'C:\temp\4711.tif' 'A4L' 300 Plot to tif file (LZWG4 compression) 
plot_bmp (L_File L_Format L_Resolution) plot_bmp 'C:\temp\4711.bmp' 'A4L' 300  Plot to bmp file (24 bit, uncompressed) 
plot_jpeg (L_File L_Format L_Resolution) plot_jpeg 'C:\temp\4711.jpg' 'A4L' 75  Plot to jpeg file (24 bit compressed)
plot_native (L_File L_Format) plot_native 'C:\temp\4711.ps' 'A4L' Plot to the native printer format
The following routines use user provided scaling . If You enter the file name as '' the filename is generated as
TOP PART NAME.FILETYPE   i.e. Welle_4711.pdf
 
Function, Arguments Example
plot_pdfs (L_File L_Format L_Scale) plot_pdfs 'C:\temp\4711.pdf' 'A4' 0.5 Plot to pdf file 
plot_pss  (L_File L_Format L_Scale) plot_pss '4711.ps' 'A4' Sys_plot_scale Plot to ps file with the scale of the plot menu
plot_tiffs (L_File L_Format L_Resolution L_Scale)  plot_tiffs ' ' 'A4' 300 1 Plot to tif file with the name of the top part 
plot_bmps (L_File L_Format L_Resolution L_Scale) plot_bmps 'C:\4711.bmp' 'A4' 300 1 Plot to bmp file (24 bit, uncompressed) 
plot_jpegs (L_File L_Format L_Resolution L_Scale) plot_jpegs 'C:\temp\4711.jpg' 'A4' 300 1 Plot to jpeg file (24 bit compressed)
plot_natives (L_File L_Format L_Scale) plot_natives '4711.ps' 'A4' 0 Plot to the native printer format
There is also a general routine where You can provide one of the possible formats:
 
plot_m2a  (L_File L_Format L_Resolution L_Scale) plot_m2a  '4811.tif' 'tiffg4' 'A4' 300 1 Plot to tif ccg4 file


Available formats are:

 
psmono, pswrite, epswrite Adobe Postscript vector format
laserjet HPGL vector format
pdfwrite Adobe PDF vector format
jpeg, jpeggray JPEG compressed bitmap format
bmpmono, bmp16, bmp256, bmp16m Windows bitmap format
tiffcrle, tiffg3, tiffg32d, tiffg4, tifflzw, tiffpack, tiff12nc tiff24nc TIFF bitmap format
pnm, pnmraw PNM bitmap format
ppm, ppmraw PPM bitmap format
pgm, pgmraw, pgnm, pgnmraw PGM bitmap format
pbm, pbmraw PBM bitmap format
pngmono, pnggray, png16, png256, png16m PNG bitmap format
pcxmono, pcxgray, pcx16, pcx256, pcx24b, pcxcmyk PCX bitmap format
ljet4 PCL printer format
mswinprn Windows printer format
native The native printer format (default: PostScript)
Table 3: Available formats
 

If You install the me2any.lt toolbar the PDF, TIFF, JPEG and the BMP commands are available from the toolbar.
The Toolbar will also contain the the Help button in order to give you access to this page for more information. 
 

Top

2. How to install

To get me2any running You have to install me2any AND install a postscript dump printer in case you are installing into a Windows environment !
 

Installing me2any
Copy the directory me2any to Your me10 directory. If You want to place it elsewhere You have to set environment variables which are explained in the section customization of this document. However if you want to use it also with Annotation it is recommendet to install me2any in the CoCreate folder such as "../CoCreate/me2any".

me2any use the MFC42.DLL file from the WINNT\SYSTEM32 directory. The version of this file have to be at least  version 6.00.8267.0. If You encounter a problem while loading me2any pleas install the MFC42 DLL's from the components directory to Your WINNT/System32 directory or modify Your PATH Variable in Your Me10 startup batch like:
PATH="C:\Program Files\CoCreate\me10\me2any\components";%PATH%
 
 

To activate me2any You have to input me2any.m. You can do this from the command line by typing

    {* Load ME2ANY Module *}
{***************************}
INPUT ((GETENV 'M2A_BASE_DIR')+'/me2any.m')
If You add this line to Your me10 customize.m  file me2any is loaded every time You start your me10.

Note: If you will load it to ME10 : 
                                        edit the file ...\CoCreate\<me10><OSD_Drafting>\customize.m
         If you want to integrate it with Annotation:
                                        edit the file ...\CoCreate\<SolidDesigner><OSD_Modeling>\personality\sd_customize\ANNOTATION\am_customize
in this file add the line:
                      (load (format nil "~A/Components/macros/me2any.lsp" (oli::sd-sys-getenv "M2A_BASE_DIR")))
at the end of this file.

Installing the Toolbar or Menu
To install the toolbar with the preconfigured commands PDF, TIFF, JPEG and the BMP please type on the command line

    TOOLBAR_LOAD ((GETENV "M2A_BASE_DIR")+"/Components/macros/me2any_tool.m") for MEPELOOK 2 or 3
    LOAD ((GETENV "M2A_BASE_DIR")+"/Components/macros/EightMenuSlots.m") for MEPELOOK 1
    (load (format nil "~A/Components/macros/me2any.lsp" (oli::sd-sys-getenv "M2A_BASE_DIR"))) for Annotation
NOTE:  This container will be imported automatically if you use MEPELOOK 2 or 3 respective will be ignored when you load it into Annotation.
If you integrate with Annotation the macro "me2any.m" will be loaded automatically from the lisp file "me2any.lsp".


Installing the postscript dump printer
First you have to install a dummy postscript printer with the name psdumper which prints to the file c:\temp\psdump.ps.
If You want to use a different name for the printer or use another location of the dump file, then You have to set environment
variables which are explained in the section customization of this document.
For the installation of the dummy printer please look at  the installation guide.


NOTE: If you install me2any on HPUX you do not need to install a postscript printer driver as this output format is supported by ME10 or Annotation.
 

Top

3. How it works

me2any generates a postscript file by printing to the postscript dumper. This file is converted with ghostscript to the desired format.

Top

4. Customization

There are several global variables You can set either in a startup script for me10 or in the me10.ini or in the
SYSTEM Control panel.
 
Environment Variable Default Value (If not set) Description
M2A_BASE_DIR MEDIR\me2any Directory where all me2any components are located
M2A_PRINTER_NAME psdumper Name of the Postscript dump printer
M2A_PS_DUMPFILE TEMP\psdump.ps Name of the Postscript dumpfile
M2A_DISPLAY_ERRORS 1 Display Errors on the Command line (1/0)
M2A_GS_DIR M2A_BASE_DIR\components\gs Directory of Ghostscript
M2A_GS_EXE M2A_GS_DIR\bin\gswin32c.exe Executable of Ghostscript 
M2A_ORIENTATION 0 Select the Paper Orientation Me10 wants to print to:
0: Automatic
1: Landscape
2: Portrait
M2A_TIMEOUT 20 Time to wait for the postscript file [seconds]
M2A_ENABLE 1 Enable (1)  or Disable (0) me2any
M2A_WAIT_ONFINAL 0 Wait for Outputfile (1) Do not wait for the Outputfile (2)
M2A_RAS_TARGETDIR TEMP Where to put the Files as a default location 
M2A_DUMMY_FILE M2A_BASE_DIR\Components\dummy. Location and Name (including the .) of the dummy files usedby M2A_ENABLE=0

Here is an example on how to implement the Variables into the me10.ini file. You will have to apply the changes
to all occurancies of the me10.ini file within the directory ME10 is installed (Windows).

My me10.ini

Here is an example on how to implement the Variables into the me10 start script file. You will have to apply the changes
only to the start script you are currently using for all users (UNIX).

My me10 stratscript

If you integrate to Annotation you will need to make the Path descriptions available to Annotation unless you did
add all the neccessary information to the System environment which is rather untypical (Windows).

My pesd startup.bat

If you integrate to Annotation you will need to make the Path descriptions available to Annotation.
You can add all the neccessary information to the environment by using the file pesd.settings within the SolidDesigner
or OneSpaceDesigner Modeling directory (UNIX).

My pesd.settings

If you integrate to either ME10 or Annotation under UNIX you will have to make changes to your printer default settings.
These default settings are located:
        ME10: me10 or OSD_Drafting/plotdefs
Annotation: SolidDesigner or OSD_Modeling/Annotation/bin700/plotdefs
This file should be enriched with the following information:

My plodefs

If you integrate to your own downloaded and compiled gohstscript under UNIX you will have to do some changes in order
to let the gohstscript know what formats you like to sent to it and how they look size wise. You will find this file  depending
on the gohstscript version under ../gs/bin or ../gs/shared/<version>/lib.

My gs_std.ps

Top