TurboCAD 4.0 Scripting API


APPLICATION

Miscellaneous Functions

TCWAppExit

TCWActiveWindow

TCWBasicRun

TCWBasicDebug

Error Functions

TCWLastErrorGet

TCWClearError

Get and Set Property Functions

TCWAppPropertyGet

TCWAppPropertySet

Drawing Management Functions

TCWDrawingNew

TCWDrawingOpen

TCWDrawingClose

TCWDrawingSave

TCWDrawingSaveAs

TCWDrawingName

TCWDrawingAt

TCWDrawingCount

TCWDrawingPrint

TCWDrawingActive

Undo and Redo Functions

TCWUndoClear

TCWUndo

TCWRedo


DRAWING

Selection Functions

TCWSelectAll

TCWDeselectAll

TCWClearSelection

TCWClearAll

TCWClearAllConstructions

Construction Line Creation Functions

TCWConstructionAngularLine

TCWConstructionHorizontalLine

TCWConstructionVerticalLine

TCWConstructionCenterAndPointCircle

TCWConstructionDoublePointCircle

TCWConstructionTriplePointCircle

Point Creation Functions

TCWDot

TCWStar

TCWSquare

TCWCross

TCWCircle

Line Creation Functions

TCWLineSingle

TCWLinePolygon

TCWLineRectangle

TCWLineRotatedRectangle

TCWLinePerpendicular

TCWLineParallel

Multi-line Creation Functions

TCWLineMultiline

TCWLineIrregularPolygon

TCWDoubleLineMultiline

TCWDoubleLineIrregularPolygon

TCWCurveBezier

TCWCurveSpline

Double Line Creation Functions

TCWDoubleLineSingle

TCWDoubleLinePolygon

TCWDoubleLineRectangle

TCWDoubleLineRotatedRectangle

TCWDoubleLinePerpendicular

TCWDoubleLineParallel

Circle and Ellipse Creation Functions

TCWCircleCenterAndPoint

TCWCircleDoublePoint

TCWEllipse

TCWEllipseRotatedEllipse

TCWEllipseFixedRatio

Arc Creation Functions

TCWArcCenterAndPoint

TCWArcDoublePoint

TCWArcTriplePoint

TCWArcElliptical

TCWArcRotatedElliptical

TCWArcEllipticalFixedRatio

Text Creation Function

TCWText

Dimension Creation Functions

TCWDimensionHorizontal

TCWDimensionHorizontalEntity

TCWDimensionVertical

TCWDimensionVerticalEntity

TCWDimensionParallel

TCWDimensionParallelEntity

Undo Record Functions

TCWUndoRecordStart

TCWUndoRecordAddGraphic

TCWUndoRecordEnd

Selection Functions

TCWSelectByQuery

TCWSelectionCount

TCWSelectionAt

TCWSelectionScale

TCWSelectionMove

TCWSelectionRotate

Block Functions

TCWBlockGet

TCWBlockCreate

TCWBlockInsert

Get and Set Property Functions

TCWDrawingPropertyGet

TCWDrawingPropertySet


GRAPHICS

Graphic Functions

TCWGraphicCount

TCWGraphicAt

TCWGraphicAppend

TCWGraphicXYZAdd

TCWGraphicClose

TCWGraphicVertexAdd

TCWVertexAppend

TCWGraphicCopy

TCWGraphicDispose

TCWGraphicCreate

TCWGraphicDraw

TCWGraphicHandleFromID

TCWGraphicReferencePointSet

TCWGraphicReferencePointGet

Selection Manipulation Functions

TCWCreateHatch

TCWGroupCreate

TCWExplode

TCWBringtoFront

TCWSendtoBack

TCWAlignBottom

TCWAlignTop

TCWAlignMiddle

TCWAlignLeft

TCWAlignRight

TCWAlignCenter

Get and Set Property Functions

TCWGraphicPropertyGet

TCWGraphicPropertySet

Vertex Functions

TCWVertexCount

TCWVertexAt

TCWVertexCreate

TCWVertexZero

TCWVertexCopy

TCWVertexDispose

TCWGetX

TCWSetX

TCWGetY

TCWSetY

TCWGetZ

TCWSetZ

TCWSetXY

TCWSetXYZ

TCWPenDown


VIEW

Functions

TCWViewAt

TCWViewCount

TCWViewActive

TCWViewRedraw

TCWViewUpdateWindow

TCWViewZoom

TCWViewZoomIn

TCWViewZoomOut

TCWViewZoomPage

TCWViewZoomExtents

TCWViewZoomWindow

TCWViewExtentsGetX1

TCWViewExtentsGetY1

TCWViewExtentsGetZ1

TCWViewExtentsGetX2

TCWViewExtentsGetY2

TCWViewExtentsGetZ2


LAYERS

Management Functions

TCWLayersCount

TCWLayersAt

TCWLayerDispose

Get and Set Property Functions

TCWLayerPropertyGet

TCWLayerPropertySet


FILE I/O

Functions

TCWOpenInput

TCWReadInputToken

TCWReadInput

TCWCloseInput

TCWOpenOutput

TCWWriteOutput

TCWCloseOutput


SCREEN

Mouse to Point Functions

TCWGetPoint

TCWVertexFindVertex

TCWVertexFindGraphic



APPLICATION - Miscellaneous Functions


TCWAppExit

This function will shutdown the application and exit. All open drawings
will be closed before exiting. If any drawings have been changed, you will
be prompted to save them before exiting.

Input Parameters

None

Return Value

None

See Also

Example

TCWAppExit


TCWActiveWindow

This function will return the active window handle. The active window is
the currently active drawing window.

Input Parameters

None

Return Value

The handle of window as a long.

See Also

Example

Dim hWindow As Long
hWindow = TCWActiveWindow()
...


TCWBasicRun

This function will launch an Enable Basic statement (passed as a String)
or load and execute an Enable basic file (if the string ends with ".bas").

Input Parameters

String scriptA statement in Enable Basic or the name of an Enable Basic file

Return Value

None

See Also

TCWBasicDebug

Example

TCWBasicRun "MsgBox" + Chr(34) + "Hello World!" + Chr(34)
TCWBasicRun "test.bas"


TCWBasicDebug

This function will launch the Enable debugger with an Enable Basic statement
(passed as a String) or load an Enable basic file (if the string ends with ".bas") into
the debugger.

Input Parameters

String script A statement in Enable Basic or the name of an Enable Basic file

Return Value

None

See Also

TCWBasicRun

Example

TCWBasicDebug "MsgBox" + Chr(34) + "Hello World!" + Chr(34)
TCWBasicDebug "test.bas"


APPLICATION - Error Functions


TCWLastErrorGet

This function will return a string for the last error that occurred in the script.

The script is responsible for checking for errors after making TCADAPI calls.
If the API call was supposed to return a handle to drawing, graphic, ...
you should check for NULL and call TCWLastErrorGet if true. If a non-null handle
was returned, then the call succeeded and you don't need to check for errors.
For Api calls that return status, 0 signifies success. Non-zero status signifies failure
and you should call TCWLastErrorGet to get the error text.

Input Parameters

String errorstringBuffer to return error string in

Return Value

Error string in string passed to the function. Function returns 0 is successful and non-zero if
their was no error to retrieve.

See Also

TCWClearError

Example

Dim result As Long
Dim errtext As String
Dim gCircle As Long
...
gCircle = TCWCircleCenterAndPoint(xc, yc, zc, xp, yp, zp)
if (gCircle = NULL) then
result = TCWLastErrorGet (errtext)
MsgBox errtext
'Terminate the program
Stop
end if
...


TCWClearError

This function will clear the error info in TCADAPI. You can use this function after
you've checked the previous TCADAPI function status. TCADAPI will clear
the error information structure at the beginning of each API function so previous
errors will be lost if you don't use TCWLastErrorGet.

Input Parameters

None

Return Value

None

See Also

Example

...
TCWClearError


APPLICATION - Get and Set Property Functions


TCWAppPropertyGet

This function will return the value of the property that has been
requested. This function is written in Basic due to problems with Enable
not supporting Variants with DLLs.

Input Parameters

String propertyname name of property look up
AVAILABLE PROPERTIES: DESCRIPTION:
"ColorButtons" buttons are color or black and white
"EditBar" viewing of the EditBar
"LargeButtons" buttons are large or small
"Organization" organization name
"OpenReadOnly" open files as read only
"PromptForSummaryInfo" promptingfor summary information on save
"Rulers" viewing of Rulers
"ScrollBars" viewing of Scroll Bars
"StatusBar" viewing of Status Bar
"ShowTooltips" show tool tips
"SaveDesktopOnExit" save desktop settings on exit
"UserName" username
"ZoomFactor" what factor to zoom when zooming in/out

Return Value

Value of property requested.
AVAILABLE PROPERTIES: VALUE RETURNED:
"ColorButtons" -1 if color buttons set, 0 if not set
"EditBar" -1 if displayed, 0 if not displayed
"LargeButtons" -1 large buttons is set, 0 if not set
"Organization" organization name as a string
"OpenReadOnly" -1 if set, 0 if not set
"PromptForSummaryInfo" -1if set, 0 if not set
"Rulers" -1 if displayed, 0 if not displayed
"ScrollBars" -1 if displayed, 0 if not displayed
"StatusBar" -1 if displayed, 0 if not displayed
"ShowTooltips" -1 if displayed, 0 if not displayed
"SaveDesktopOnExit" -1 if set, 0 if not set
"UserName" username as a string
"ZoomFactor" the zoom factor as a double

See Also

TCWAppPropertySet

Example



TCWAppPropertySet

This function will set the property with the specified value.

