CadDraw Demo Program -

An example program using many of the features of the CadDraw component.

Using

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 Mill3.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 in inches 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 View Around - This will rotate the drawing view around the X axis and Y axis and Z axis. This doesn't elements themselves - just the view that you see. Change the numbers in the boxes and press the Update button.
- 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.

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. Not supported in Kylix.
- Save JPEG - Saves to JPEG file. Not supported in Kylix.
- 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.

www.i-logic.com