The AutoChart Import Block command is a useful way to import ascii data to symbolize data (such as core or CPT locations), but in its simplest form, it is limited to a single block definition for every data point in the file. This means that if you have to display different types of data, you have to run the command multiple times, changing the data file and the block symbol each time. There is however an easy way to use the command in a single operation and create different symbols for different types of data. It is also makes it possible to control which Layers are used for different symbols. To use this functionality, you need to define a Block Ini file and ensure that each different type of data has a unique identifier as the first attribute in the data file.
For example, the data file may contain all of the As-Laid Events for a Cable Route:
The values in the 3rd column provide an identifier that links to the block name to use with the symbol settings held in the Block Ini file:
# Name,File
LAYERS
# LayerName,Linetype,Colour
AlterCourse,CONTINUOUS,WHITE
Repeater,CONTINUOUS,WHITE
SpliceBox,CONTINUOUS,WHITE
Transition,CONTINUOUS,WHITE
BranchUnit,CONTINUOUS,WHITE
PlowUp,CONTINUOUS,WHITE
PlowDown,CONTINUOUS,WHITE
OBJECTDATA-TYPE
# PrimaryCode,SecondaryCode,SymbolName,Layer,Colour,Scale
A/C,,C:\Symbols\AC_Symbol.dwg,AlterCourse,BYLAYER,10000
Beach Manhole,,C:\Symbols\AC_Symbol.dwg,AlterCourse,BYLAYER,10000
Repeater,,C:\Symbols\Repeater.dwg,Repeater,BYLAYER,10000
Splice Box,,C:\Symbols\Splice Box.dwg,SpliceBox,BYLAYER,10000
Transition,,C:\Symbols\Cable Transition.dwg,Transition,BYLAYER,10000
Branching Unit,,C:\Symbols\Branch Unit.dwg,BranchUnit,BYLAYER,10000
Plow Up,,C:\Symbols\Plow Up.dwg,PlowUp,BYLAYER,10000
Plow Down,,C:\Symbols\Plow Down.dwg,PlowDown,BYLAYER,10000
The subsequent columns in the data file give the attributes that will be used for the block labels. Multiple attributes can be used if these have been defined in the symbol drawing. Only the block names that are defined in the Block Ini File will be imported, so this can be used as a filter to only bring in certain record types. It's also important to make sure that the path to the symbol dwg is correct and that the block dwg file actually exists in this location!
In the Import Block Data Dialog, the 'Use First Attribute as Block Name' checkbox should be ticked and the location of the Block Ini file specified:
The entire data file will then be imported in a single operation, with the block used to symbolize each event type changing according to the name set as the first attribute.
No comments:
Post a Comment