Input Parameters

String propertyname name of property to modify
Variant value value to set to
AVAILABLE PROPERTIES: VALUE:
"ColorButtons" 1 if color, 0 if black and white (Integer)
"EditBar" 1 if displayed, 0 if not displayed (Integer)
"LargeButtons" 1 if large buttons, 0 if small (Integer)
"Organization" organization name (String)
"OpenReadOnly" 1 if read only, 0 if not (Integer)
"PromptForSummaryInfo" 1if prompt, 0 if no prompt (Integer)
"Rulers" 1 if displayed, 0 if not (Integer)
"ScrollBars" 1 if displayed, 0 if not (Integer)
"StatusBar" 1 if displayed, 0 if not (Integer)
"ShowTooltips" 1 if show tips, 0 if not (Integer)
"SaveDesktopOnExit" 1 if save on exit, 0 if not (Integer)
"UserName" username (String)
"ZoomFactor" zoom factor (Double)

Return Value

0 if no errors
non-zero if errors, use TCWLastErrorGet to retrieve error string

See Also

TCWAppPropertyGet

Example



APPLICATION - Drawing Management Functions


TCWDrawingNew

This function will create a new TurboCAD drawing.

Input Parameters

None

Return Value

The handle to the new drawing as a long.

See Also

Example

Dim hDrawing As Long
hDrawing = TCWDrawingNew()
if (hDrawing = NULL) then
...
end if
...


TCWDrawingOpen

This function will open a drawing in any TurboCAD supported format. The format
is based on the file extension (.tcw, .dxf, .dwg...).

Input Parameters

String drawingname name of drawing to open

Return Value

The handle to the opened drawing as a long.

See Also

Example

Dim hDrawing As Long
hDrawing = TCWDrawingOpen("c:\mydrawings\pipes.tcw")
if (hDrawing = NULL) then
'check error
...


TCWDrawingClose

This function will close the current drawing. If the file has changed since
it was last saved, the value of savechanges will determine if the file is saved
first before closing.

Input Parameters

Long savechanges 1 if save changes before closing, 0 to not save changes

Return Value

0 if no errors. Non-zero if an error occurred. Use TCWLastErrorGet to retrieve
error string.

See Also

Example

...
result = TCWDrawingClose(1)
if (result <> 0) then
'check error
...


TCWDrawingSave

This function will save the current drawing to disk using the file and folder
name that was previously used. If this is the first time the file has been
saved, you will be prompted with the SaveAs dialog, prompting you for a name
and location to save the file. If you have Prompt for Summary Info in the
Options|Program Setup|General property sheet selected, you will be prompted to
input summary information.

Input Parameters

None

Return Value

0 if no errors. Non-zero if an error occurred. Use TCWLastErrorGet to retrieve
error string.

See Also

TCWDrawingSaveAs

Example

...
result = TCWDrawingSave()
if (result <> 0)
'check error
...


TCWDrawingSaveAs

This function will save the current drawing to disk using a file name and folder
you specify. The SaveAs dialog box will be displayed and you can input name,
location, etc. If you have Prompt for Summary Info in the
Options|Program Setup|General property sheet selected, you will be prompted to
input summary information.

Input Parameters

String drawingname new name of drawing

Return Value

0 if no errors. Non-zero if an error occurred. Use TCWLastErrorGet to retrieve
error string.

See Also

TCWDrawingSave

Example

...
result = TCWDrawingSaveAs("newdrawing.tcw")
if (result <> 0) then
'check error
...


TCWDrawingName

This function will return the name of the drawing associated with the active
drawing. If the drawing is a new drawing that has not been saved, this function
will return the drawing title (e.g. Drawing1). This function can be used with TCWDrawingAt and TCWDrawingCount.
If you have only one drawing open, you can use TCWDrawingName(name) and it will
return the name of the current drawing. If you have multiple drawings open,
use TCWDrawingCount to find out how many are open, then use TCWDrawingAt and TCWDrawingName
to cycle through the drawings to get the name of each.

Input Parameters

String drawingname buffer for drawing name

Return Value

0 if no errors. Non-zero if an error occurred. Use TCWLastErrorGet to retrieve
error string.

See Also

TCWDrawingCount, TCWDrawingAt

Example

Dim dCount As Long
Dim hDrawing As Long
Dim i As Long
Dim dName As String
dCount = TCWDrawingCount()
if (dCount = 0) then
MsgBox "No drawings open."
Stop
end if
for i = 1 to dCount
hDrawing = TCWDrawingAt(i)
TCWDrawingName dName
MsgBox dName
next i
...


TCWDrawingAt

This function will activate the drawing specified. This function is used
with TCWDrawingCount to get the number of drawings open in the application.
If you have multiple drawings open, you can use TCWDrawingCount to get the
number of drawings, then use TCWDrawingAt to change the active drawing.

Input Parameters

Long index number associated with the open drawing

Return Value

The handle to the drawing as a long.

See Also

TCWDrawingName, TCWDrawingCount

Example

Dim dCount As Long
Dim i As Long
Dim hDrawing As Long
dCount = TCWDrawingCount()
for i = 1 to dCount
hDrawing = TCWDrawingAt(i)
...
next i
...


TCWDrawingCount

This function will return the number of open drawings. Used with
TCWDrawingName and TCWDrawingAt to cycle through the open drawings.

Input Parameters

None

Return Value

Number of open drawings in TurboCAD as a long.

See Also

TCWDrawingName, TCWDrawingAt

Example

Dim dCount As Long
Dim i As Long
Dim hDrawing As Long
dCount = TCWDrawingCount()
for i = 1 to dCount
hDrawing = TCWDrawingAt(i)
...
next i
...


TCWDrawingPrint

This function will print the current drawing. Set showdialog to TRUE if
you want to see the print dialog box and have access to the page setup
parameters.

Input Parameters

Long showdialog 1 to show print dialog box, 0 if no print dialog box

Return Value

0 if no errors. Non-zero if an error occurred. Use TCWLastErrorGet to retrieve
error string.

See Also

Example

...
result = TCWDrawingPrint(0)
...


TCWDrawingActive

This function will return the handle of the active drawing.

Input Parameters

None

Return Value

Handle of active drawing as a Long.

See Also

Example

Dim hDrawing As Long
hDrawing = TCWDrawingActive()
if (hDrawing = NULL) then
Msgbox "No active drawing".
...


APPLICATION - Undo and Redo Functions


TCWUndoClear

This function will delete all the undo records in the current drawing. You will
not be able to Redo any previous actions after making this call.

Input Parameters

None

Return Value

0 if no errors. Non-zero if an error occurred. Use TCWLastErrorGet to retrieve
error string.

See Also

TCWUndo, TCWRedo

Example

...
result = TCWUndoClear()
...


TCWUndo

This function will reverse the last n changes in the current drawing.

Input Parameters

long n number of changes to undo

Return Value

0 if no errors. Non-zero if an error occurred. Use TCWLastErrorGet to retrieve
error string.

See Also

TCWUndoClear, TCWRedo

Example

...
result = TCWUndo(2) 'undo last 2 operations


TCWRedo

This function will reverse the effect of the last undo.

Input Parameters

None

Return Value

0 if no errors. Non-zero if an error occurred. Use TCWLastErrorGet to retrieve
error string.

See Also

TCWUndoClear, TCWUndo

Example

...
result = TCWRedo() 'oops - get it back!


DRAWING - Selection Functions


TCWSelectAll

This function selects the all graphics in the drawing.

Input Parameters

None

Return Value

0 if no errors. There was at least one graphic to select.
Non-zero if errors or no graphics to select. Use TCWLastErrorGet to see if there
was an error.

See Also

TCWDeselectAll

Example

...
result = TCWSelectAll()
if (result = 0) then
'change all graphics to have PenColor Red
...


TCWDeselectAll

This function will deselect all selected graphics.

Input Parameters

None

Return Value

0 if no errors. At least one graphic was deselected.
Non-zero if errors or no graphics to deselect. Use TCWLastErrorGet see if there was
an error.

See Also

TCWSelectAll

Example

...
result = TCWDeselectAll()
...


TCWClearSelection

This function will delete all selected graphics.

Input Parameters

None

Return Value

0 if no errors. At least one graphic was deleted.
Non-zero if errors or no graphics to delete. Use TCWLastErrorGet to see if there was
an error.

See Also

TCWClearAll

Example

select all graphics with type = circle
TCWSelectByQuery("type = circle")
result = TCWClearSelection()
...


TCWClearAll

This function will delete all graphics in the current drawing.

This deletes every graphic, not just what is selected. To only delete
selected graphics, see TCWClearSelection.

Input Parameters

None

Return Value

0 if no errors. At least one graphic was deleted.
Non-zero if errors or no graphics to delete. Use TCWLastErrorGet to see if there was
an error.

See Also

TCWClearSelection

Example

...
result = TCWClearAll()
...


TCWClearAllConstructions

This function will delete all construction graphics in the current drawing.

Input Parameters

None

Return Value

0 if no errors. At least one graphic was deleted.
Non-zero if errors or no graphics to delete. Use TCWLastErrorGet to see if there was
an error.

See Also

Example

...
TCWClearAllConstructions()
...


DRAWING - Construction Line Creation Functions


TCWConstructionAngularLine

This function will draw a construction line at the specified angle.

Input Parameters

Double x0 X coordinate of the first point
Double y0 Y coordinate of the first point
Double z0 Z coordinate of the first point
Double x1 X coordinate of the second point
Double y1 Y coordinate of the second point
Double z1 Z coordinate of the second point

Return Value

Returns the handle to the construction line as a long.

See Also

Example

