DEFINE_TEXT_FILE

The DEFINE_TEXT_FILE command allows an ASCII text file containing the definition of vector features to be associated with a name. You can then use the associated name in the FILENAME parameter of the IMPORT_ASCII command to load the file contents as if they were an external file. This is a powerful command allowing you to embed the definition of vector features directly within a script.

The associated name can also be used with the DIR_LOOP_START command where the definition includes a list of filepaths.

The DEFINE_TEXT_FILE command consists of a single command line followed by a series of lines with the contents of the text "file". The DEFINE_TEXT_FILE command is terminated with a single line containing only the text END_DEFINE_TEXT_FILE.

The following parameters are required by the DEFINE_TEXT_FILE command.

  • FILENAME - specifies the name to associate with this text file contents. Provide this value in the FILENAME parameter for the IMPORT_ASCII command.

SAMPLE

Here is an example of a DEFINE_TEXT_FILE command used to define a couple of feature shapes.

DEFINE_TEXT_FILE FILENAME="Test Features"
GM_TYPE=Lake, < 0.5 sq. mi.
DESCRIPTION=LAKE OR POND
BORDER_COLOR=RGB(0,0,0)
BORDER_STYLE=Null
FILL_COLOR=RGB(0,0,211)
FILL_STYLE=Solid Fill
CLOSED=YES
LABEL_POS=382285.8,4331317.0
DLGMAJ_0=50
DLGMIN_0=421
382277.3,4331322.5
382297.4,4331322.5
382297.4,4331322.5
382290.6,4331312.0
382277.7,4331311.0
382277.7,4331311.0
382277.3,4331322.5
GM_TYPE=Minor River
DESCRIPTION=STREAM
BORDER_COLOR=RGB(0,0,0)
BORDER_STYLE=Null
FILL_COLOR=RGB(0,0,211)
FILL_STYLE=Solid Fill
CLOSED=YES
LABEL_POS=381081.4,4319924.0
DLGMAJ_0=50
DLGMIN_0=412
381269.3,4320021.0
381288.4,4320030.0
381298.8,4320037.0
381330.0,4320081.5
381359.7,4320117.0
381380.0,4320130.0
381397.2,4320136.0
381419.2,4320136.5
381460.5,4320125.5
381517.1,4320120.5
381554.9,4320121.5
381627.6,4320133.0
381665.4,4320135.5
381684.3,4320131.5
381707.9,4320122.0
381725.6,4320118.5
381733.4,4320112.5
END_DEFINE_TEXT_FILE