CVTPC
CVTPC
CVTPC
V8 Utility
User’s Manual
Version 4.5 Updated: March 2003
1. Introduction and Background
The U.S. Army Corps of Engineers utilizes MicroStation Computer Aided Design &
Drafting (CADD) graphics tools for developing and documenting plans and specifications, and for
documenting as-built drawings of construction performed within each District and Division.
MicroStation CADD is a standard means of communicating graphic information both within each
District and between each District, other Districts, Divisions, and Contractors.
All MDL applications must be recompiled to run in MicroStation Version 8. Almost all MDL
applications will need to be modified to run with MicroStation V8. The amount of work required to
adapt an application depends upon the technology that it uses, the degree to which it interacts
with DGN file graphical or control elements, and the method that it uses to interact with such
elements. At a minimum, all applications must be recompiled. In extreme cases, where elements
are directly manipulated without the aid of MicroStation's API, substantial rework may be
necessary. The Version 8 changes affecting USACE customized MDL application are:
• Version 8 eliminates direct access of the Terminal Control Block, which is where the MDL
application obtained values for global origin, working units, active text size, active text
font, and text justification.
• Version 8 completely changed how elements are organized in the design file and how file
positions are used. This affects any functionality that requires searching the design file,
such as functions which search for the maximum graphic group number.
• Version 8 stores all internal string (character) variables as Unicode strings, not ASCII
characters. This affects many functions, such as accessing individual cells, which use
string names.
• Cell Operations are different, cells must be converted to Version 8, and cell names are
Unicode not ASCII strings. Cell Operations are needed for automatic placement of
survey points.
• The Version 8 MDL compiler is different, and stricter than in previous versions of
MicroStation, requiring additional code not previously required and in some cases
resulting in previously functioning logic no longer functioning the same.
2
Although the Version 8 MDL compiler significantly impacts existing MDL applications, the benefits
of upgrading to Version 8 are compelling. Particularly compelling is the elimination of the design
file size limitation and continued compatibility with other Districts utilizing MicroStation Version 8.
• When placing linear features, the program shall use the point name to control the length
of the line. As long as the point name remains the same, the points shall be placed as a
continuing set of line segments or as a multipoint line or curve string. As soon as a
different point name is encountered, the line string shall be terminated at the previous
point.
• A preview capability that allows imported points to be “viewed” without actually saving
them to the design file. This preview capability will allow settings for element color, size,
rotation, etc to be viewed and adjusted, if necessary, prior to writing the graphic elements
to the design file.
Beacon Resources was selected to perform this MDL conversion/modification work under
Contract DACW42-03-P-0108. A point of contact at Beacon Resources for technical questions is
Mr. Michael Grounds at (256) 771-0014. E-mail may be sent to [email protected].
3
2. Program Description
The ASCII files to be converted into MicroStation Design Files can have their coordinates
and point descriptors placed in any order, i.e. "Point Name-X-Y-Z-Point Code", "Y-X-Z-Point
Code-Point Name", etc ... The ASCII data can be delimited by spaces or commas, or it can be
designated by column position. For example, ASCII data files separated by spaces would be of
the form:
1,32987.34,45890.01,123.44,MANHOLE
2,32877.43,45799.22,122.32,METER
3,32853.89,45771.09,128.55,SPOT
where the Point name (number) is in column 0, the X coordinate in columns 5-12, the Y
coordinate in columns 15-22, the Z coordinate in columns 25-30, and the Point Code in columns
31-37.
4
3. File Requirements
2. Cell Library - Library of graphic symbols to be placed within the design file. A standard
library Corps for surveying and mapping applications, CIVSUR.CEL, is recommended and is
included on the program disk. This file will be automatically installed to c:\Program
Files\Bentley\Program\MicroStation\mdlapps when the CVTPC program is installed.
3. Attribute File - File (created within CVTPC) that specifies the color, level, line codes,
weights, scales, and angles for the elements to be entered in the design file.
4. Model File - File (created within CVTPC) that stores the field positions and format of the
ASCII file.
5
4. Installing CVTPC on your Computer
The easiest way to install CVTPC on your computer is to run CVTPCSetup.exe. This file can
be run directly from the installation CD, can be downloaded from the Internet web site for CVTPC,
or can be copied to any directory on your hard disk and then run. When the program is run, the
following interface will be displayed:
Press the Next button to continue. The following interface will then be shown.
Again, press the Next button to copy the files to the correct locations on the hard disk. Both the
files cvtpc.ma and civsur.cel will be copied to the mdlapps directory under MicroStation, which is
typically located in c:\Program Files\Bentley\Program\MicroStation\mdlapps. Press the Next
button to continue with the installation process, the following interface will then be displayed.
6
Do not press the “Launch Program File” toggle. The CVTPC application is not a Windows
application and will not run directly under Windows. The installed application is a MicroStation
Version 8 MDL program and must be run from within MicroStation. The next step in the
installation is to press the Finish button. The following interface form will be displayed if all files
were copied successfully.
Press the OK button to exit the CVTPC installation program. Then, run MicroStation and proceed
using the instructions provided in Section 5. Operating Instructions.
Using Windows Explorer, copy CVTPC.MA and CIVSUR.cel from the installation CD to the
MDL applications directory. If MicroStation resides on your C: drive, this directory will be
something similar to C:\Program Files\Bentley\Program\MicroStation\mdlapps.
7
5. Operating Instructions
1. Start MicroStation.
2. Load CVTPC – As illustrated below, select the Utilities option from the MicroStation menu
bar. Next, select the MDL Applications option. Select CVTPC.MA from the MDL Applications
dialog box and then press the LOAD button.
Or, if you have loaded and docked the MicroStation key-in browser to function as a command
window, then you can type “mdl load cvtpc” or “mdl l cvtpc” to start the application.
3. As illustrated below, the main CVTPC dialog box should appear. Select an input ASCII file
and cell library. This can be accomplished by using the File pull-down menu in the upper left-
hand corner of the main dialog box. Select or create new model and/or attribute files using the
same menu.
8
6. First build the Model File by going to the Model Setup group box.
a) Select the proper data type format for your ASCII file by using the Data type option
button.
b) Enter the Field Positions of the data. If a listed item is not used, i.e. no labels are to
be placed, enter a zero in the option. If the ASCII File is separated by columns and an item is
not used, enter a 999 in both the start and stop positions.
c) Select the String type, Dec. places in elev., and Remove Neg Sign options to meet
your particular needs. The String type option is only used when placing lines within the design
file.
d) Save the model file by pressing the Save button in the Model Setup groupbox.
7. Build the Attribute File by going to the Attribute Setup group box.
a) Enter the attribute you would like to edit in the Attr Num box.
b) Enter the levels, colors, weights, scales, and angles for the various options. To turn
an option off, enter 0 for the level.
c) To save the Attribute File, select the Save button from the Attribute Setup groupbox.
d) Existing attributes may be referenced by pressing the "Pt. Code Search" button. This
will list the existing point codes in alphabetical order and will allow the user to move from one
attribute to another.
9
e) An ASCII file with all of the attribute information can be generated by selecting "ASCII
File Dump" from the Utils pull-down menu in the main dialog box.
8. Set the “Preview Imported Elements” toggle depending upon whether you would like to preview
the elements (toggle set) or add them to the design file as permanent graphic elements (toggle
clear).
9. Select the Start button to begin the program. The number of points processed will appear in
the MicroStation readout window at the bottom of the screen. Any errors will also appear.
10. When all the points are processed, the CVTPC Completed window will appear. The number
of points as well as the number of Nocon points (No Convert) will be displayed in the box. Any
points that are not processed will be placed into a ASCII text file called Nocon. This file can be
viewed by pressing the View Nocon button on the CVTPC Completed window or by selecting
View Nocon File from the Utils pull-down menu in the main dialog box. This file can also be
viewed with any ASCII text editor.
11. The Return button will close the Attribute/Model Setup dialog box and return you to the main
CVTPC dialog box.
10
6. Field Descriptions
Model Setup
Pt Name - The position of the point name in the ASCII file. Usually a name or number.
Data Type - The type of delimiter used by the ASCII file. Must be either spaces, commas, or
columns.
String Type - The type of line to be used when drawing lines with CVTPC. Must be either
line string (connect the dots) or curve string.
Dec. places in elev. - The number of places after the decimal point to be printed in the
elevation.
Remove Neg. Sign - When on, this toggle button will remove the "-" from all negative
elevations and place a "+" next to all the positive elevations.
Attribute Setup
Level - The level on which you would want the selected graphics to be placed. Valid entries
are 1-63.
Color - The color you would want for the chosen graphics. Valid entries are 0-255.
Weight - The weight you would want for the chosen graphics. Valid entries are 0-15.
L Style - The line style (or code) to be used when drawing line strings or curve strings. Valid
entries are 0-7.
Angle - The angle at which you would place the graphics. Valid entries are 0.0 - 360.0.
Point - When on, this option will place a point at the positions read from the ASCII file.
Line - When on, this option will connect the points with a line or curve string.
Elev - When on, this option will place the elevations in the design file.
Pt Name - When on, this option will place the point names in the design file.
Cell - When on, this option will place the cells in the design file.
Label - When on, this option will place the labels in the design file.
11
Pt Code - When on, this option will place the point codes in the design file.
Op Note - When on, this option will place a note in the design file.
Optional Note - This field is where the user would type in the note that is to be displayed in
the design file.
Point Code - This field is where the user would enter a point code from the ASCII file to be
matched with the current attribute.
Cell Name - This field is where the cell name from the cell library is to be entered. Capital
letters must be used.
Search Att # thru # - The attributes to be searched once the conversion has begun. This
option will allow the user to greatly increase the speed of the program if the user knows which
attributes are to be used during conversion.
12