Dim hConstr As Long
...
hConstr = TCWConstructionAngularLine(x1, y1, z1, x2, y2, z2)
if (hConstr = NULL) then
'check error
...


TCWConstructionHorizontalLine

This function will draw a horizontal construction line.

Input Parameters

Double x0 X coordinate of point on the line
Double y0 Y coordinate of point on the line
Double z0 Z coordinate of point on the line

Return Value

Returns the handle to the construction line as a Long.

See Also

Example

Dim hConstr As Long
Dim xc As Double
Dim yc As Double
'get center of view for construction line placement
xc = (TCWViewExtentsGetX1() + TCWViewExtentsGetX2())/2
yc = (TCWViewExtentsGetY1() + TCWViewExtentsGetY2())/2
hConstr = TCWConstructionHorizontalLine(xc, yc, 0.0)
if (hConstr = NULL) then
'check error
...


TCWConstructionVerticalLine

This function will draw a vertical construction line.

Input Parameters

Double x0 X coordinate of point on the line
Double y0 Y coordinate of point on the line
Double z0 Z coordinate of point on the line

Return Value

Returns the handle to the construction line as a Long.

See Also

Example

Dim hConstr As Long
Dim xc As Double
Dim yc As Double
'get center of view for construction line placement
xc = (TCWViewExtentsGetX1() + TCWViewExtentsGetX2())/2
yc = (TCWViewExtentsGetY1() + TCWViewExtentsGetY2())/2
hConstr = TCWConstructionVerticalLine(xc, yc, 0.0)
if (hConstr = NULL) then
'check error
...


TCWConstructionCenterAndPointCircle

This function will draw a construction circle defined by its centerpoint
and a point on its perimeter.

Input Parameters

Double x0 X coordinate of the center point
Double y0 Y coordinate of the center point
Double z0 Z coordinate of the center point
Double x1 X coordinate of the perimeter point
Double y1 Y coordinate of the perimeter point
Double z1 Z coordinate of the perimeter point

Return Value

Returns the handle to the construction line as a Long.

See Also

Example



TCWConstructionDoublePointCircle

This function will draw a construction circle that passes through two defined
points 180 degrees apart.

Input Parameters

Double x0 X coordinate of the first point
Double y0 Y coordinate of the first point
Double z0 Z coordinate of the first point
Double x1 X coordinate of the second point
Double y1 Y coordinate of the second point
Double z1 Z coordinate of the second point

Return Value

Returns the handle to the construction line as a Long.

See Also

Example



TCWConstructionTriplePointCircle

This function will draw a construction circle that passes through three
defined points.

Input Parameters

Double x0 X coordinate of the first point
Double y0 Y coordinate of the first point
Double z0 Z coordinate of the first point
Double x1 X coordinate of the second point
Double y1 Y coordinate of the second point
Double z1 Z coordinate of the second point
Double x2 X coordinate of the third point
Double y2 Y coordinate of the third point
Double z2 Z coordinate of the third point

Return Value

Returns the handle to the construction line as a Long.

See Also

Example



DRAWING - Point Creation Functions


TCWDot

This function will create a point that is a "dot".

Input Parameters

Double x0 X coordinate for the point
Double y0 Y coordinate for the point
Double z0 Z coordinate for the point

Return Value

Returns the handle to the point graphic as a Long.

See Also

TCWStar, TCWSquare, TCWCross, TCWCircle

Example

Dim hGraphic As Long
hGraphic = TCWDot(2.0, 3.0, 0.0)
if (hGraphic = NULL)
'check error
...


TCWStar

This function will create a point that is a "star".

Input Parameters

Double x0 X coordinate for the point
Double y0 Y coordinate for the point
Double z0 Z coordinate for the point

Return Value

Returns the handle to the point graphic as a Long.

See Also

TCWDot, TCWSquare, TCWCross, TCWCircle

Example

Dim hGraphic As Long
hGraphic = TCWStar(2.0, 3.0, 0.0)
if (hGraphic = NULL)
'check error
...


TCWSquare

This function will create a point that is a "square".

Input Parameters

Double x0 X coordinate for the point
Double y0 Y coordinate for the point
Double z0 Z coordinate for the point

Return Value

Returns the handle to the point graphic as a Long.

See Also

TCWDot, TCWStar, TCWCross, TCWCircle

Example

Dim hGraphic As Long
hGraphic = TCWSquare(2.0, 3.0, 0.0)
if (hGraphic = NULL)
'check error
...


TCWCross

This function will create a point that is a "cross".

Input Parameters

Double x0 X coordinate for the point
Double y0 Y coordinate for the point
Double z0 Z coordinate for the point

Return Value

Returns the handle to the point graphic as a Long.

See Also

TCWDot, TCWStar, TCWSquare, TCWCircle

Example

Dim hGraphic As Long
hGraphic = TCWCross(2.0, 3.0, 0.0)
if (hGraphic = NULL)
'check error
...


TCWCircle

This function will create a point that is a "circle".

Input Parameters

Double x0 X coordinate for the point
Double y0 Y coordinate for the point
Double z0 Z coordinate for the point

Return Value

Returns the handle to the point graphic as a Long.

See Also

TCWDot, TCWStar, TCWSquare, TCWCross

Example

Dim hGraphic As Long
hGraphic = TCWCircle(2.0, 3.0, 0.0)
if (hGraphic = NULL)
'check error
...


DRAWING - Line Creation Functions


TCWLineSingle

This function will draw a single line segment from two specified end points.

Input Parameters

Double x0 X coordinate for the first point
Double y0 Y coordinate for the first point
Double z0 Z coordinate for the first point
Double x1 X coordinate for the second point
Double y1 Y coordinate for the second point
Double z1 Z coordinate for the second point

Return Value

Returns the handle to the line graphic as a Long.

See Also

Example



TCWLinePolygon

This function will draw a regular polygon with the specified number
of sides.

Input Parameters

Double x0 X coordinate for the center point
Double y0 Y coordinate for the center point
Double z0 Z coordinate for the center point
Double x1 X coordinate for the corner point
Double y1 Y coordinate for the corner point
Double z1 Z coordinate for the corner point
Long nsides number of sides

Return Value

Returns the handle of the polygon graphic as a Long. The polygon is
constructed such that it would fit exactly inside a circle with
the same center and radius.

See Also

Example



TCWLineRectangle

This function will draw an orthogonal rectangle.

Input Parameters

Double x0 X coordinate of the upper left corner
Double y0 Y coordinate of the upper left corner
Double z0 Z coordinate of the upper left corner
Double x1 X coordinate of the lower right corner
Double y1 Y coorindate of the lower right corner
Double z1 Z coorindate of the lower right corner

Return Value

Returns the handle of a Graphic as a Long with contains 5 vertices.

See Also

Example



TCWLineRotatedRectangle

This function will draw a rectangle oriented at the specified angle.

Input Parameters

Double x0 X coordinate of the upper left corner
Double y0 Y coordinate of the upper left corner
Double z0 Z coordinate of the upper left corner
Double x1 X coordinate of the lower right corner
Double y1 Y coorindate of the lower right corner
Double z1 Z coorindate of the lower right corner
Double height angle of rotation in radians

Return Value

Returns a handle to a graphic with 5 vertices in the shape of a rectangle. The
return value is a long. The fifth vertex is equal to the first. The two points
are the ends of the base edge. The height of the rectangle is drawn in the direction
that would be a "right turn" when traveling from the first point to the second.

See Also

Example



TCWLinePerpendicular

This function will draw a line perpendicular to an existing line.

Input Parameters

Long g handle of line to make new line perpendicular to
Double x0 X coordinate of the point on the existing line
Double y0 Y coordinate of the point on the existing line
Double z0 Z coordinate of the point on the existing line

Return Value

Returns the handle of the perpendicular line as a Long.

See Also

Example



TCWLineParallel

This function will draw a line parallel to an existing line, at a
specified distance from the line.

Input Parameters

Long g handle of line to make new line parallel to
Double x0 X coordinate of the new line
Double y0 Y coordinate of the new line
Double z0 Z coordinate of the new line

Return Value

Returns the handle to the new parallel line as a Long.

See Also

Example



DRAWING - Multi-line Creation Functions


TCWLineMultiline

This function will start the creation of a series of connected segments.

Use TCWGraphicXYZAdd or TCWGraphicVertexAdd to define the next segment.
Use TCWGraphicClose to close the multi-line into a polygon.

Input Parameters

Double x0 X coordinate of first end point
Double y0 Y coordinate of first end point
Double z0 Z coordinate of first end point

Return Value

Returns the handle to the graphic as a Long.

See Also

TCWGraphicClose, TCWGraphicXYZAdd, TCWGraphicVertexAdd

Example



TCWLineIrregularPolygon

This function will start the creation of an irregular polygon.

Use TCWGraphicXYZAdd or TCWGraphicVertexAdd to define the next point of the polygon.
Use TCWGraphicClose to close the multi-line into the polygon.

Input Parameters

Double x0 X coordinate of first end point
Double y0 Y coordinate of first end point
Double z0 Z coordinate of first end point

Return Value

Returns the handle to the first segment as a Long.

See Also

TCWGraphicClose, TCWGraphicXYZAdd, TCWGraphicVertexAdd

Example



TCWDoubleLineMultiline

This function will start the creation of a series of connected double lines.

Use TCWGraphicXYZAdd or TCWGraphicVertexAdd to define the next point of the segment.
Use TCWGraphicClose to close the multi-double line into a polygon.

Input Parameters

Double x0 X coordinate of first end point
Double y0 Y coordinate of first end point
Double z0 Z coordinate of first end point

Return Value

