|
CadDraw Demo Program -
An example program using many of the features of the CadDraw component.

Using the CadDraw Demo program - The first thing to do is to load one of the example
CAD files provided. Go to Main Menu - File - Load CAD. Choose Test.cdl. The
drawing shows up as shown above.
Items on the CadDraw Demo window -
- Zoom All - This button zooms the drawing so that the entire drawing shows
up in the drawing window. If the drawing gets out of window so you cant see
it, you can always bring it back to the center of the screen with this. Also
if you just want to redraw the screen.
- Show Mouse Coordinates - When the box is checked, you will notice that
when you move the mouse over the CadDraw window, the 2D coordinates show up here.
- Screen Center - The boxes show the coordinates of the center of the screen
in units (it doesn't matter whether you call the units inches, millimeters,
miles, or anything else. In this case we're calling them inches). If you
entered 5.0 and 4.0 in the boxes and pressed the Update button you would see
the drawing redrawn to the lower left - the center of the screen is now at
X5.0, Y4.0. You can use this function for panning the drawing around the
screen.
- Scale - The zoom in and zoom out on the drawing is controlled by telling
it how many inches you want the drawing window to represent. If you say the
window represents a view 100 inches wide, then the drawing will appear
small. If you tell it the window represents a view 1 inch wide then the
drawing will be blown up on to a small detail of it. When the window is not
perfectly square ( which it usually isn't) it uses the height or width that
is smaller. That way, if you tell it a view size of 10 inches, 10 inches
will always fit into it.
- Rotate Group -
Elements that are chosen into a group are rotated. Pressing the Make
Group button will put all the elements into a group as shown by red
color. Pressing the Rotate button will rotate all the coordinates of
each element in the group. This doesn't change the view, only the
coordinates of the elements.
- Pick - This is a demonstration of picking a drawing element in the window
with the mouse. If you press the Pick Element button and then go over to the
CadDraw window and pick on an element, it should highlight in yellow to show
it was picked. The data for that element is displayed below the pick button.
In this demo the pick button is a one shot deal - you have to press the Pick
button again every time you want to pick an element. Picking only works when
the CadDraw window is in the top 2D view. You can set the Pick Filter so
that you can only pick points or lines or arcs. CadCalc Demo - When this is
checked it will demonstrate the CadCalc component's ability to calculate new
elements from various information. In the demo code it uses the coordinates
from the picked elements to calculate other points, lines and arcs and then
draws them.
- Anti-Alias - This will
draw the lines and arcs with smoothing which looks better on the
screen. This can slow down the drawing process.
- LineArcs - This will
draw 2D arcs with line segments instead of using the graphic Arc
command.
- Shift Group -
Elements that are chosen into a group are shifted. Pressing the Make
Group button will put all the elements into a group as shown by red
color. Pressing the Shift button will shift all the coordinates of
each element in the group. This doesn't change the view, only the
coordinates of the elements.
- Reset Extents -
This button will recalculate the X,Y extents of the drawing.
Elements that are chosen into a group are rotated. Pressing the Make
Group button will put all the elements into a group as shown by red
color. Pressing the Rotate button will rotate all the coordinates of
each element in the group. This doesn't change the view, only the
coordinates of the elements.
- Shift Origin -
This command shifts the coordinates of all the Elements in the
opposite direction. For instance, you can set the new X0,Y0 to
X29.,Y12.
- Copy Elements -
These buttons show how you could copy the elements from the main CAD
window and paste it into the second CAD window.
- Rotate View and Screen
Center - This rotates the view on the screen. The
cooredinates of the elements are left alone.
File Menu -
- Load CAD - CadDraw component can load and save three different file types
- with various degrees of support. CADL files are best and support 3D
points, lines and arcs. These files are made with CADKEY and other CAD/CAM
software. DXF files support points, lines, polylines and arcs in the top
view. IGES supports points, lines, top view arcs, no color. The types it
tries to read depends on the file extension and the CadType property.
- Save CAD - You can save to the same three file types with the same
support. Its possible to read in one kind and save to another.
- Save BMP - Saves the drawing to a windows bitmap.
- Save GIF - Saves to GIF file.
- Save JPEG - Saves to JPEG file.
- Print CAD - Prints an accurate plot of the current view to the windows
printer.
- Print Bitmap - Prints the bitmap of the drawing to the printer.
- Send to Clipboard - You can send windows metafile or bitmap to the windows
clipboard.
View Menu -
- Top View - The normal X,Y view.
- Front View - X,Z view
- Side View - Y,Z view
- ISO View - An isometric view
- Background Color - Choose the Background Color.
- Zoom - Zoom all, half, double. If you choose Window, you will be able drag
the mouse on the component to make a window around the area to zoom up onto.
- Redraw - Redraws the window.
- Axis - Draws intersecting lines on the window showing the origin location.
Draw Menu - Input a Point,
Line, or Arc
Pan and Rotate with Mouse - If the MousePan property in
CadDraw is true, then you can pan the drawing in the window by either dragging
with the middle mouse button, or holding down the ctrl key on the keyboard and
dragging with the left mouse. And you can Rotate the view by holding down the
Alt key and dragging with the left mouse.
Mouse Zoom - In the demo, rotating the mouse wheel
will zoom the view in and out.
Download CadDraw Components and Demo program for free Here
|
|