FR672 - Custom Formats
Custom Format have been modified to allow the user to optionally specify the number of header lines within the data file that should be skipped before the data records begin and to allow the user to optionally specify the units of numerical fields or an actual multiplier value so that unit conversion can be undertaken automatically as the data is imported.
The number of header lines in the data file can be specified by adding a #HeaderLines header to the Custom Format ini files:
#AutoChartName,ColumnPosition
#Valid AutoChartName values are Easting, Northing, Kp, Description. Easting and Northing must be present.
#To use tab delimiter you can use a tab character or for the avoidance of doubt when perusing this file "\t"
#Delimeter,"\t"
#HeaderLines,2
Kp,5
Easting,6
Northing,7
Description,1
The above example would therefore skip the first two lines of the input file and start reading the data from the third line. If the #HeaderLines option is omitted from the ini file then the import function will start reading from the first line in the data file.
The unit multiplier option is activated by adding the unit value after the column number for the field:
#AutoChartName,ColumnPosition
#Valid AutoChartName values are Easting, Northing, Kp, Description. Easting and Northing must be present.
#To use tab delimiter you can use a tab character or for the avoidance of doubt when perusing this file "\t"
#Delimeter,","
#HeaderLines,3
Kp,1,Meter
Easting,2
Northing,3
Alternatively an explicit multiplier value can be specified rather than the field units
#AutoChartName,ColumnPosition
#Valid AutoChartName values are Easting, Northing, Kp, Description. Easting and Northing must be present.
#To use tab delimiter you can use a tab character or for the avoidance of doubt when perusing this file "\t"
#Delimeter,","
#HeaderLines,3
Kp,1,0.001
Easting,2
Northing,3
In both of the examples above the values in the Kp column of the data will be divided by 1000, so converting the input units in meters to Kp in Kilometers. If no units or multiplier is specified then the values in the file will be imported directly. Similarly, if the coordinates values are set to the same units as those used by the coordinate system, no unit multiplication will be performed.
E.g. If the Easting and Northing fields are set to have Unit value of USFoot and the data is imported into a dwg that has a coordinate system with units of US Survey Feet, then the E/N values will be imported as they appear in the file. However, if the data is imported into a Meter coordinate system, the E/N values will be multiplied by (12/39.37).
The following units can be specified:
USFoot
IntFoot
Meter
USKiloFoot
IntKiloFoot
USMile
IntMile
Kilometer