Returns the handle to the graphic as a Long.

See Also

TCWGraphicClose, TCWGraphicXYZAdd, TCWGraphicVertexAdd

Example



TCWDoubleLineIrregularPolygon

This function will start the creation of a double line polygon with an
arbitrary number of sides.

Use TCWGraphicXYZAdd or TCWGraphicVertexAdd to define the next segment.
Use TCWGraphicClose to close the multi-line into a polygon.

Input Parameters

Double x0 X coordinate of first end point
Double y0 Y coordinate of first end point
Double z0 Z coordinate of first end point

Return Value

Returns the handle to the graphic as a long.

See Also

TCWGraphicClose, TCWGraphicXYZAdd, TCWGraphicVertexAdd

Example



TCWCurveBezier

This function will start the creation of a bezier curve, connecting
two end points that will gravitate toward control points along the path.

Use TCWGraphicClose to close the bezier curve, matching the last end point
with the first end point.

Input Parameters

Double x0 X coordinate of the first end point
Double y0 Y coordinate of the first end point
Double z0 Z coordinate of the first end point

Return Value

Returns the handle to the graphic as a Long.

See Also

TCWGraphicClose, TCWGraphicXYZAdd, TCWGraphicVertexAdd

Example



TCWCurveSpline

This function will start the creation of a spline curve, connecting
a series of points into a continuous curve.

Use TCWGraphicClose to close the spline curve, matching the last end point
with the first end point.

Input Parameters

Double x0 X coordinate of the first end point
Double y0 Y coordinate of the first end point
Double z0 Z coordinate of the first end point

Return Value

Returns the handle to the graphic as a Long.

See Also

TCWGraphicClose, TCWGraphicXYZAdd, TCWGraphicVertexAdd

Example



DRAWING - Double Line Creation Functions


TCWDoubleLineSingle

This function will draw a double line segment from two specified end points.

Input Parameters

Double x0 X coordinate for the first point
Double y0 Y coordinate for the first point
Double z0 Z coordinate for the first point
Double x1 X coordinate for the second point
Double y1 Y coordinate for the second point
Double z1 Z coordinate for the second point

Return Value

Returns the handle to the double line as a Long.

See Also

Example



TCWDoubleLinePolygon

This function will draw a regular double line polygon with the specified
number of sides.

Input Parameters

Double x0 X coordinate for the center point
Double y0 Y coordinate for the center point
Double z0 Z coordinate for the center point
Double x1 X coordinate for the corner point
Double y1 Y coordinate for the corner point
Double z1 Z coordinate for the corner point
Long nsides number of sides

Return Value

Returns the handle of the polygon graphic as a Long. The polygon is
constructed such that it would fit exactly inside a circle with the same
center and radius.

See Also

Example



TCWDoubleLineRectangle

This function will draw an orthogonal double line rectangle.

Input Parameters

Double x0 X coordinate of the upper left corner
Double y0 Y coordinate of the upper left corner
Double z0 Z coordinate of the upper left corner
Double x1 X coordinate of the lower right corner
Double y1 Y coorindate of the lower right corner
Double z1 Z coorindate of the lower right corner

Return Value

Returns the handle of a graphic with 5 vertices. The return value is a Long.

See Also

Example



TCWDoubleLineRotatedRectangle

This function will draw a double line rectangle oriented at the specified angle.

Input Parameters

Double x0 X coordinate of the upper left corner
Double y0 Y coordinate of the upper left corner
Double z0 Z coordinate of the upper left corner
Double x1 X coordinate of the lower right corner
Double y1 Y coorindate of the lower right corner
Double z1 Z coorindate of the lower right corner
Double height angle of rotation in radians

Return Value

Returns a handle to a graphic with 5 vertices in the shape of a rectangle.
The fifth vertex is equal to the first. The two points are the ends of the
base edge. The height of the rectangle is drawn in the direction that would
be a "right turn" when traveling from the first point to the second.

See Also

Example



TCWDoubleLinePerpendicular

This function will draw a double line perpendicular to an existing line.

Input Parameters

Long g handle of line to make new line perpendicular to
Double x0 X coordinate of the point on the existing line
Double y0 Y coordinate of the point on the existing line
Double z0 Z coordinate of the point on the existing line
Double x1 X coordinate of the second point on the new line
Double y1 Y coordinate of the second point on the new line
Double z1 Z coordinate of the second point on the new line

Return Value

Returns the handle of the perpendicular double line as a Long.

See Also

Example



TCWDoubleLineParallel

This function will draw a double line parallel to an existing line, at a
specified distance from the line.

Input Parameters

Long g handle of line to make new line parallel to
Double x0 X coordinate of the new line
Double y0 Y coordinate of the new line
Double z0 Z coordinate of the new line

Return Value

Returns the handle to the new parallel line as a Long.

See Also

Example



DRAWING - Circle and Ellipse Creation Functions


TCWCircleCenterAndPoint

This function will draw a circle from the specified center point and radius.

Input Parameters

Double x0 X coordinate of the center point
Double y0 Y coordinate of the center point
Double z0 Z coordinate of the center point
Double x1 X coordinate of the radius point
Double y1 Y coordinate of the radius point
Double z1 Z coordinate of the radius point

Return Value

Returns the handle to the circle as a Long.

See Also

Example



TCWCircleDoublePoint

This function will draw a circle using two opposite points on its perimeter.

Input Parameters

Double x0 X coordinate of the first point
Double y0 Y coordinate of the first point
Double z0 Z coordinate of the first point
Double x1 X coordinate of the second point
Double y1 Y coordinate of the second point
Double z1 Z coordinate of the second point

Return Value

Returns the handle to the circle as a Long.

See Also

Example



TCWEllipse

This function will draw an ellipse by defining its bounding rectangle.

Input Parameters

Double x0 X coordinate of bounding rectangle's upper left corner
Double y0 Y coordinate of bounding rectangle's upper left corner
Double z0 Z coordinate of bounding rectangle's upper left corner
Double x1 X coordinate of bounding rectangle's lower right corner
Double y1 Y coordinate of bounding rectangle's lower right corner
Double z1 Z coordinate of bounding rectangle's lower right corner

Return Value

Returns the handle to the ellipse as a Long.

See Also

Example



TCWEllipseRotatedEllipse

This function will draw an ellipse rotated by specifying the ellipse's
center point, and major and minor axis radius points.

Input Parameters

Double x0 X coordinate of ellipse's center point
Double y0 Y coordinate of ellipse's center point
Double z0 Z coordinate of ellipse's center point
Double x1 X coordinate of major axis radius point
Double y1 Y coordinate of major axis radius point
Double z1 Z coordinate of major axis radius point
Double x2 X coordinate of minor axis radius point
Double y2 Y coordinate of minor axis radius point
Double z2 Z coordinate of minor axis radius point

Return Value

Returns the handle of the rotated ellipse as a Long.

See Also

Example



TCWEllipseFixedRatio

This function will draw an ellipse, specified by the ratio of the
major axis length to the minor axis length.

Input Parameters

Double x0 X coordinate of ellipse's center point
Double y0 Y coordinate of ellipse's center point
Double z0 Z coordinate of ellipse's center point
Double x1 X coordinate of radius in Y direction
Double y1 Y coordinate of radius in Y direction
Double z1 Z coordinate of radius in Y direction
Double xyratioratio of Rx/Ry

Return Value

Returns the handle to the ellipse as a Long.

See Also

Example



DRAWING - Arc Creation Functions


TCWArcCenterAndPoint

This function will draw a circular arc specified by it's center point,
point on it's circuference and a start and end angle.

Input Parameters

Double x0 X coordinate of arc's center point
Double y0 Y coordinate of arc's center point
Double z0 Z coordinate of arc's center point
Double x1 X coordinate of the radius point
Double y1 Y coordinate of the radius point
Double z1 Z coordinate of the radius point
Double startanglestarting angle in radians
Double endangleending angle in radians

Return Value

Returns the handle of the arc as a Long.

See Also

Example



TCWArcDoublePoint

This function will draw a circular arc from specified end points
of its diameter.

Input Parameters

Double x0 X coordinate of first end point
Double y0 Y coordinate of first end point
Double z0 Z coordinate of first end point
Double x1 X coordinate of second end point
Double y1 Y coordinate of second endpont
Double z1 Z coordinate of second end point
Double startanglestarting angle in radians
Double endangleending angle in radians

Return Value

Returns the handle to the arc as a Long.

See Also

Example



TCWArcTriplePoint

This function will draw a circular arc by defining (1) its starting
point, (2) a point on its perimeter and (3) its ending point.

Input Parameters

Double x0 X coordinate of starting point
Double y0 Y coordinate of starting point
Double z0 Z coordinate of starting point
Double x1 X coordinate of point on perimeter
Double y1 Y coordinate of point on perimeter
Double z1 Z coordinate of point on perimeter
Double x2 X coordinate of ending point
Double y2 Y coordinate of ending point
Double z2 Z coordinate of ending point

Return Value

Returns the handle to the arc as as Long.

See Also

Example



TCWArcElliptical

This function will draw an elliptical arc specified by its bounding
rectangle, starting and ending angles.

Input Parameters

Double x0 X coordinate of bounding rectangle's upper left corner
Double y0 Y coordinate of bounding rectangle's upper left corner
Double z0 Z coordinate of bounding rectangle's upper left corner
Double x1 X coordinate of bounding rectangle's lower right corner
Double y1 Y coordinate of bounding rectangle's lower right corner
Double z1 Z coordinate of bounding rectangle's lower right corner
Double startanglestarting angle in radians
Double endangleending angle in radians

Return Value

