RAW Binary Lattice .RAW, .BIN Import Automation Options

 

When the program is driven from an automation script, an options string can be specified in the script that acts as the import options dialogs do in the program. The string consists of comma-separated parameters, which specify the behavior of the various import options.

 

Parameter

Type

Description

Filter

string

RAW

BigEndian

0,1

Whether to assume the data is in Motorola MSB format. 0 is in Intel LSB format. 1 is in Motorola MSB format.

DataType

0, 1, 2, 3, 4, 5, 6, 7, 8

0 -- char

1 -- BYTE

2 -- short

3 -- unsigned short

4 -- int

5 -- unsigned int

6 -- __int64

7 -- float

8 -- double

DimX

integer

Number of X columns in lattice.

DimY

integer

Number of Y columns in lattice.

DimZ

integer

Number of Z columns in lattice.

FitByScaling

0, 1

0 = Do not scale data values of different types to fit the requested data types; also set if data values are truncated. 1 = scales data of different types to fit the requested data structure.

HasSpacing

0, 1

0 = Do not treat Raw_Min and Raw_Spacing as valid.

1 = Do treat Raw_Min and Raw_Spacing as valid.

IndexOrder

0,.1, 2, 4, 5, 6

Indexing order defined by:

0="X, then Y, then Z"

1="Y, then X, then Z"

2="Z, then X, then Y"

4="X, then Z, then Y"

5="Y, then Z, then X"

6="Z, then Y, then X"

ItemsPerNode

integer

Number of data elements for each node

SkipAfter

integer

Number of bytes to skip after each node.

StartOffset

integer

Offset of first data node in file.

XMax

integer

Largest X value in grid.

XMin

integer

Smallest X value in grid.

XSpacing

integer

Spacing between X nodes in grid.

YMax

integer

Largest Y value in grid.

YMin

integer

Smallest Y value in grid.

YSpacing

integer

Spacing between Y nodes in grid.

ZMax

integer

Largest Z value in grid.

ZMin

integer

Smallest Z value in grid.

ZSpacing

integer

Spacing between Z nodes in grid.

 

Example

This example shows how to import a RAW file with the various options.

 

CommandApi.Construct("Import")

  CommandApi.Option("GuiEnabled", "False")

  CommandApi.Option("ProgressEnabled", "False")

  CommandApi.Option("UndoRedoEnabled", "True")

  CommandApi.Option("AutoConnect", "False")

  CommandApi.Option("ClearOptions", "False")

  CommandApi.Option("Filter", "raw")

  CommandApi.Option("Options", "BigEndian=0")

  CommandApi.Option("Options", "DataType=1")

  CommandApi.Option("Options", "DimX=2")

  CommandApi.Option("Options", "DimY=2")

  CommandApi.Option("Options", "DimZ=1")

  CommandApi.Option("Options", "FitByScaling=0")

  CommandApi.Option("Options", "HasSpacing=1")

  CommandApi.Option("Options", "IndexOrder=0")

  CommandApi.Option("Options", "ItemsPerNode=1")

  CommandApi.Option("Options", "SkipAfter=0")

  CommandApi.Option("Options", "StartOffset=0")

  CommandApi.Option("Options", "XMax=1")

  CommandApi.Option("Options", "XMin=0")

  CommandApi.Option("Options", "XSpacing=1")

  CommandApi.Option("Options", "YMax=1")

  CommandApi.Option("Options", "YMin=0")

  CommandApi.Option("Options", "YSpacing=1")

  CommandApi.Option("Options", "ZMax=0")

  CommandApi.Option("Options", "ZMin=0")

  CommandApi.Option("Options", "ZSpacing=1")

  CommandApi.Option("Path", "C:/Path/To/Import/file.raw")

  CommandApi.Option("PersistOptions", "True")

CommandApi.Do()

 

Used by: Import

 

 

See Also

Automation Model