Where possible, inbuilt Microstation functionality is used to provide configuration of the CAD standard, and then the Microstation 'Project Configuration File' (PCF) can be used to project CAD standard overrides at the project level. This generally means that:
•Layer definitions are stored in Microstation Levels 'DGNlibs', one per discipline. (A DGNlib is a DGN file which can be attached as a library to provide external definitions for layers, textstyles, dimension styles etc)
•Text styles and Dimension Styles are defined in DGNlibs approproate for use with Meters or Millimeters drawings. The style names are the same in both libraries though, but the settings differ (3.5mm text height vs 0.0035M text height).
•Project Configuration Files can also be used to provide project specific overrides for colour tables, linestyle libraries etc.
•Linstyles can be referenced from either a Microstation .rsc file, or an AutoCAD .lin file. Microstation rsc files can be units independant, whereas .lin files are not.
With the release of Microstation XM, CADtools also moved to using Annotation scale to reduce the number of 'styles' that had to be maintained.
Tools provided by CADtools Microstation should be able to work with CAD standards other than the default Arup CADSN standard. In practice some limitations apply, such as different styles of section mark cells (double headed vs head and tail) requiring different logic during placement, but for the most part things work ok.
The approach is that all the tools refer to 4 'databases' for information about the relevant layers, colours, weights, blocks, text, dims etc etc. These 'databases' are (currently) a simple CSV text file format, and can be assigned through the use of Microstation configuration variables which provide the location of the DB, and the 'type'. Currently "CSV" is the only valid type, adding new 'types' allows for potential future merging of the symbology database between CADtools AutoCAD and Microstation
For Microstation XM the default settings are:
CADTOOLS_SYMB_DB_LOCATION = $(_CADTOOLS_COMMON_SYMB)CADtools/v8.9/CADtoolsSymb.csv
CADTOOLS_SYMB_DB_TYPE = CSV
CADTOOLS_CELLS_DB_LOCATION = $(_CADTOOLS_COMMON_SYMB)CADtools/v8.9/CADtoolsCells.csv
CADTOOLS_CELLS_DB_TYPE = CSV
CADTOOLS_TEXT_DB_LOCATION = $(_CADTOOLS_COMMON_SYMB)CADtools/v8.9/CADtoolsText.csv
CADTOOLS_TEXT_DB_TYPE = CSV
CADTOOLS_DIMS_DB_LOCATION = $(_CADTOOLS_COMMON_SYMB)CADtools/v8.9/CADtoolsDims.csv
CADTOOLS_DIMS_DB_TYPE = CSV
Note: $(_CADTOOLS_COMMON_SYMB) expands to P:\Program Files\Oasys\CADtools_Ustn\Common\Symb\
The CADtoolsSymb.csv file contains information about layername and symbology to be used by tools within CADtools
Each tool will have a nominal 'lookup name' that it requires to retrieve symbology for part of the tool. For example the "BoltHole in plan" tool draws a circular bolt hole, plus a cross hair to indicate the center of the hole.
BoltHole in Plan The tool which places this looks for two entries in the Symbology database: "BoltHolePlan-outline" and "BoltHolePlan-centreline"
Refer to P:\Program Files\Oasys\CADtools_Ustn\Common\Symb\CAdtools\tools.pdf for more examples
Format
The CADtoolsSymb database contains 7 columns: Nominal_Name, Level, Colour, Weight, Style, FillMode and FillColour.
•The "Nominal Name" column is the hardcoded lookup value that the tool will search for, it cannot be changed.
•The values in the other columns can either be a specific Microstation value for the relevant symbology item (i.e put 50 in the Colour column to use colour 50) or some special value (use "-1" to take whatever the active settings are, use -2 to use the ByLayer attributes).
A sample of the start of a CADtoolsSymb.csv file is as follows:
# Lines starting with # can be used for comments and will be ignored,,,,,,
# DO NOT CHANGE THE NOMINAL_NAME COLUMN.,,,,,,
# 'Active' in the Level column means that elements will be placed on the active level when the macro is run,,,,,,
# A '-1' in the colour, weight, style, or fill columns means that setting will take the active settings when the macro is run,,,,,,
# A '-2' in the colour, weight, or style columns will set the symbology to ByLevel,,,,,,
#Nominal_Name,Level,Colour,Weight,Style,FillMode,FillColour
Batter-SimpleTick,CE_BATR_MRKS_H_PLAN,-2,-2,-2,0,0
Blockwall-Line,SM_WALL_BLCK_E_OUTL,-2,-2,( Block ),0,0
BoltHolePlan-centreline,SS_FXNG_CNTR_E_####_0000X,-2,-2,-2,0,0
BoltHolePlan-outline,SS_FXNG_BOLT_E_OUTL,-2,-2,-2,1,6
...
The CADtoolsCells.csv file contains information about cells and layername to be used by tools which place cells within CADtools. Each tool will have a nominal 'lookup name' that it requires to retrieve the required cell for that tool. For example the "Section mark" tool draws a section mark using a number of cells to make up the end result,
The tool which places this looks for two entries in the Cells database: "SectMark-Mark" and "SectMark-Extent"
Refer to P:\Program Files\Oasys\CADtools_Ustn\Common\Symb\CADtools\tools.pdf for more examples
Format
The CADtools Cells database contains 4 columns: Nominal_Name,Cell Name,Library,Level
•The "Nominal Name" column is the hardcoded lookup value that the tool will search for, it cannot be changed.
•The "Cell Name" column is the name of the block or cell that should be used as this part of the tool
•The "Library" column is the filepath or cell library name of the cell library that contains the cell to be placed
•The "Level" column is the level upon which the cell will be placed.
A sample of the CADtoolsCells.csv is as follows:
# Lines starting with # can be used for comments and will be ignored,,,
# DO NOT CHANGE THE NOMINAL_NAME COLUMN.,,,
# The value under library can be either a fullpath to the cell library, or just the library name as long as",,,
# that cell library is in the MS_CELL path(s),,,
# Level can be a level name (with leading ? If req'd), 'Active' or 'As Drawn'",,,
#Nominal_Name,Cell Name,Library,Level
DetTitle,GX_Draw_Anno_Title,CadTools_GeneralSymbols.cel,GX_DRAW_ANNO
SectTitle,GX_Draw_Anno_Title,CadTools_GeneralSymbols.cel,GX_DRAW_ANNO
SectMark-Mark,GX_Draw_Anno_Sect_Left,CadTools_GeneralSymbols.cel,GX_DRAW_ANNO
SectMark-Extent,GX_Draw_Anno_Sect_Right,CadTools_GeneralSymbols.cel,GX_DRAW_ANNO
CADtools routines which place text usually do it in one of two ways, either the text is part of a cell/block, and therefore is appropriately found through the CADtoolsCells database, or the tool uses input from the user to identify which Text size/scaling is required, then uses the CADtoolsText database to identify the required text style, or series of commands to set the appropriate text settings, and then optionally uses the CADtoolsSymb database to set values such as colour.
Where the Database refers to a TextStyle, the actual definition of that style is stored in the a Microstation TextStyle DGNlib attached as part of the project configuration.
One possible downside to the approach taken by the Text DB at this stage, is that the 'nominal name' values are closely aligned with the Arup CADSN standard, and may not entirely map across to other CAD standards. It is also probably not very suitable for non-metric CAD standards
Format
The CADtoolsText database has four columns: Nominal_Name, Style or command sequence, Mode, Level
•The "Nominal Name" column is the combination of the text 'size' and the plotting scale, i.e 'Small_00001' refres to small text (1.8mm) plotted at 1:1 scale.
•The "Style or command sequence" column contains either a Microstation textstyle name, or a sequnence of Microstation key-ins that will setup the required text settings, refer also to the Mode column.
•If the "mode" is set to 1, then the "style or command sequence" column will be interpreted as a Microstation textstyle name, which should be available from the attached textStyle library, this name will then simply be appended to the 'textstyle activate' keyin to activate the correct settings. If the "mode" is set to 2, then the "style or command sequence" column will be interpreted as a literal keyin, and nothing will be prepended.
•The "Level" column provides a way to force a particualr text size/scale combination to always be placed on a particular level. (Microstation TextStyle DGNlibs do not provide a mechanism for setting the Level for a text style)
A sample of the CADtoolsText.csv follows:
# Lines starting with # can be used for comments and will be ignored,,,
# DO NOT CHANGE THE NOMINAL_NAME COLUMN.,,,
# XSmall = 1.25, Small = 1.8, General = 2.5, Label = 3.5, Title = 5.0 XLarge = 7.0 XXLarge = 10.0,,,
# The if a text style is used in the second column, set the mode column to 1,,,
# If a command sequence (e.g FT=27;co=3;wt=2;th=250;tw=200) is used in second column, set mode equal to 2,,,
# Level can be a level name (with leading ? If req'd) or 'Active',,,
# You can (carefully!) use Excel to re-sort the order of all the data,,,
#Nominal_Name,Style or command sequence,Mode,Level
General_00001,General,1,Active
General_00002,General,1,Active
General_00005,General,1,Active
...
Small_00001,Small,1,Active
Small_00002,Small,1,Active
...
Title_00002,Title,1,Active
Title_00005,Title,1,Active
Title_00010,Title,1,Active
...
Xlarge_00001,Xlarge,1,Active
Xlarge_00002,Xlarge,1,Active
...
CADtoolsDims.csv - Dimensions
The CADtoolsDims database works in a very similar manner to the CADtoolsText database, except to control dimansion styles instead of text.
Where the Database refers to a DimensionStyle, the actual definition of that style is stored in the a Microstation DimensionStyle DGNlib attached as part of the project configuration. Note, the Microstation DimStyles refer to a Microstation text style to gather appropriate text style settings.
One possible downside to the approach taken by the Dims DB at this stage, is that the 'nominal name' values are closely aligned with the Arup CADSN standard, and may not entirely map across to other CAD standards. It is also probably not very suitable for non-metric CAD standards
Format
The CADtoolsDims database has four columns: Nominal_Name, Style or command sequence, Mode, Level
•The "Nominal Name" column is the combination of the dimension 'type' and the plotting scale, i.e 'Dot_00001' refres to a dimension with Dot terminators plotted at 1:1 scale.
•The "Style or command sequence" column contains either a Microstation dimstyle name, or a sequnence of Microstation key-ins that will setup the required dimension settings, refer also to the Mode column.
•If the "mode" is set to 1, then the "style or command sequence" column will be interpreted as a Microstation dimstyle name, which should be available from the attached DimStyle library, this name will then simply be appended to the 'dimstyle active' keyin to activate the correct settings. If the "mode" is set to 2, then the "style or command sequence" column will be interpreted as a literal keyin, and nothing will be prepended.
•The "Level" column provides a way to force a particualr dimension type/scale combination to always be placed on a particular level. (Microstation DimStyle DGNlibs do not provide a mechanism for setting the Level for a text style)
A sample of the CADtools Dims database follows:
# Lines starting with # can be used for comments and will be ignored,,,
# DO NOT CHANGE THE NOMINAL_NAME COLUMN.,,,
# The if a dimension style is used in the second column, set the mode column to 1,,,
# If a command sequence (e.g FT=27;co=3;wt=2;th=250;tw=200) is used in second column, set mode equal to 2,,,
# Level can be a level name (with leading ? If req'd) or 'Active',,,
# You can (carefully!) use Excel to re-sort the order of all the data,,,
#Nominal_Name,Style or command sequence,Mode,Level
Arrow_00001,Arrow,1,Active
Arrow_00002,Arrow,1,Active
Arrow_00005,Arrow,1,Active
...
Arrow_25000,Arrow,1,Active
Dot_00001,Dot,1,Active
Dot_00002,Dot,1,Active
Dot_00005,Dot,1,Active
Direct link to this topic:
© 2013 Arup