Returns a handle to the elliptical arc as a Long.

See Also

Example



TCWArcRotatedElliptical

This function will draw an elliptical arc rotated by specifying the ellipse's
center point, and major and minor axis radius points, start and end angles.

Input Parameters

Double x0 X coordinate of elliptical arc's center point
Double y0 Y coordinate of elliptical arc's center point
Double z0 Z coordinate of elliptical arc's center point
Double x1 X coordinate of major axis radius point
Double y1 Y coordinate of major axis radius point
Double z1 Z coordinate of major axis radius point
Double x2 X coordinate of minor axis radius point
Double y2 Y coordinate of minor axis radius point
Double z2 Z coordinate of minor axis radius point
Double startanglestarting angle in radians
Double endangleending angle in radians

Return Value

Returns the handle of the rotated elliptical arc as a Long.

See Also

Example



TCWArcEllipticalFixedRatio

This function will draw an elliptical arc, specified by the ratio of the
major axis length to the minor axis length.

Input Parameters

Double x0 X coordinate of ellipse's center point
Double y0 Y coordinate of ellipse's center point
Double z0 Z coordinate of ellipse's center point
Double x1 X coordinate of radius in Y direction
Double y1 Y coordinate of radius in Y direction
Double z1 Z coordinate of radius in Y direction
Double xyratioratio of Rx/Ry
Double startanglestarting angle in radians
Double endangleending angle in radians

Return Value

Returns the handle to the ellipse as a Long.

See Also

Example



DRAWING - Text Creation Function


TCWText

This function will create text starting at the point specified.

Input Parameters

Double x0 X coordinate of text's starting point
Double y0 Y coordinate of text's starting point
Double z0 Z coordinate of text's starting point
String textstrtext string
Double size font size
Double angle angle of text

Return Value

Returns a handle to the text.

See Also

Example



DRAWING - Dimension Creation Functions


TCWDimensionHorizontal

This function will create a linear dimension showing horizontal distance.

Input Parameters

Double x0 X coordinate of first extension line
Double y0 Y coordinate of first extension line
Double z0 Z coordinate of first extension line
Double x1 X coordinate of second extension line
Double y1 Y coordinate of second extension line
Double z1 Z coordinate of second extension line
Double x2 X coordinate of dimension
Double y2 Y coordinate of dimension
Double z2 Z coordinate of dimension

Return Value

Returns the handle to the dimension as a Long.

See Also

Example



TCWDimensionHorizontalEntity

This function will create a linear dimension showing horizontal distance.

Input Parameters

Long g entity to horizontally dimension
Double x0 X coordinate for dimension line location
Double y0 Y coordinate for dimension line location
Double z0 Z coordinate for dimension line location

Return Value

Returns the handle to the dimension as a Long.

See Also

Example



TCWDimensionVertical

This function will create a linear dimension showing vertical distance.

Input Parameters

Double x0 X coordinate of first extension line
Double y0 Y coordinate of first extension line
Double z0 Z coordinate of first extension line
Double x1 X coordinate of second extension line
Double y1 Y coordinate of second extension line
Double z1 Z coordinate of second extension line
Double x2 X coordinate of dimension
Double y2 Y coordinate of dimension
Double z2 Z coordinate of dimension

Return Value

Returns the handle to the dimension as a Long.

See Also

Example



TCWDimensionVerticalEntity

This function will create a linear dimension showing vertical distance.

Input Parameters

Long g entity to vertically dimension
Double x0 X coordinate for dimension line location
Double y0 Y coordinate for dimension line location
Double z0 Z coordinate for dimension line location

Return Value

Returns the handle to the dimension as a Long.

See Also

Example



TCWDimensionParallel

This function will create a linear dimension showing absolute distance
between two points.

Input Parameters

Double x0 X coordinate of first extension line
Double y0 Y coordinate of first extension line
Double z0 Z coordinate of first extension line
Double x1 X coordinate of second extension line
Double y1 Y coordinate of second extension line
Double z1 Z coordinate of second extension line
Double x2 X coordinate of dimension
Double y2 Y coordinate of dimension
Double z2 Z coordinate of dimension

Return Value

Returns the handle to the dimension as a Long.

See Also

Example



TCWDimensionParallelEntity

This function will create a linear dimension showing parallel distance.

Input Parameters

Long g entity to dimension
Double x0 X coordinate for dimension line location
Double y0 Y coordinate for dimension line location
Double z0 Z coordinate for dimension line location

Return Value

Returns the handle to the dimension as a Long.

See Also

Example



DRAWING - Undo Record Functions


TCWUndoRecordStart

This function will start an undo record. NOTE: a start record MUST be matched
with an end record.

Input Parameters

Long d handle of a drawing
String title string to associate with undo record

Return Value

0 if no errors. Non-zero if an error occurred. Use TCWLastErrorGet to retrieve
error string.

See Also

TCWUndoRecordAddGraphic, TCWUndoRecordEnd

Example



TCWUndoRecordAddGraphic

This function will add graphics to the undo record. Use this
function to accumulate graphics that you may want to undo.

Input Parameters

Long d handle of a drawing
Long g graphic to add to undo record

Return Value

0 if no errors. Non-zero if an error occurred. Use TCWLastErrorGet to retrieve
error string.

See Also

TCWUndoRecordStart, TCWUndoRecordEnd

Example



TCWUndoRecordEnd

This function will close an opened undo record.

Input Parameters

Long d handle of a drawing

Return Value

0 if no errors. Non-zero if an error occurred. Use TCWLastErrorGet to retrieve
error string.

See Also

TCWUndoRecordStart, TCWUndoRecordAddGraphic

Example



DRAWING - Selection Functions


TCWSelectByQuery

This function will select graphics based on specified criteria. The query
language is defined as follows:

"query" -> "expr"
"expr" -> "expr" OR "expr" | "expr" AND "expr" | ("expr") |
NOT "expr" | "atom"
"atom" -> ALL | SELECTED | "field_name" "relation" "value"
"rel" -> = | <> | < | <= | > | >=
"field_name" -> "string" | "any_string"
"value" -> "string" | "any_string"
"string" -> string without spaces which is not a keyword and doesn't
have any reserved characters
"any_string" -> string without any double quote marks, may have spaces

Keywords for query are:
ALL, SELECTED, OR, AND, NOT

Reserved characters are:
=, <, >, ", (, )

Precedence (in decending order):
()
NOT
AND
OR

Input Parameters

String s string for search
An emptyquery is equivalent to SELECTED. Use TCWSelectionCount and TCWSelectionAt
to cyclethrough the selected graphics.

Return Value

First graphic in the selection as a Long.

See Also

Example

Dim hGraphic As Long
'This query adds all elements from the electrical layer to the current selection
hGraphic = TCWSelectByQuery("SELECTED OR Layer = electrical")
if (hGraphic = NULL) then
MsgBox "No graphics met criteria".
Stop
...


TCWSelectionCount

This function will return a count of the number of graphics currently
selected.

Input Parameters

None

Return Value

The number of graphics that are currently selected as a Long.

See Also

TCWSelection, TCWSelectByQuery

Example



TCWSelectionAt

This function will return the handle of the requested graphic. The index
should be a number from 1 to the value returned by TCWSelectionCount.

Input Parameters

Long index requested select graphic index

Return Value

The handle of the graphic as a Long.

See Also

TCWSelectionCount

Example



TCWSelectionScale

Will scale the selected graphics in the x, y and z direction. A value of 1.0 in
any parameter will not change the scale.

Input Parameters

Double xscale X scale factor
Double yscale Y scale factor
Double zscale Z scale factor
Double x0 x coordinate of reference point
Double y0 y coordinate of reference point
Double z0 z coordinate of reference point

Return Value

0 if no errors. Non-zero if an error occurred. Use TCWLastErrorGet to retrieve
error string.

See Also

Example



TCWSelectionMove

This function will move the selected graphic to the new coordinates.

Input Parameters

Double dx delta x coordinate to move selected graphic
Double dy delta y coordinate to move selected graphic
Double dz delta z coordinate to move selected graphic

Return Value

0 if no errors. Non-zero if an error occurred. Use TCWLastErrorGet to retrieve
error string.

See Also

Example



TCWSelectionRotate

This function will rotate the selected graphics by the rotation angle
supplied.

Input Parameters

String axis "X", "Y", or "Z" where "X" means rotate in the Y-Z plane
Double angle rotation angle in radians
Double x0 x coordinate of reference point
Double y0 y coordinate of reference point
Double z0 z coordinate of reference point

Return Value

0 if no errors. Non-zero if an error occurred. Use TCWLastErrorGet to retrieve
error string.

See Also

Example



DRAWING - Block Functions


TCWBlockGet

This function will return the handle of a block with the specified
block name.

Input Parameters

String blockname name of block to return

Return Value

Handle of the block as a Long.

See Also

Example



TCWBlockCreate

This function will create a block from the selected graphics. The block
will be named from the name specified. Normally when you create a block
from selected graphics, the graphics will be removed from the drawing and
the newly created block will be add to the block table. If you want to
keep the original selected graphics around (as separate graphics) then set
the copy parameter to TRUE. If you want to remove the original selected
graphics and have then replaced with the new block then set the blockinsert
parameter to TRUE.

Input Parameters

String blocknamestring for block name

Return Value

0 if no errors. Non-zero if an error occurred. Use TCWLastErrorGet to retrieve
error string.

See Also

Example



TCWBlockInsert

This function will insert a block into the drawing.

Input Parameters

String blocknameblock name to insert
Double x0 x coordinate for where to insert block
Double y0 y coordinate for where to insert block
Double z0 z coordinate for where to insert block

