gki2cad -- Convert GKI metacode files into autoCAD DXF files
gki2cad gkifiles cadfile
This task reads a list of GKI metacode file and generates a single
file with the equivalent DXF instructions.
Only a subset of the GKI instructions is implemented since some of them have no DXF equivalent, or because it's better to just use defaults and leave the work to autoCAD. The implemented GKI instructions are GKI_POLYLINE, GKI_POLYMARKER, GKI_TEXT, and GKI_TXSET, although the latter is only implemented to set the text size. GKI instructions that are not implemented, but that could be implemented are GKI_FILLAREA, GKI_PUTCELLARRAY, GKI_PLSET, GKI_PMSET, GKI_TXSET (full set), and GKI_FASET. Finally, GKI instructions that don't have any equivalent (or at least not obvious) are: GKI_OPENWS, GKI_CLOSEWS, GKI_REACTIVATEWS, GKI_DEACTIVATEWS, GKI_MFTITLE, GKI_CLEAR, GKI_CANCEL, GKI_FLUSH, GKI_SETCURSOR, GKI_GETCURSOR, GKI_GETCELLARRAY, GKI_ESCAPE, GKI_SETWCS, GKI_GETWCS. If the verbose parameter is set to yes , all GKI instructions are written to the output file as comments.
Since autoCAD can handle multiple layers, text and graphics are written to separate layers to allow an easier editing with autoCAD. If the text parameter is set to no , no text is generated and only a single layer is used.
1.- Generate a DXF file, including text, and the GKI instructions as comments:
ct> gki2cad gki1 cad1 text=yes verbose=yes2.- Generate a DXF file without text and comments:
ct> gki2cad gki1 cad1 text=no verbose=no
It takes about ten seconds to convert a 72K bytes GKI file, on a SUN3/60.