Return Value

Returns the handle to the new instance of the block as a Long.

See Also

Example



DRAWING - Get and Set Property Functions


TCWDrawingPropertyGet

This function will return the value of the property that has been
requested. This function is written in Basic due to problems with Enable
not supporting Variants with DLLs.

Input Parameters

String propertyname name of property look up
AVAILABLE PROPERTIES: DESCRIPTION:
"GridType" tbd
"GridStyle" tbd
"GridSpacingX" tbd
"GridSpacingY" tbd
"GridColorMajor" tbd
"GridColorMinor" tbd
"GridShow" tbd
"GridFrequencyX" tbd
"GridFrequencyY" tbd
"GridMinorX" tbd
"GridMinorY" tbd
"GridOriginX" tbd
"GridOriginY" tbd
"GridOriginBase" tbd
"PenColor" pen color as &H00bbggrr
"PenWidth" pen width as a Double
"PenScale" pen scale as a Double
"PenStyle" pen style as a Integer
"BrushColor" brush color as &H00bbggrr
"BrushScale" brush scale as a Double
"BrushAngle" brush angle as a Double
"BrushStyle" brush style as a Double
"TextStyle" text style as an Integer
"ScaleSystem" scale system as an Integer
"BrushDrawMode" brush drawing mode as n Integer
"PenAlignment" pen alignment as a String
"HatchCross" hatch cross as an Integer
"Layer" layer id as an Integer
"Info" info string as a String
"TextFont" text font as a String
"TextFormat" text format as an Integer
"TextSize" text size as a Double

Return Value

Value of property requested.
AVAILABLE PROPERTIES: VALUE RETURNED:
"PenColor" &H00bbggrr (Long)
"PenWidth" (Double)
"PenScale" (Double)
"PenStyle" (Integer)
"BrushColor" &H00bbggrr (Long)
"BrushScale" (Double)
"BrushAngle" (Double)
"BrushStyle" (Double)
"TextStyle" (Integer)
"ScaleSystem" (Integer)
"BrushDrawMode" (Integer)
"PenAlignment" (String)
"HatchCross" (Integer)
"Layer" (Integer)
"Info" (String)
"TextFont" (String)
"TextFormat" (Integer)
"TextSize" (Double)

See Also

Example



TCWDrawingPropertySet

This function will set the property with the specified value.

Input Parameters

String propertyname name of property to modify
Variant value value to set to
AVAILABLE PROPERTIES: DESCRIPTION:
"GridType" tbd
"GridStyle" tbd
"GridSpacingX" tbd
"GridSpacingY" tbd
"GridColorMajor" tbd
"GridColorMinor" tbd
"GridShow" tbd
"GridFrequencyX" tbd
"GridFrequencyY" tbd
"GridMinorX" tbd
"GridMinorY" tbd
"GridOriginX" tbd
"GridOriginY" tbd
"GridOriginBase" tbd
"PenColor" pen color as &H00bbggrr
"PenWidth" pen width as a Double
"PenScale" pen scale as a Double
"PenStyle" pen style as a Integer
"BrushColor" brush color as &H00bbggrr
"BrushScale" brush scale as a Double
"BrushAngle" brush angle as a Double
"BrushStyle" brush style as a Double
"TextStyle" text style as an Integer
"ScaleSystem" scale system as an Integer
"BrushDrawMode" brush drawing mode as n Integer
"PenAlignment" pen alignment as a String
"HatchCross" hatch cross as an Integer
"Layer" layer id as an Integer
"Info" info string as a String
"TextFont" text font as a String
"TextFormat" text format as an Integer
"TextSize" text size as a Double

Return Value

0 if no errors. Non-zero if errors. Use TCWLastErrorGet to retrieve error string.

See Also

Example



GRAPHICS - Graphic Functions


TCWGraphicCount

This function will return the number of graphics in the drawing or it will return
the number of graphics contained in a graphic. If you supply a drawing handle as
the first parameter to the function, the count will be the number of top level
graphics in the drawing. If you supply a graphic handle as the first parameter to
the function, the count will be the number of graphics contained in the graphic.
This function can be used with TCWGraphicAt to cycle through all the graphics in the
drawing or graphic.

Input Parameters

Long handle handle of the drawing or graphic

Return Value

Number of graphics in the drawing or graphic as a Long.

See Also

TCWGraphicAt

Example



TCWGraphicAt

This function will return the handle to the requested graphic. The index
should be a number from 1 to the value returned by TCWGraphicCount. If you
are cycling through the graphics in the drawing, use the drawing handle you
used with TCWGraphicCount. If you are cycling through the graphics within a
graphic, use the graphic handle you used with TCWGraphicCount.

Input Parameters

Long handle handle to a drawing or a graphic
Long index requested graphic index

Return Value

Handle of the graphic as a Long.

See Also

Example



TCWGraphicAppend

This function will add a graphic to the active drawing.

Input Parameters

Long g1 if NULL, add to drawing, otherwise add graphic to this parent graphic
Long g2 graphic to add to drawing

Return Value

0 if no errors. Non-zero if an error occurred. Use TCWLastErrorGet to retrieve
error string.

See Also

Example



TCWGraphicXYZAdd

This function will add the next segment to the multiline that is in
progress.

Input Parameters

Long g graphic to add next point to
Double x0 X coordinate of point
Double y0 Y coordinate of point
Double z0 Z coordinate of point

Return Value

0 if no errors. Non-zero if an error occurred. Use TCWLastErrorGet to retrieve
error string.

See Also

TCWGraphicClose, TCWGraphicVertexAdd

Example



TCWGraphicClose

This function will close the multiline, making the last point the same
as the first point.

Input Parameters

Long g graphic to close

Return Value

0 if no errors. Non-zero if an error occurred. Use TCWLastErrorGet to retrieve
error string.

See Also

TCWGraphicXYZAdd, TCWGraphicVertexAdd

Example



TCWGraphicVertexAdd

This function will add a vertex to a graphic in the active drawing.

Input Parameters

Long g graphic
Long v vertex to add to graphic

Return Value

0 if no errors. Non-zero if an error occurred. Use TCWLastErrorGet to retrieve
error string.

See Also

Example



TCWVertexAppend

This function will add a vertex to the specified graphic.

Input Parameters

Long g handle of graphic
Double x0 X coordinate of vertex
Double y0 Y coordinate of vertex
Double z0 Z coordinate of vertex

Return Value

0 if no errors. Non-zero if an error occurred. Use TCWLastErrorGet to retrieve
error string.

See Also

Example



TCWGraphicCopy

This function will make a new graphic with the same properties as
the specified graphic. The graphic is not added to the drawing. You
must explicitly do this. Use TCWGraphicAppend with the first parameter
NULL to add the graphic to the drawing. use TCWGraphicApend with the
first parameter being the handle of the graphic that will be the
parent of the appended graphic.

Input Parameters

Long g graphic to copy

Return Value

Returns the handle to the new graphic as a Long.

See Also

Example



TCWGraphicDispose

This function will delete the specified graphic.

Input Parameters

Long g graphic to delete

Return Value

0 if no errors. Non-zero if an error occurred. Use TCWLastErrorGet to retrieve
error string.

See Also

Example



TCWGraphicCreate

This function will create a new graphic with the default drawing setting. TurboCAD
internal types are GK_GRAPHIC (polyline), GK_ARC and GK_TEXT. The regen method name
is the name of the regen dll (without the ".dll")

Input Parameters

Long kind kind of graphic to make
String regenmethodRegen method if external regenerated graphic, use "" if TurboCAD type

Return Value

Returns the handle to the new graphic as a Long.

See Also

Example



TCWGraphicDraw

This function will draw the graphic on the drawing.

Input Parameters

Long g handle of graphic
Long mode 0 is normal and 1 is inverted

Return Value

0 if no errors. Non-zero if an error occurred. Use TCWLastErrorGet to retrieve
error string.

See Also

Example



TCWGraphicHandleFromID

This function will return the graphic handle from the unique database id.

Input Parameters

Long id unique id of graphic

Return Value

The handle of the graphic. If 0, use TCWLastErrorGet to retrieve error string.

See Also

Example



TCWGraphicReferencePointSet

This function will set the graphic's reference point, using the
vertex supplied.

Input Parameters

Long g graphic handle
Long v vertex for new reference point

Return Value

0 if no errors. Non-zero if an error occurred. Use TCWLastErrorGet to retrieve
error string.

See Also

Example



TCWGraphicReferencePointGet

This function will return the graphic reference point.

Input Parameters

Long g graphic handle

Return Value

The the reference point vertex handle as a long. If 0, use TCWLastErrorGet to
retrieve the error text.

See Also

Example



GRAPHICS - Selection Manipulation Functions


TCWCreateHatch

This function will apply a hatch pattern to a graphic.

Input Parameters

Long g handle of graphic to hatch

Return Value

0 if no errors. Non-zero if an error occurred. Use TCWLastErrorGet to retrieve
error string.

See Also

Example



TCWGroupCreate

This function wil create a group out of the selected graphics.

Input Parameters

String groupnamename of group

Return Value

0 if no errors. Non-zero if an error occurred. Use TCWLastErrorGet to retrieve
error string.

See Also

Example



TCWExplode

This function will explode a selected group or block into its individual
graphics. If the selected graphic is a simple graphic such as a line, the
function has no effect.

Input Parameters

None

Return Value

0 if no errors. Non-zero if an error occurred. Use TCWLastErrorGet to retrieve
error string.

See Also

Example



TCWBringtoFront

This function will move the selected graphics to the front of the drawing.

Input Parameters

None

Return Value

0 if no errors. Non-zero if an error occurred. Use TCWLastErrorGet to retrieve
error string.

See Also

Example



TCWSendtoBack

This function will move the selected graphics to the back of the drawing.

Input Parameters

None

Return Value

0 if no errors. Non-zero if an error occurred. Use TCWLastErrorGet to retrieve
error string.

See Also

Example



TCWAlignBottom

This function will align the bottoms of the selected graphics.

Input Parameters

None

Return Value

Returns the handle of the first selected graphic as a Long.

See Also

Example



TCWAlignTop

This function will align the tops of the selected graphics.

Input Parameters


Return Value

Returns the handle of the first selected graphic as a Long.

See Also

Example



TCWAlignMiddle

This function will align the middles of the selected graphics.

Input Parameters

None

Return Value

Returns the handle of the first selected graphicas a Long.

See Also

Example



TCWAlignLeft

This function will align the left sides of the selected graphics.

Input Parameters

None

Return Value

Returns the handle of the first selected graphicas a Long.

See Also

Example



TCWAlignRight

This function will align the right sides of the selected graphics.

Input Parameters

None

Return Value

Returns the handle of the first selected graphicas a Long.

See Also

Example



TCWAlignCenter

This function will align the centers of the selected graphics.

Input Parameters

None

Return Value

Returns the handle of the first selected graphicas a Long.

See Also

Example



GRAPHICS - Get and Set Property Functions


TCWGraphicPropertyGet

This function will return the value of the property that has been
requested. This function is written in Basic because of limitations
within Enable Basic for Variants and DLLs.

Input Parameters

Long graphic graphic to get property from
String propertynamename of property look up
AVAILABLE PROPERTIES: DESCRIPTION:
"BrushAngle" brush angle as a Double
"BrushColor" brush color as &H00bbggrr
"BrushDrawMode" brush drawing mode as n Integer
"BrushScale" brush scale as a Double
"BrushStyle" brush style as a Double
"DatabaseID" unique id for graphic
"HatchCross" hatch cross as an Integer
"Info" info string as a String
"Layer" layer id as an Integer
"PenAlignment" pen alignment as a String
"PenColor" pen color as &H00bbggrr
"PenScale" pen scale as a Double
"PenStyle" pen style as a Integer
"PenWidth" pen width as a Double
"ScaleSystem" scale system as an Integer
"Selected" selected flag as a Long
"TextFont" text font as a String
"TextFormat" text format as an Integer
"TextSize" text size as a Double
"TextStyle" text style as an Integer
"Closed" closed flag as a Long (READ ONLY)
"Kind" graphic type as a Long (READ ONLY)
"RegenMethod" regen method name as a String (READ ONLY)

Return Value

Value of property requested.
AVAILABLE PROPERTIES: VALUE RETURNED:
"BrushAngle" (Double)
"BrushColor" &H00bbggrr (Long)
"BrushDrawMode" (Integer)
"BrushScale" (Double)
"BrushStyle" (Double)
"DatabaseID" (Long)
"HatchCross" (Integer)
"Info" (String)
"Layer" (Integer)
"PenAlignment" (String)
"PenColor" &H00bbggrr (Long)
"PenScale" (Double)
"PenStyle" (Integer)
"PenWidth" (Double)
"ScaleSystem" (Integer)
"Selected" -1 if selected, 0 if not (Long)
"TextFont" (String)
"TextFormat" (Integer)
"TextSize" (Double)
"TextStyle" (Integer)
"Closed" -1 if closed, 0 if not (Long - READ ONLY)
"Kind" GK_nnnnn (Long - READ ONLY)
"RegenMethod" (String - READ ONLY)

See Also

Example



TCWGraphicPropertySet

This function will set the property with the specified value.

Input Parameters

Long graphic graphic to set property for
String propertyname name of property to modify
Variant value value to set to
AVAILABLE PROPERTIES: VALUE:
"BrushAngle" (Double)
"BrushColor" (Long)
"BrushDrawMode" (Integer)
"BrushScale" (Double)
"BrushStyle" (Integer)
"DatabaseID" (Long)
"HatchCross" (Integer)
"Info" (String)
"Layer" (Integer)
"PenAlignment" (String)
"PenColor" &H00bbggrr (Long)
"PenWidth" 1.5 (Double)
"PenScale" 1 (Double)
"PenStyle" (Integer)
"ScaleSystem" (Integer)
"Selected" 1 to select, 0 to deselect (Integer)
"TextStyle" (Integer)
"TextFont" (String)
"TextFormat" (Integer)
"TextSize" (Double)

Return Value

0 if no errors. Non-zero if errors. Use TCWLastErrorGet to retrieve error string.

See Also

Example



GRAPHICS - Vertex Functions


TCWVertexCount

This function will return the number vertices in the specified graphic.

Input Parameters

Long g graphic to count vertices in

Return Value

Number of vertices as a Long.

See Also

Example



TCWVertexAt

This function will return the handle to the vertex requested. Valid index
numbers are 1 to the number returned by VertexCount.

Input Parameters

Long g graphic to get vertex from
Long index vertex to return

Return Value

Handle to vertex as a Long.

See Also

Example



TCWVertexCreate

This function will create a new vertex at the specified coordinates.

Caller is responsible for disposing of this object unless it is added to a graphic.

Input Parameters

Double x0 X coordinate of vertex
Double y0 Y coordinate of vertex
Double z0 Z coordinate of vertex

Return Value

Returns the handle to the new vertex as a Long.

See Also

Example



TCWVertexZero

This function will create a new vertex at the coordinates 0,0,0.

Caller is responsible for disposing of this object unless it is added to a graphic.

Input Parameters

None

Return Value

Returns the handle to the new vertex as a Long.

See Also

Example



TCWVertexCopy

This function will create a new vertex that is initialized to the
same coordinates as the vertex specified.

Input Parameters

Long v handle of a vertex to copy

Return Value

Returns the handle to the new vertex as a Long.

See Also

Example



TCWVertexDispose

This function will delete the specified vertex.

Input Parameters

Long v handle of a vertex to delete

Return Value

0 if no errors. Non-zero if an error occurred. Use TCWLastErrorGet to retrieve
error string.

See Also

Example



TCWGetX

This function will return the X coorindate of a vertex.

Input Parameters

Long v handle of a vertex

Return Value

X coordinate as a Double.

See Also

Example



TCWSetX

This function will set the X coordinate of a vertex.

Input Parameters

Long v handle of a vertex
Double x0 coordinate value

Return Value

0 if no errors. Non-zero if an error occurred. Use TCWLastErrorGet to retrieve
error string.

See Also

Example



TCWGetY

This function will return the Y coorindate of a vertex.

Input Parameters

Long v handle of a vertex

Return Value

Y coordinate as a Double.

See Also

Example



TCWSetY

This function will set the Y coordinate of a vertex.

Input Parameters

Long v handle of a vertex
Double y0 coordinate value

Return Value

0 if no errors. Non-zero if an error occurred. Use TCWLastErrorGet to retrieve
error string.

See Also

Example



TCWGetZ

This function will return the Z coorindate of a vertex.

Input Parameters

Long v handle of a vertex

Return Value

Z coordinate as a Double.

See Also

Example



TCWSetZ

This function will set the Z coordinate of a vertex.

Input Parameters

Long v handle of a vertex
Double z0 coordinate value

Return Value

0 if no errors. Non-zero if an error occurred. Use TCWLastErrorGet to retrieve
error string.

See Also

Example



TCWSetXY

This function will set the X and Y coordinates of a vertex.

Input Parameters

Long v handle of a vertex
Double x0 x coordinate value
Double y0 y coordinate value

Return Value

0 if no errors. Non-zero if an error occurred. Use TCWLastErrorGet to retrieve
error string.

See Also

Example



TCWSetXYZ

This function will set the X, Y and Z coordinates of a vertex.

Input Parameters

Long v handle of a vertex
Double x0 x coordinate value
Double y0 y coordinate value
Double z0 z coordinate value

Return Value

0 if no errors. Non-zero if an error occurred. Use TCWLastErrorGet to retrieve
error string.

See Also

Example



TCWPenDown

This function will st the state fo the pen. Sets the up or down
state of the pen at the specified vertex.

Input Parameters

Long v handle of a vertex
Long state TRUE if pen should be down

Return Value

0 if no errors. Non-zero if an error occurred. Use TCWLastErrorGet to retrieve
error string.

See Also

Example



VIEW - Functions


TCWViewAt

This function will activate the specified view.

Input Parameters

Long index view number

Return Value

Returns the handle to the view as a Long.

See Also

TCWViewCount, TCWViewActive

Example



TCWViewCount

This function will return the number of views that are open.

Input Parameters

None

Return Value

Count of the number of open views as a Long.

See Also

TCWViewAt, TCWViewActive

Example



TCWViewActive

This function will return the handle to the active view.

Input Parameters

None

Return Value

Handle to view as a Long.

See Also

TCWViewAt, TCWViewCount

Example



TCWViewRedraw

This function will force a redraw on the current view.

Input Parameters

None

Return Value

0 if no errors. Non-zero if an error occurred. Use TCWLastErrorGet to retrieve
error string.

See Also

Example



TCWViewUpdateWindow

This function will flush any remaining paint messages to the view.

Input Parameters

None

Return Value

0 if no errors. Non-zero if an error occurred. Use TCWLastErrorGet to retrieve
error string.

See Also

Example



TCWViewZoom

This function will zoom the current view to full view.

Input Parameters

None

Return Value

0 if no errors. Non-zero if an error occurred. Use TCWLastErrorGet to retrieve
error string.

See Also

Example



TCWViewZoomIn

This function will zoom in the current view. The amount of zoom is
determined by the zoom factor setting on the Options|Program Setup|General
property page.

Input Parameters

None

Return Value

0 if no errors. Non-zero if an error occurred. Use TCWLastErrorGet to retrieve
error string.

See Also

Example



TCWViewZoomOut

This function will zoom out the current view. The amount of zoom is
determined by the zoom factor setting on the Options|Program Setup|General
property page.

Input Parameters

None

Return Value

0 if no errors. Non-zero if an error occurred. Use TCWLastErrorGet to retrieve
error string.

See Also

Example



TCWViewZoomPage

This function will zoom to the printed page size.

Input Parameters

None

Return Value

0 if no errors. Non-zero if an error occurred. Use TCWLastErrorGet to retrieve
error string.

See Also

Example



TCWViewZoomExtents

This function will zoom to a view that contains all of the objects in the drawing.

Input Parameters

None

Return Value

0 if no errors. Non-zero if an error occurred. Use TCWLastErrorGet to retrieve
error string.

See Also

Example



TCWViewZoomWindow

This function will zoom to a view that is bounded by the rectangle points
specified.

Input Parameters

Double x0 X coordinate of top left corner of rectangle
Double y0 Y coordinate of top left corner of rectangle
Double z0 Z coordinate of top left corner of rectangle
Double x1 X coordinate of lower right corner of rectangle
Double y1 Y coordinate of lower right corner of rectangle
Double z1 Z coordinate of lower right corner of rectangle

Return Value

0 if no errors. Non-zero if an error occurred. Use TCWLastErrorGet to retrieve
error string.

See Also

Example



TCWViewExtentsGetX1

This function will return x coordinate which represents the top left
corner of the view.

Input Parameters

None

Return Value

x coordinate as a Double.

See Also

TCWViewExtentsGetY1, TCWViewExtentsGetZ1, TCWViewExtentsGetX2, TCWViewExtentsGetY2,

Example



TCWViewExtentsGetY1

This function will return y coordinate which represents the top left
corner of the view.

Input Parameters

None

Return Value

y coordinate as a Double.

See Also

TCWViewExtentsGetX1, TCWViewExtentsGetZ1, TCWViewExtentsGetX2, TCWViewExtentsGetY2,

Example



TCWViewExtentsGetZ1

This function will return z coordinate which represents the top left
corner of the view.

Input Parameters

None

Return Value

z coordinate as a Double.

See Also

TCWViewExtentsGetX1, TCWViewExtentsGetY1, TCWViewExtentsGetX2, TCWViewExtentsGetY2,

Example



TCWViewExtentsGetX2

This function will return x coordinate which represents the bottom right
corner of the view.

Input Parameters

None

Return Value

x coordinate as a Double.

See Also

TCWViewExtentsGetX1, TCWViewExtentsGetY1, TCWViewExtentsGetZ1, TCWViewExtentsGetY2,

Example



TCWViewExtentsGetY2

This function will return y coordinate which represents the bottom right
corner of the view.

Input Parameters

None

Return Value

y coordinate as a Double.

See Also

TCWViewExtentsGetX1, TCWViewExtentsGetY1, TCWViewExtentsGetZ1, TCWViewExtentsGetX2,

Example



TCWViewExtentsGetZ2

This function will return z coordinate which represents the bottom right
corner of the view.

Input Parameters

None

Return Value

z coordinate as a Double.

See Also

TCWViewExtentsGetX1, TCWViewExtentsGetY1, TCWViewExtentsGetZ1, TCWViewExtentsGetX2,

Example



LAYERS - Management Functions


TCWLayersCount

This function will return the number of layers in the active drawing.

Input Parameters

None

Return Value

Count of the number of layers as a Long.

See Also

Example



TCWLayersAt

This function will return the layer in the active drawing, requested by the index.

Input Parameters

None

Return Value

Handle to the layer as a Long.

See Also

Example



TCWLayerDispose

This function will delete the layer in the active drawing, requested by the index.

Input Parameters

Long Index layer to delete

Return Value

0 if no errors. Non-zero if an error occurred. Use TCWLastErrorGet to retrieve
error string.

See Also

Example



LAYERS - Get and Set Property Functions


TCWLayerPropertyGet

This function will return the value of the property that has been
requested. This mechanism is being used to get around Enable 3.0
non-support for Variants in DLLs.

Input Parameters

Long layer layer id returned from LayerAt
String propertyname name of property look up
AVAILABLE PROPERTIES: DESCRIPTION:
"visible" is layer visible in drawing
"readonly" is layer read only
"color" layer color
"linestyle" layer line style
"name" layer name

Return Value

Value of property requested
AVAILABLE PROPERTIES: VALUE RETURNED:
"visible" -1 if visible, 0 if not
"readonly" -1 if read only, 0 if not
"color" &H00bbggrr as a Long
"linestyle" layer line style as a Long
"name" layer name as a String

See Also

Example



TCWLayerPropertySet

This function will set the property with the specified value.

Input Parameters

Long layer layer id
String propertyname name of property to modify
Variant value value to set to
AVAILABLE PROPERTIES: VALUES:
"visible" 1 to set visible, 0 to unset
"readonly" 1 to set readonly, 0 to unset
"color" &H00bbggrr
"linestyle" tbd
"name" String

Return Value

0 if no errors. Non-zero if errors. Use TCWLastErrorGet to retrieve error string.

See Also

Example



FILE I/O - Functions


TCWOpenInput

This function will open a text file for input.

Input Parameters

String filename name of file to open for reading.

Return Value

Handle to the file as a Long. If return value is 0, use TCWLastErrorGet to
retrieve error string.

See Also

TCWCloseInput, TCWReadInput, TCWReadInputToken

Example



TCWReadInputToken

This function reads characters from the input file (fd) until it reaches a:
space, next line, of eof or the max number of characters has been read (256).

Input Parameters

Long fd file descriptor returned by OpenInput
String strtext buffer for data to be read into

Return Value

0 if no errors
-1 if EOF seen
Non-zero (not -1) if errors. Use TCWLastErrorGet to retrieve error string.

See Also

TCWOpenInput, TCWCloseInput, TCWReadInput

Example



TCWReadInput

This function reads the entire line from the input file (fd) into the buffer pbstrBuffer.
The line separator character is '\n'. '\r' is ignored.

Input Parameters

Long fd file descriptor returned by OpenInput
String strtextbuffer for data to be read into

Return Value

0 if no errors
-1 if EOF seen
Non-zero (not -1) if errors. Use TCWLastErrorGet to retrieve error string.

See Also

TCWCloseInput, TCWOpenInput, TCWReadInputToken

Example



TCWCloseInput

This function closes the input file.

Input Parameters

Long fd file descriptor returned by OpenInput

Return Value

0 if no errors. Non-zero if an error occurred. Use TCWLastErrorGet to retrieve
error string.

See Also

TCWOpenInput, TCWReadInput, TCWReadInputToken

Example



TCWOpenOutput

This function will open a text file for output.

Input Parameters

String filename name of file to open for writing.

Return Value

Handle to the file as a Long. If return value is 0, use TCWLastErrorGet to
retrieve error string.

See Also

TCWCloseOutput, TCWWriteOutput

Example



TCWWriteOutput

This function writes the buffer bstrBuffer to the file (fd).

Input Parameters

Long fd file descriptor returned by OpenOutput
String strtext buffer for data to be read into
Note thatmax number of bytes you can write is 0xFFFE (65534).

Return Value

0 if no errors. Non-zero if an error occurred. Use TCWLastErrorGet to retrieve
error string.

See Also

TCWCloseOutput, TCWOpenOutput

Example



TCWCloseOutput

This function closes the output file.

Input Parameters

Long fd file descriptor returned by OpenOutput

Return Value

0 if no errors. Non-zero if an error occurred. Use TCWLastErrorGet to retrieve
error string.

See Also

TCWOpenOutput, TCWWriteOutput

Example



SCREEN - Mouse to Point Functions


TCWGetPoint

This function will set the vertex to the value of the next mouse pick in the
active viewport. The user should use the left mouse button. A value will not be
returned until the mouse button is released.

Input Parameters

Long v handle to a vertex
String promp prompt for user
Long g handle of a graphic to drag (or NULL)
Long vd reference to a vertex in the drag graphic (or NULL)
Long os snap modes which give "magnetic: functionality

Return Value

0 if no errors. Non-zero if an error occurred. Use TCWLastErrorGet to retrieve
error string.

See Also

TCWVertexFindVertex, TCWVertexFindGraphic

Example



TCWVertexFindVertex

This function will update the supplied vertex's X, Y, and Z coordinates with the
X, Y, and Z coordinates of the closest vertex based on the snap mode used.

Input Parameters

Long v handle to a vertex
Long os snap modes which are active combination of the following values:
. . SNAP_NEARESTPOINT 0x0008
. . SNAP_MIDPOINT 0x0020
. . SNAP_CENTER 0x0040
. . SNAP_QUADRANTPOINT 0x0080
. . SNAP_ANYPOINT 0x00FC
. . SNAP_NEARESTENTITY 0x0100 (overides other snaps)

Return Value

0 if no errors. Non-zero if an error occurred. Use TCWLastErrorGet to retrieve
error string. Input parameter is updated to reflect closest vertex.

See Also

TCWVertexFindGraphic

Example



TCWVertexFindGraphic

This function with return the handle to the graphic that is closest to the
supplied vertex.

Input Parameters

Long v handle to a vertex

Return Value

0 if no errors. Non-zero if an error occurred. Use TCWLastErrorGet to retrieve
error string.

See Also

TCWVertexFindVertex

Example