home *** CD-ROM | disk | FTP | other *** search
/ BUG 11 / BUGCD1998_02.ISO / aplic / turbocad / tcw.z / tcwapi40.h < prev    next >
Text File  |  1997-05-08  |  114KB  |  4,394 lines

  1. '******************************************************************
  2. '*                                                                *
  3. '*                      TurboCAD for Windows                      *
  4. '*                   Copyright (c) 1993 - 1996                    *
  5. '*             International Microcomputer Software, Inc.         *
  6. '*                            (IMSI)                              *
  7. '*                      All rights reserved.                      *
  8. '*                                                                *
  9. '******************************************************************
  10. '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
  11. '                                                                 '
  12. '                TCWAPI40.H - Header file for Enable              '
  13. '                                                                 '
  14. '           This file was created at 17:13:37 on 04/07/97,        '
  15. '           by filter.exe, a program written by Pat Garner.       '
  16. '                                                                 '
  17. '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
  18.  
  19. 'Section
  20. 'APPLICATION - Miscellaneous Functions
  21.  
  22. 'Description
  23. 'This function will shutdown the application and exit.  All open drawings
  24. 'will be closed before exiting.  If any drawings have been changed, you will
  25. 'be prompted to save them before exiting.
  26. '
  27. 'Input Parameters
  28. 'None
  29. '
  30. 'Return Value
  31. ' None
  32. '
  33. 'See Also
  34. '
  35. 'Coding Example
  36. '    TCWAppExit
  37. '
  38. 'Declaration
  39. Declare Function TCWAppExit lib "TCAPI40" ()
  40.  
  41. 'Description
  42. 'This function will return the active window handle.  The active window is
  43. 'the currently active drawing window.
  44. '
  45. 'Input Parameters
  46. 'None
  47. '
  48. 'Return Value
  49. 'The handle of window as a long.
  50. '
  51. 'See Also
  52. '
  53. 'Coding Example
  54. '    Dim hWindow As Long
  55. '    hWindow = TCWActiveWindow()
  56. '    ...
  57. '
  58. 'Declaration
  59. Declare Function TCWActiveWindow lib "TCAPI40" () As Long
  60.  
  61. 'Description
  62. 'This function will launch an Enable Basic statement (passed as a String)
  63. 'or load and execute an Enable basic file (if the string ends with ".bas").
  64. '
  65. 'Input Parameters
  66. 'String script    A statement in Enable Basic or the name of an Enable Basic file
  67. '
  68. 'Return Value
  69. 'None
  70. '
  71. 'See Also
  72. 'TCWBasicDebug
  73. '
  74. 'Coding Example
  75. '    TCWBasicRun "MsgBox" + Chr(34) + "Hello World!" + Chr(34)
  76. '    TCWBasicRun "test.bas"
  77. '
  78. 'Declaration
  79. Declare Function TCWBasicRun lib "TCAPI40" ( _ 
  80.     ByRef script As String _ 
  81. ) As Long
  82.  
  83. 'Description
  84. 'This function will launch the Enable debugger with an Enable Basic statement 
  85. '(passed as a String) or load an Enable basic file (if the string ends with ".bas") into
  86. 'the debugger. 
  87. '
  88. 'Input Parameters
  89. 'String script        A statement in Enable Basic or the name of an Enable Basic file
  90. '
  91. 'Return Value
  92. ' None
  93. '
  94. 'See Also
  95. '    TCWBasicRun
  96. '
  97. 'Coding Example
  98. '    TCWBasicDebug "MsgBox" + Chr(34) + "Hello World!" + Chr(34)
  99. '    TCWBasicDebug "test.bas"
  100. '
  101. 'Declaration
  102. Declare Function TCWBasicDebug lib "DEBUGGER40" ( _  
  103.     ByRef s As String _ 
  104. )
  105.  
  106. 'Section
  107. 'APPLICATION - Error Functions
  108.  
  109. 'Description
  110. 'This function will return a string for the last error that occurred in the script.
  111. '
  112. 'The script is responsible for checking for errors after making TCADAPI calls.
  113. 'If the API call was supposed to return a handle to drawing, graphic, ...
  114. 'you should check for NULL and call TCWLastErrorGet if true.  If a non-null handle
  115. 'was returned, then the call succeeded and you don't need to check for errors.
  116. 'For Api calls that return status, 0 signifies success.  Non-zero status signifies failure
  117. 'and you should call TCWLastErrorGet to get the error text.
  118. '
  119. 'Input Parameters
  120. 'String errorstring    Buffer to return error string in
  121. '
  122. 'Return Value
  123. 'Error string in string passed to the function.  Function returns 0 is successful and non-zero if
  124. 'their was no error to retrieve.
  125. '
  126. 'See Also
  127. 'TCWClearError
  128. '
  129. 'Coding Example
  130. '    Dim result As Long
  131. '    Dim errtext As String
  132. '  Dim gCircle As Long
  133. '    ...
  134. '    gCircle = TCWCircleCenterAndPoint(xc, yc, zc, xp, yp, zp)
  135. '  if (gCircle = NULL) then
  136. '        result = TCWLastErrorGet (errtext)
  137. '        MsgBox errtext
  138. '        'Terminate the program
  139. '        Stop
  140. '    end if
  141. '    ...
  142. '
  143. 'Declaration
  144. Declare Function TCWLastErrorGet lib "TCAPI40" ( _ 
  145.     ByRef pszErrorString As String _ 
  146. ) As Long
  147.  
  148. 'Description
  149. 'This function will clear the error info in TCADAPI.  You can use this function after
  150. 'you've checked the previous TCADAPI function status.  TCADAPI will clear
  151. 'the error information structure at the beginning of each API function so previous
  152. 'errors will be lost if you don't use TCWLastErrorGet.
  153. '
  154. 'Input Parameters
  155. 'None
  156. '
  157. 'Return Value
  158. 'None
  159. '
  160. 'See Also
  161. '
  162. 'Coding Example
  163. '    ...
  164. '    TCWClearError
  165. '
  166. 'Declaration
  167. Declare Function TCWClearError lib "TCAPI40" ()
  168.  
  169. 'Section
  170. 'APPLICATION - Get and Set Property Functions
  171.  
  172. 'Description
  173. 'This function will return the value of the property that has been
  174. 'requested.  This function is written in Basic due to problems with Enable
  175. 'not supporting Variants with DLLs.
  176. '
  177. 'Input Parameters
  178. 'String propertyname        name of property look up
  179. '
  180. 'AVAILABLE PROPERTIES:        DESCRIPTION:
  181. '"ColorButtons"            buttons are color or black and white
  182. '"EditBar"                    viewing of the EditBar
  183. '"LargeButtons"            buttons are large or small
  184. '"Organization"             organization name
  185. '"OpenReadOnly"            open files as read only
  186. '"PromptForSummaryInfo"    prompting for summary information on save
  187. '"Rulers"                    viewing of Rulers
  188. '"ScrollBars"                viewing of Scroll Bars
  189. '"StatusBar"                viewing of Status Bar
  190. '"ShowTooltips"            show tool tips
  191. '"SaveDesktopOnExit"        save desktop settings on exit
  192. '"UserName"                username
  193. '"ZoomFactor"                what factor to zoom when zooming in/out
  194. '
  195. 'Return Value
  196. 'Value of property requested.
  197. '
  198. 'AVAILABLE PROPERTIES:        VALUE RETURNED:
  199. '"ColorButtons"            -1 if color buttons set, 0 if not set
  200. '"EditBar"                    -1 if displayed, 0 if not displayed
  201. '"LargeButtons"            -1 large buttons is set, 0 if not set
  202. '"Organization"             organization name as a string
  203. '"OpenReadOnly"            -1 if set, 0 if not set
  204. '"PromptForSummaryInfo"    -1 if set, 0 if not set
  205. '"Rulers"                    -1 if displayed, 0 if not displayed
  206. '"ScrollBars"                -1 if displayed, 0 if not displayed
  207. '"StatusBar"                -1 if displayed, 0 if not displayed
  208. '"ShowTooltips"            -1 if displayed, 0 if not displayed
  209. '"SaveDesktopOnExit"        -1 if set, 0 if not set
  210. '"UserName"                username as a string
  211. '"ZoomFactor"                the zoom factor as a double
  212. '
  213. 'See Also
  214. 'TCWAppPropertySet
  215. '
  216. 'Coding Example
  217. '
  218. '        zoomValue = TCWAppPropertyGet("ZoomFactor")
  219. '
  220. 'Declaration
  221. 'Declare Function TCWAppPropertyGet ( _ 
  222. '    ByRef propertyname As String _ 
  223. ')As Variant
  224.  
  225. 'Description
  226. 'This function will set the property with the specified value.
  227. '
  228. 'Input parameters
  229. 'String propertyname        name of property to modify 
  230. 'Variant value                value to set to 
  231. '
  232. 'AVAILABLE PROPERTIES:        VALUE:
  233. '"ColorButtons"            1 if color, 0 if black and white (Integer)
  234. '"EditBar"                    1 if displayed, 0 if not displayed (Integer)
  235. '"LargeButtons"            1 if large buttons, 0 if small (Integer)
  236. '"Organization"             organization name (String)
  237. '"OpenReadOnly"            1 if read only, 0 if not (Integer)
  238. '"PromptForSummaryInfo"    1 if prompt, 0 if no prompt (Integer)
  239. '"Rulers"                    1 if displayed, 0 if not (Integer)
  240. '"ScrollBars"                1 if displayed, 0 if not (Integer)
  241. '"StatusBar"                1 if displayed, 0 if not (Integer)
  242. '"ShowTooltips"            1 if show tips, 0 if not (Integer)
  243. '"SaveDesktopOnExit"        1 if save on exit, 0 if not (Integer)
  244. '"UserName"                username (String)
  245. '"ZoomFactor"                zoom factor (Double)
  246. '
  247. 'Return Value
  248. ' 0 if no errors
  249. ' non-zero if errors, use TCWLastErrorGet to retrieve error string
  250. '
  251. 'See Also
  252. ' TCWAppPropertyGet
  253. '
  254. 'Coding Example
  255. '
  256. '        result = TCWAppPropertySet("ZoomFactor",10.0)
  257. '
  258. 'Declaration
  259. 'Declare Function TCWAppPropertySet ( _ 
  260. '    ByRef propertyname As String, _ 
  261. '    ByVal value As Variant _ 
  262. ')As Long
  263.  
  264. 'Section
  265. 'APPLICATION - Drawing Management Functions
  266.  
  267. 'Description
  268. 'This function will create a new TurboCAD drawing.
  269. '
  270. 'Input Parameters
  271. 'None
  272. '
  273. 'Return Value
  274. 'The handle to the new drawing as a long.  If return value is NULL, then the 
  275. 'drawing was not created.  Use TCWLastErrorGet to retrieve the error string.
  276. '
  277. 'See Also
  278. '
  279. 'Coding Example
  280. '    Dim hDrawing As Long
  281. '    hDrawing = TCWDrawingNew()
  282. '    if (hDrawing = NULL) then
  283. '        'check error
  284. '        ...
  285. '    end if
  286. '    ...
  287. '
  288. 'Declaration
  289. Declare Function TCWDrawingNew lib "TCAPI40" () As Long
  290.  
  291. 'Description
  292. 'This function will open a drawing in any TurboCAD supported format.  The format
  293. 'is based on the file extension (.tcw, .dxf, .dwg...).
  294. '
  295. 'Input Parameters
  296. 'String drawingname        name of drawing to open
  297. '
  298. 'Return Value
  299. 'The handle to the opened drawing as a long.  If return value is NULL, then the
  300. 'drawing was not opened.  Use TCWLastErrorGet to retrieve the error string.
  301. '
  302. 'See Also
  303. '
  304. 'Coding Example
  305. '    Dim hDrawing As Long
  306. '    hDrawing = TCWDrawingOpen("c:\mydrawings\pipes.tcw")
  307. '    if (hDrawing = NULL) then
  308. '        'check error
  309. '        ...
  310. '
  311. 'Declaration
  312. Declare Function TCWDrawingOpen lib "TCAPI40" ( _ 
  313.     ByRef dname As String _ 
  314. ) As Long
  315.  
  316. 'Description
  317. 'This function will close the current drawing.  If the file has changed since
  318. 'it was last saved, the value of savechanges will determine if the file is saved
  319. 'first before closing.
  320. '
  321. 'Input Parameters
  322. 'Long savechanges        1 if save changes before closing, 0 to not save changes
  323. '
  324. 'Return Value
  325. '0 if no errors.  Non-zero if an error occurred. Use TCWLastErrorGet to retrieve 
  326. 'error string.
  327. 'See Also
  328. '
  329. 'Coding Example
  330. '    ...
  331. '    result = TCWDrawingClose(1)
  332. '  if (result <> 0) then
  333. '        'check error
  334. '        ...
  335. '
  336. 'Declaration
  337. Declare Function TCWDrawingClose lib "TCAPI40" ( _ 
  338.     ByVal savechanges As Long _ 
  339. ) As Long
  340.  
  341. 'Description
  342. 'This function will save the current drawing to disk using the file and folder
  343. 'name that was previously used.  If this is the first time the file has been
  344. 'saved, you will be prompted with the SaveAs dialog, prompting you for a name
  345. 'and location to save the file.  If you have Prompt for Summary Info in the
  346. 'Options|Program Setup|General property sheet selected, you will be prompted to
  347. 'input summary information.
  348. '
  349. 'Input Parameters
  350. 'None
  351. '
  352. 'Return Value
  353. '0 if no errors.  Non-zero if an error occurred. Use TCWLastErrorGet to retrieve 
  354. 'error string.
  355. '
  356. 'See Also
  357. 'TCWDrawingSaveAs
  358. '
  359. 'Coding Example
  360. '    ...
  361. '    result = TCWDrawingSave()
  362. '    if (result <> 0)
  363. '        'check error
  364. '    ...
  365. '
  366. 'Declaration
  367. Declare Function TCWDrawingSave lib "TCAPI40" () As Long
  368.  
  369. 'Description
  370. ' This function will save the current drawing to disk using a file name and folder
  371. ' you specify.  The SaveAs dialog box will be displayed and you can input name,
  372. ' location, etc.  If you have Prompt for Summary Info in the
  373. ' Options|Program Setup|General property sheet selected, you will be prompted to
  374. ' input summary information. Set saveselection to True if you only want to save
  375. ' the current selection to the file.
  376. '
  377. 'Input Parameters
  378. 'String drawingname        new name of drawing
  379. 'Integer saveselection        True if you want to save selection, false for drawing
  380. '
  381. 'Return Value
  382. '0 if no errors.  Non-zero if an error occurred. Use TCWLastErrorGet to retrieve 
  383. 'error string.
  384. '
  385. 'See Also
  386. 'TCWDrawingSave
  387. '
  388. 'Coding Example
  389. '    ...
  390. '    result = TCWDrawingSaveAs("newdrawing.tcw")
  391. '    if (result <> 0) then
  392. '        'check error
  393. '        ...
  394. '
  395. 'Declaration
  396. Declare Function TCWDrawingSaveAs lib "TCAPI40" ( _ 
  397.     ByRef dname As String, _ 
  398.     ByVal saveselection As Long _ 
  399. ) As Long
  400.  
  401. 'Description
  402. 'This function will return the name of the drawing associated with the active
  403. 'drawing.  If the drawing is a new drawing that has not been saved, this function
  404. 'will return the drawing title (e.g. Drawing1).  This function can be used with TCWDrawingAt and TCWDrawingCount.  
  405. 'If you have only one drawing open, you can use TCWDrawingName(name) and it will 
  406. 'return the name of the current drawing.  If you have multiple drawings open, 
  407. 'use TCWDrawingCount to find out how many are open, then use TCWDrawingAt and TCWDrawingName 
  408. 'to cycle through the drawings to get the name of each.
  409. '
  410. 'Input Parameters
  411. 'String drawingname        buffer for drawing name
  412. '
  413. 'Return Value
  414. '0 if no errors.  Non-zero if an error occurred. Use TCWLastErrorGet to retrieve 
  415. 'error string.
  416. '
  417. 'See Also
  418. 'TCWDrawingCount, TCWDrawingAt
  419. '
  420. 'Coding Example
  421. '    Dim dCount As Long
  422. '    Dim hDrawing As Long
  423. '    Dim i As Long
  424. '    Dim dName As String
  425. '    dCount = TCWDrawingCount()
  426. '    if (dCount = 0) then
  427. '        MsgBox "No drawings open."
  428. '        Stop
  429. '    end if
  430. '    for i = 0 to dCount - 1
  431. '        hDrawing = TCWDrawingAt(i)
  432. '        TCWDrawingName dName
  433. '        MsgBox dName
  434. '    next i
  435. '    ...
  436. '
  437. 'Declaration
  438. Declare Function TCWDrawingName lib "TCAPI40" ( _ 
  439.     ByRef dname As String _ 
  440. ) As Long
  441.  
  442. 'Description
  443. 'This function will activate the drawing specified.  This function is used
  444. 'with TCWDrawingCount to get the number of drawings open in the application.
  445. 'If you have multiple drawings open, you can use TCWDrawingCount to get the
  446. 'number of drawings, then use TCWDrawingAt to change the active drawing.  The
  447. 'index is 0 based, so you can cycle through 0 to count-1 drawings.
  448. '
  449. 'Input Parameters
  450. 'Long index        number associated with the open drawing
  451. '
  452. 'Return Value
  453. 'The handle to the drawing as a long.
  454. '
  455. 'See Also
  456. 'TCWDrawingName, TCWDrawingCount
  457. '
  458. 'Coding Example
  459. '    Dim dCount As Long
  460. '    Dim i As Long
  461. '    Dim hDrawing As Long
  462. '    dCount = TCWDrawingCount()
  463. '    for i = 0 to dCount - 1
  464. '        hDrawing = TCWDrawingAt(i)
  465. '        ...
  466. '    next i
  467. '    ...
  468. '
  469. 'Declaration
  470. Declare Function TCWDrawingAt lib "TCAPI40" ( _ 
  471.     ByVal index As Long _ 
  472. ) As Long
  473.  
  474. 'Description
  475. 'This function will return the number of open drawings.  Used with 
  476. 'TCWDrawingName and TCWDrawingAt to cycle through the open drawings.
  477. '
  478. 'Input Parameters
  479. 'None
  480. '
  481. 'Return Value
  482. 'Number of open drawings in TurboCAD as a long.
  483. '
  484. 'See Also
  485. 'TCWDrawingName, TCWDrawingAt
  486. '
  487. 'Coding Example
  488. '    Dim dCount As Long
  489. '    Dim i As Long
  490. '    Dim hDrawing As Long
  491. '    dCount = TCWDrawingCount()
  492. '    for i = 0 to dCount - 1
  493. '        hDrawing = TCWDrawingAt(i)
  494. '        ...
  495. '    next i
  496. '    ...
  497. '
  498. 'Declaration
  499. Declare Function TCWDrawingCount lib "TCAPI40" () As Long
  500.  
  501. 'Description
  502. 'This function will print the current drawing.  Set showdialog to TRUE if
  503. 'you want to see the print dialog box and have access to the page setup
  504. 'parameters.
  505. '
  506. 'Input Parameters
  507. 'Long showdialog            1 to show print dialog box, 0 if no print dialog box
  508. '
  509. 'Return Value
  510. '0 if no errors.  Non-zero if an error occurred. Use TCWLastErrorGet to retrieve 
  511. 'error string.
  512. '
  513. 'See Also
  514. '
  515. 'Coding Example
  516. '    ...
  517. '    result = TCWDrawingPrint(0)
  518. '    ...
  519. '
  520. 'Declaration
  521. Declare Function TCWDrawingPrint lib "TCAPI40" ( _ 
  522.     ByVal showdialog As Long _ 
  523. ) As Long
  524.  
  525. 'Description
  526. 'This function will return the handle of the active drawing.
  527. '
  528. 'Input Parameters
  529. 'None
  530. '
  531. 'Return Value
  532. 'Handle of active drawing as a Long.  If NULL, then no active drawing.  If you
  533. 'believe this should have returned a drawing handle, use TCWLastErrorGet to 
  534. 'retrieve the error string.
  535. '
  536. 'See Also
  537. '
  538. 'Coding Example
  539. '    Dim hDrawing As Long
  540. '    hDrawing = TCWDrawingActive()
  541. '    if (hDrawing = NULL) then
  542. '        Msgbox "No active drawing".
  543. '    ...
  544. '
  545. 'Declaration
  546. Declare Function TCWDrawingActive lib "TCAPI40" () As Long
  547.  
  548. 'Section
  549. 'APPLICATION - Undo and Redo Functions
  550.  
  551. 'Description
  552. 'This function will delete all the undo records in the current drawing.  You will
  553. 'not be able to Redo any previous actions after making this call.
  554. '
  555. 'Input Parameters
  556. 'None
  557. '
  558. 'Return Value
  559. '0 if no errors.  Non-zero if an error occurred. Use TCWLastErrorGet to retrieve 
  560. 'error string.
  561. '
  562. 'See Also
  563. 'TCWUndo, TCWRedo
  564. '
  565. 'Coding Example
  566. '    ...
  567. '    result = TCWUndoClear()
  568. '    ...
  569. '
  570. 'Declaration
  571. Declare Function TCWUndoClear lib "TCAPI40" () As Long
  572.  
  573. 'Description
  574. 'This function will reverse the last n changes in the current drawing.
  575. '
  576. 'Input Parameters
  577. 'long n        number of changes to undo
  578. '
  579. 'Return Value
  580. '0 if no errors.  Non-zero if an error occurred. Use TCWLastErrorGet to retrieve 
  581. 'error string.
  582. '
  583. 'See Also
  584. 'TCWUndoClear, TCWRedo
  585. '
  586. 'Coding Example
  587. '    ...
  588. '    result = TCWUndo(2) 'undo last 2 operations
  589. '
  590. 'Declaration
  591. Declare Function TCWUndo lib "TCAPI40" ( _ 
  592.     ByVal n As Long _ 
  593. ) As Long
  594.  
  595. 'Description
  596. 'This function will reverse the effect of the last undo.
  597. '
  598. 'Input Parameters
  599. 'None
  600. '
  601. 'Return Value
  602. '0 if no errors.  Non-zero if an error occurred. Use TCWLastErrorGet to retrieve 
  603. 'error string.
  604. '
  605. 'See Also
  606. 'TCWUndoClear, TCWUndo
  607. '
  608. 'Coding Example
  609. '    ...
  610. '    result = TCWRedo() 'oops - get it back!
  611. '
  612. 'Declaration
  613. Declare Function TCWRedo lib "TCAPI40" () As Long
  614.  
  615. 'Section
  616. 'DRAWING - Selection Functions 
  617.  
  618. 'Description
  619. 'This function selects the  all graphics in the drawing.
  620. '
  621. 'Input Parameters
  622. 'None
  623. '
  624. 'Return Value
  625. '0 if no errors.  There was at least one graphic to select.
  626. 'Non-zero if errors or no graphics to select. Use TCWLastErrorGet to see if there
  627. 'was an error.
  628. '
  629. 'See Also
  630. 'TCWDeselectAll
  631. '
  632. 'Coding Example
  633. '    ...
  634. '    result = TCWSelectAll()
  635. '    if (result = 0) then
  636. '        'change all graphics to have PenColor Red
  637. '        ...
  638. '
  639. 'Declaration
  640. Declare Function TCWSelectAll lib "TCAPI40" () As Long
  641.  
  642. 'Description
  643. 'This function will deselect all selected graphics.
  644. '
  645. 'Input Parameters
  646. 'None
  647. '
  648. 'Return Value
  649. '0 if no errors.  At least one graphic was deselected.
  650. 'Non-zero if errors or no graphics to deselect. Use TCWLastErrorGet see if there was
  651. 'an error.
  652. '
  653. 'See Also
  654. 'TCWSelectAll
  655. '
  656. 'Coding Example
  657. '    ...
  658. '    result = TCWDeselectAll()
  659. '    ...
  660. '
  661. 'Declaration
  662. Declare Function TCWDeselectAll lib "TCAPI40" () As Long
  663.  
  664. 'Description
  665. 'This function will delete all selected graphics.
  666. '
  667. 'Input Parameters
  668. 'None
  669. '
  670. 'Return Value
  671. '0 if no errors.  At least one graphic was deleted.
  672. 'Non-zero if errors or no graphics to delete.  Use TCWLastErrorGet to see if there was
  673. 'an error.
  674. '
  675. 'See Also
  676. 'TCWClearAll
  677. '
  678. 'Coding Example
  679. '    'select all graphics with type = circle
  680. '     g = TCWSelectByQuery("Type = Circle/Ellipse")
  681. '     result = TCWClearSelection()
  682. '    ...
  683. '
  684. 'Declaration
  685. Declare Function TCWClearSelection lib "TCAPI40" () As Long
  686.  
  687. 'Description
  688. 'This function will delete all graphics in the current drawing.
  689. '
  690. 'This deletes every graphic, not just what is selected.  To only delete
  691. 'selected graphics, see TCWClearSelection.
  692. '
  693. 'Input Parameters
  694. 'None
  695. '
  696. 'Return Value
  697. '0 if no errors.  At least one graphic was deleted.
  698. 'Non-zero if errors or no graphics to delete.  Use TCWLastErrorGet to see if there was
  699. 'an error.
  700. '
  701. 'See Also
  702. 'TCWClearSelection
  703. '
  704. 'Coding Example
  705. '    ...
  706. '    result = TCWClearAll()
  707. '    ...
  708. '
  709. 'Declaration
  710. Declare Function TCWClearAll lib "TCAPI40" () As Long
  711.  
  712. 'Description
  713. 'This function will delete all construction graphics in the current drawing.
  714. '
  715. 'Input Parameters
  716. 'None
  717. '
  718. 'Return Value
  719. '0 if no errors.  At least one graphic was deleted.
  720. 'Non-zero if errors or no graphics to delete.  Use TCWLastErrorGet to see if there was
  721. 'an error.
  722. '
  723. 'See Also
  724. '
  725. 'Coding Example
  726. '    ...
  727. '    result = TCWClearAllConstructions()
  728. '    ...
  729. '
  730. 'Declaration
  731. Declare Function TCWClearAllConstructions lib "TCAPI40" () As Long
  732.  
  733. 'Description
  734. 'This function will select graphics in the drawing based on specified criteria.  
  735. 'An empty query is equivalent to SELECTED.  Use TCWSelectionCount and TCWSelectionAt
  736. 'to cycle through the selected graphics.
  737. '
  738. 'The query language is defined as follows:
  739. '
  740. '"query"      -> "expr"
  741. '"expr"       -> "expr" OR "expr" | "expr" AND "expr" | ("expr") | NOT "expr" | "atom"
  742. '"atom"       -> ALL | SELECTED | "field_name" "relation" "value"
  743. '"rel"        -> = | <> | < | <= | > | >=
  744. '"field_name" -> "string" | "any_string"
  745. '"value"      -> "string" | "any_string"
  746. '"string"     -> string without spaces which is not a keyword and doesn't have any reserved characters
  747. '"any_string" -> string without any double quote marks, may have spaces
  748. '
  749. 'Keywords for query are:
  750. '  ALL, SELECTED, OR, AND, NOT
  751. '
  752. 'Reserved characters are:
  753. '  =, <, >, ", (, )
  754. '
  755. 'Precedence (in descending order):
  756. '   ()
  757. '   NOT
  758. '   AND
  759. '   OR
  760. '
  761. 'Input Parameters
  762. 'String s            string for search
  763. '
  764. 'Return Value
  765. 'First graphic in the selection as a Long.  
  766. '
  767. 'See Also
  768. '
  769. 'Coding Example
  770. '    Dim g As Long
  771. '  'This query adds all elements from the electrical layer to the current selection
  772. '  g = TCWSelectByQuery("SELECTED OR Layer = electrical")
  773. '    if (g = NULL) then
  774. '        MsgBox "No graphics met criteria".
  775. '        Stop
  776. '        ...
  777. '
  778. 'Declaration
  779. Declare Function TCWSelectByQuery lib "TCAPI40" ( _ 
  780.     ByRef s As String _ 
  781. ) As Long
  782.  
  783. 'Description
  784. 'This function will return a count of the number of graphics currently
  785. 'selected in the drawing.
  786. '
  787. 'Input Parameters
  788. 'None
  789. '
  790. 'Return Value
  791. 'The number of graphics that are currently selected as a Long.
  792. '
  793. 'See Also
  794. 'TCWSelection, TCWSelectByQuery
  795. '
  796. 'Coding Example
  797. '
  798. 'Declaration
  799. Declare Function TCWSelectionCount lib "TCAPI40" () As Long
  800.  
  801. 'Description
  802. 'This function will return the handle of the requested graphic in the drawing.  The index
  803. 'should be a number from 0 to the value-1 returned by TCWSelectionCount.
  804. '
  805. 'Input Parameters
  806. 'Long index            requested select graphic index
  807. '
  808. 'Return Value
  809. 'The handle of the graphic as a Long.
  810. '
  811. 'See Also
  812. 'TCWSelectionCount
  813. '
  814. 'Coding Example
  815. '
  816. 'Declaration
  817. Declare Function TCWSelectionAt lib "TCAPI40" ( _ 
  818.     ByVal index As Long _ 
  819. ) As Long
  820.  
  821. 'Section
  822. 'DRAWING - Construction Line Creation Functions
  823.  
  824. 'These graphic creation functions add the graphic to the drawing.  
  825. 'Do not use the graphic handle returned from these functions with
  826. 'TCWGraphicAppend to append to the drawing or another graphic.
  827. '
  828. 'All construction lines and circles are put on a CONSTRUCTION layer.
  829.  
  830. 'Description
  831. 'This function will draw a construction line at the specified angle.
  832. '
  833. 'Input Parameters
  834. 'Double x0            X coordinate of the first point
  835. 'Double y0            Y coordinate of the first point
  836. 'Double z0            Z coordinate of the first point 
  837. 'Double x1            X coordinate of the second point
  838. 'Double y1            Y coordinate of the second point
  839. 'Double z1            Z coordinate of the second point
  840. '
  841. 'Return Value
  842. 'Returns the handle to the construction line as a long.
  843. '
  844. 'See Also
  845. '
  846. 'Coding Example
  847. '    Dim hConstr As Long
  848. '    ...
  849. '    hConstr = TCWConstructionAngularLine(x1, y1, z1, x2, y2, z2)
  850. '    if (hConstr = NULL) then
  851. '        'check error
  852. '        ...
  853. '
  854. 'Declaration
  855. Declare Function TCWConstructionAngularLine lib "TCAPI40" ( _ 
  856.     ByVal x0 As Double, _ 
  857.     ByVal y0 As Double, _ 
  858.     ByVal z0 As Double, _ 
  859.     ByVal x1 As Double, _ 
  860.     ByVal y1 As Double, _ 
  861.     ByVal z1 As Double _ 
  862. ) As Long
  863.  
  864. 'Description
  865. 'This function will draw a horizontal construction line.
  866. '
  867. 'Input Parameters
  868. 'Double x0            X coordinate of point on the line 
  869. 'Double y0            Y coordinate of point on the line 
  870. 'Double z0            Z coordinate of point on the line 
  871. '
  872. 'Return Value
  873. 'Returns the handle to the construction line as a Long.
  874. '
  875. 'See Also
  876. '
  877. 'Coding Example
  878. '    Dim hConstr As Long
  879. '    Dim xc As Double
  880. '    Dim yc As Double
  881. '    'get center of view for construction line placement
  882. '    xc = (TCWViewExtentsGetX1() + TCWViewExtentsGetX2())/2
  883. '    yc = (TCWViewExtentsGetY1() + TCWViewExtentsGetY2())/2
  884. '    hConstr = TCWConstructionHorizontalLine(xc, yc, 0.0)
  885. '    if (hConstr = NULL) then
  886. '        'check error
  887. '        ...
  888. '
  889. 'Declaration
  890. Declare Function TCWConstructionHorizontalLine lib "TCAPI40" ( _ 
  891.     ByVal x0 As Double, _ 
  892.     ByVal y0 As Double, _ 
  893.     ByVal z0 As Double _ 
  894. ) As Long
  895.  
  896. 'Description
  897. 'This function will draw a vertical construction line.
  898. '
  899. 'Input Parameters
  900. 'Double x0            X coordinate of point on the line 
  901. 'Double y0            Y coordinate of point on the line 
  902. 'Double z0            Z coordinate of point on the line 
  903. '
  904. 'Return Value
  905. 'Returns the handle to the construction line as a Long.
  906. '
  907. 'See Also
  908. '
  909. 'Coding Example
  910. '    Dim hConstr As Long
  911. '    Dim xc As Double
  912. '    Dim yc As Double
  913. '    'get center of view for construction line placement
  914. '    xc = (TCWViewExtentsGetX1() + TCWViewExtentsGetX2())/2
  915. '    yc = (TCWViewExtentsGetY1() + TCWViewExtentsGetY2())/2
  916. '    hConstr = TCWConstructionVerticalLine(xc, yc, 0.0)
  917. '    if (hConstr = NULL) then
  918. '        'check error
  919. '        ...
  920. '
  921. 'Declaration
  922. Declare Function TCWConstructionVerticalLine lib "TCAPI40" ( _ 
  923.     ByVal x0 As Double, _ 
  924.     ByVal y0 As Double, _ 
  925.     ByVal z0 As Double _ 
  926. ) As Long
  927.  
  928. 'Description
  929. 'This function will draw a construction circle defined by its center point
  930. 'and a point on its perimeter.
  931. '
  932. 'Input Parameters
  933. 'Double x0            X coordinate of the center point 
  934. 'Double y0            Y coordinate of the center point 
  935. 'Double z0            Z coordinate of the center point 
  936. 'Double x1            X coordinate of the perimeter point
  937. 'Double y1            Y coordinate of the perimeter point 
  938. 'Double z1            Z coordinate of the perimeter point 
  939. '
  940. 'Return Value
  941. 'Returns the handle to the construction line as a Long.
  942. '
  943. 'See Also
  944. '
  945. 'Coding Example
  946. '    Dim hConstr As Long
  947. '    Dim xc As Double
  948. '    Dim yc As Double
  949. '    'get center of view for construction circle placement
  950. '    xc = (TCWViewExtentsGetX1() + TCWViewExtentsGetX2())/2
  951. '    yc = (TCWViewExtentsGetY1() + TCWViewExtentsGetY2())/2
  952. '    hConstr = TCWConstructionCenterAndPointCircle(xc, yc, 0.0, xc+2#, yc+2#, 0.0)
  953. '    if (hConstr = NULL) then
  954. '        'check error
  955. '        ...
  956. '
  957. 'Declaration
  958. Declare Function TCWConstructionCenterAndPointCircle lib "TCAPI40" ( _ 
  959.     ByVal x0 As Double, _ 
  960.     ByVal y0 As Double, _ 
  961.     ByVal z0 As Double, _ 
  962.     ByVal x1 As Double, _ 
  963.     ByVal y1 As Double, _ 
  964.     ByVal z1 As Double _ 
  965. ) As Long
  966.  
  967. 'Description
  968. 'This function will draw a construction circle that passes through two defined
  969. 'points 180 degrees apart.
  970. '
  971. 'Input Parameters
  972. 'Double x0            X coordinate of the first point 
  973. 'Double y0            Y coordinate of the first point 
  974. 'Double z0            Z coordinate of the first point 
  975. 'Double x1            X coordinate of the second point
  976. 'Double y1            Y coordinate of the second point
  977. 'Double z1            Z coordinate of the second point
  978. '
  979. 'Return Value
  980. 'Returns the handle to the construction line as a Long.
  981. '
  982. 'See Also
  983. '
  984. 'Coding Example
  985. '    Dim hConstr As Long
  986. '    Dim xc As Double
  987. '    Dim yc As Double
  988. '    'get center of view for construction circle placement
  989. '    xc = (TCWViewExtentsGetX1() + TCWViewExtentsGetX2())/2
  990. '    yc = (TCWViewExtentsGetY1() + TCWViewExtentsGetY2())/2
  991. '    hConstr = TCWConstructionDoublePointCircle(xc-2#, yc-2#, 0.0, xc+2#, yc+2#, 0.0)
  992. '    if (hConstr = NULL) then
  993. '        'check error
  994. '        ...
  995. '
  996. 'Declaration
  997. Declare Function TCWConstructionDoublePointCircle lib "TCAPI40" ( _ 
  998.     ByVal x0 As Double, _ 
  999.     ByVal y0 As Double, _ 
  1000.     ByVal z0 As Double, _ 
  1001.     ByVal x1 As Double, _ 
  1002.     ByVal y1 As Double, _ 
  1003.     ByVal z1 As Double _ 
  1004. ) As Long
  1005.  
  1006. 'Description
  1007. 'This function will draw a construction circle that passes through three
  1008. 'defined points.
  1009. '
  1010. 'Input Parameters
  1011. 'Double x0            X coordinate of the first point 
  1012. 'Double y0            Y coordinate of the first point 
  1013. 'Double z0            Z coordinate of the first point 
  1014. 'Double x1            X coordinate of the second point
  1015. 'Double y1            Y coordinate of the second point
  1016. 'Double z1            Z coordinate of the second point
  1017. 'Double x2            X coordinate of the third point 
  1018. 'Double y2            Y coordinate of the third point 
  1019. 'Double z2            Z coordinate of the third point 
  1020. '
  1021. 'Return Value
  1022. 'Returns the handle to the construction line as a Long.
  1023. '
  1024. 'See Also
  1025. '
  1026. 'Coding Example
  1027. '    Dim hConstr As Long
  1028. '    Dim xc As Double
  1029. '    Dim yc As Double
  1030. '    'get center of view for construction circle placement
  1031. '    hConstr = TCWConstructionTriplePointCircle(1#, 1#, 0.0, 2#, 2#, 0.0, 3#,3#, 0.0)
  1032. '    if (hConstr = NULL) then
  1033. '        'check error
  1034. '        ...
  1035. '
  1036. 'Declaration
  1037. Declare Function TCWConstructionTriplePointCircle lib "TCAPI40" ( _ 
  1038.     ByVal x0 As Double, _ 
  1039.     ByVal y0 As Double, _ 
  1040.     ByVal z0 As Double, _ 
  1041.     ByVal x1 As Double, _ 
  1042.     ByVal y1 As Double, _ 
  1043.     ByVal z1 As Double, _ 
  1044.     ByVal x2 As Double, _ 
  1045.     ByVal y2 As Double, _ 
  1046.     ByVal z2 As Double _ 
  1047. ) As Long
  1048.  
  1049. 'Section
  1050. 'DRAWING - Point Creation Functions
  1051.  
  1052. 'These graphic creation functions add the graphic to the drawing.  
  1053. 'Do not use the graphic handle returned from these functions with
  1054. 'TCWGraphicAppend to append to the drawing or another graphic.
  1055.  
  1056. 'Description
  1057. 'This function will create a point that is a "dot".
  1058. '
  1059. 'Input Parameters
  1060. 'Double x0            X coordinate for the point 
  1061. 'Double y0            Y coordinate for the point 
  1062. 'Double z0            Z coordinate for the point 
  1063. '
  1064. 'Return Value
  1065. 'Returns the handle to the point graphic as a Long.
  1066. '
  1067. 'See Also
  1068. 'TCWStar, TCWSquare, TCWCross, TCWCircle
  1069. '
  1070. 'Coding Example
  1071. '    Dim g As Long
  1072. '    g = TCWDot(2.0, 3.0, 0.0)
  1073. '    if (g = NULL)
  1074. '        'check error
  1075. '        ...
  1076. '
  1077. 'Declaration
  1078. Declare Function TCWDot lib "TCAPI40" ( _ 
  1079.     ByVal x0 As Double, _ 
  1080.     ByVal y0 As Double, _ 
  1081.     ByVal z0 As Double _ 
  1082. ) As Long
  1083.  
  1084. 'Description
  1085. 'This function will create a point that is a "star".
  1086. '
  1087. 'Input Parameters
  1088. 'Double x0            X coordinate for the point 
  1089. 'Double y0            Y coordinate for the point 
  1090. 'Double z0            Z coordinate for the point 
  1091. '
  1092. 'Return Value
  1093. 'Returns the handle to the point graphic as a Long.
  1094. '
  1095. 'See Also
  1096. 'TCWDot, TCWSquare, TCWCross, TCWCircle
  1097. '
  1098. 'Coding Example
  1099. '    Dim g As Long
  1100. '    g = TCWStar(2.0, 3.0, 0.0)
  1101. '    if (g = NULL)
  1102. '        'check error
  1103. '        ...
  1104. '
  1105. 'Declaration
  1106. Declare Function TCWStar lib "TCAPI40" ( _ 
  1107.     ByVal x0 As Double, _ 
  1108.     ByVal y0 As Double, _ 
  1109.     ByVal z0 As Double _ 
  1110. ) As Long
  1111.  
  1112. 'Description
  1113. ' This function will create a point that is a "square".
  1114. '
  1115. 'Input Parameters
  1116. 'Double x0            X coordinate for the point 
  1117. 'Double y0            Y coordinate for the point 
  1118. 'Double z0            Z coordinate for the point 
  1119. '
  1120. 'Return Value
  1121. 'Returns the handle to the point graphic as a Long.
  1122. '
  1123. 'See Also
  1124. 'TCWDot, TCWStar, TCWCross, TCWCircle
  1125. '
  1126. 'Coding Example
  1127. '    Dim g As Long
  1128. '    g = TCWSquare(2.0, 3.0, 0.0)
  1129. '    if (g = NULL)
  1130. '        'check error
  1131. '        ...
  1132. '
  1133. 'Declaration
  1134. Declare Function TCWSquare lib "TCAPI40" ( _ 
  1135.     ByVal x0 As Double, _ 
  1136.     ByVal y0 As Double, _ 
  1137.     ByVal z0 As Double _ 
  1138. ) As Long
  1139.  
  1140. 'Description
  1141. ' This function will create a point that is a "cross".
  1142. '
  1143. 'Input Parameters
  1144. 'Double x0            X coordinate for the point 
  1145. 'Double y0            Y coordinate for the point 
  1146. 'Double z0            Z coordinate for the point 
  1147. '
  1148. 'Return Value
  1149. 'Returns the handle to the point graphic as a Long.
  1150. '
  1151. 'See Also
  1152. 'TCWDot, TCWStar, TCWSquare, TCWCircle
  1153. '
  1154. 'Coding Example
  1155. '    Dim g As Long
  1156. '    g = TCWCross(2.0, 3.0, 0.0)
  1157. '    if (g = NULL)
  1158. '        'check error
  1159. '        ...
  1160. '
  1161. 'Declaration
  1162. Declare Function TCWCross lib "TCAPI40" ( _ 
  1163.     ByVal x0 As Double, _ 
  1164.     ByVal y0 As Double, _ 
  1165.     ByVal z0 As Double _ 
  1166. ) As Long
  1167.  
  1168. 'Description
  1169. ' This function will create a point that is a "circle".
  1170. '
  1171. 'Input Parameters
  1172. 'Double x0            X coordinate for the point 
  1173. 'Double y0            Y coordinate for the point 
  1174. 'Double z0            Z coordinate for the point 
  1175. '
  1176. 'Return Value
  1177. 'Returns the handle to the point graphic as a Long.
  1178. '
  1179. 'See Also
  1180. ' TCWDot, TCWStar, TCWSquare, TCWCross
  1181. '
  1182. 'Coding Example
  1183. '    Dim g As Long
  1184. '    g = TCWCircle(2.0, 3.0, 0.0)
  1185. '    if (g = NULL)
  1186. '        'check error
  1187. '        ...
  1188. '
  1189. 'Declaration
  1190. Declare Function TCWCircle lib "TCAPI40" ( _ 
  1191.     ByVal x0 As Double, _ 
  1192.     ByVal y0 As Double, _ 
  1193.     ByVal z0 As Double _ 
  1194. ) As Long
  1195.  
  1196. 'Section
  1197. 'DRAWING - Line Creation Functions
  1198.  
  1199. 'These graphic creation functions add the graphic to the drawing.  
  1200. 'Do not use the graphic handle returned from these functions with
  1201. 'TCWGraphicAppend to append to the drawing or another graphic.
  1202.  
  1203. 'Description
  1204. 'This function will draw a single line segment from two specified end points.
  1205. '
  1206. 'Input Parameters
  1207. 'Double x0            X coordinate for the first point 
  1208. 'Double y0            Y coordinate for the first point 
  1209. 'Double z0            Z coordinate for the first point 
  1210. 'Double x1            X coordinate for the second point
  1211. 'Double y1            Y coordinate for the second point
  1212. 'Double z1            Z coordinate for the second point
  1213. '
  1214. 'Return Value
  1215. 'Returns the handle to the line graphic as a Long.
  1216. '
  1217. 'See Also
  1218. '
  1219. 'Coding Example
  1220. '
  1221. 'Declaration
  1222. Declare Function TCWLineSingle lib "TCAPI40" ( _ 
  1223.     ByVal x0 As Double, _ 
  1224.     ByVal y0 As Double, _ 
  1225.     ByVal z0 As Double, _ 
  1226.     ByVal x1 As Double, _ 
  1227.     ByVal y1 As Double, _ 
  1228.     ByVal z1 As Double _ 
  1229. ) As Long
  1230.  
  1231. 'Description
  1232. 'This function will draw a regular polygon with the specified number
  1233. 'of sides.
  1234. '
  1235. 'Input Parameters
  1236. 'Double x0            X coordinate for the center point
  1237. 'Double y0            Y coordinate for the center point
  1238. 'Double z0            Z coordinate for the center point
  1239. 'Double x1            X coordinate for the corner point
  1240. 'Double y1            Y coordinate for the corner point
  1241. 'Double z1            Z coordinate for the corner point
  1242. 'Long nsides        number of sides 
  1243. '
  1244. 'Return Value
  1245. 'Returns the handle of the polygon graphic as a Long.  The polygon is 
  1246. 'constructed such that it would fit exactly inside a circle with  
  1247. 'the same center and radius.  
  1248. '
  1249. 'See Also
  1250. '
  1251. 'Coding Example
  1252. '
  1253. 'Declaration
  1254. Declare Function TCWLinePolygon lib "TCAPI40" ( _ 
  1255.     ByVal x0 As Double, _ 
  1256.     ByVal y0 As Double, _ 
  1257.     ByVal z0 As Double, _ 
  1258.     ByVal x1 As Double, _ 
  1259.     ByVal y1 As Double, _ 
  1260.     ByVal z1 As Double, _ 
  1261.     ByVal nsides As Long _ 
  1262. ) As Long
  1263.  
  1264. 'Description
  1265. 'This function will draw an orthogonal rectangle.
  1266. '
  1267. 'Input Parameters
  1268. 'Double x0            X coordinate of the upper left corner 
  1269. 'Double y0            Y coordinate of the upper left corner 
  1270. 'Double z0            Z coordinate of the upper left corner 
  1271. 'Double x1            X coordinate of the lower right corner
  1272. 'Double y1            Y coordinate of the lower right corner
  1273. 'Double z1            Z coordinate of the lower right corner
  1274. '
  1275. 'Return Value
  1276. 'Returns the handle of a Graphic as a Long with contains 5 vertices.
  1277. '
  1278. 'See Also
  1279. '
  1280. 'Coding Example
  1281. '
  1282. 'Declaration
  1283. Declare Function TCWLineRectangle lib "TCAPI40" ( _ 
  1284.     ByVal x0 As Double, _ 
  1285.     ByVal y0 As Double, _ 
  1286.     ByVal z0 As Double, _ 
  1287.     ByVal x1 As Double, _ 
  1288.     ByVal y1 As Double, _ 
  1289.     ByVal z1 As Double _ 
  1290. ) As Long
  1291.  
  1292. 'Description
  1293. 'This function will draw a rectangle oriented at the specified angle.
  1294. '
  1295. 'Input Parameters
  1296. 'Double x0            X coordinate of the upper left corner 
  1297. 'Double y0            Y coordinate of the upper left corner 
  1298. 'Double z0            Z coordinate of the upper left corner 
  1299. 'Double x1            X coordinate of the lower right corner
  1300. 'Double y1            Y coordinate of the lower right corner
  1301. 'Double z1            Z coordinate of the lower right corner
  1302. 'Double height        angle of rotation in radians 
  1303. '
  1304. 'Return Value
  1305. 'Returns a handle to a graphic with 5 vertices in the shape of a rectangle.  The
  1306. 'return value is a long. The fifth vertex is equal to the first.  The two points 
  1307. 'are the ends of the  base edge.  The height of the rectangle is drawn in the direction 
  1308. 'that would be a "right turn" when traveling from the first point to the second. 
  1309. '
  1310. 'See Also
  1311. '
  1312. 'Coding Example
  1313. '
  1314. 'Declaration
  1315. Declare Function TCWLineRotatedRectangle lib "TCAPI40" ( _ 
  1316.     ByVal x0 As Double, _ 
  1317.     ByVal y0 As Double, _ 
  1318.     ByVal z0 As Double, _ 
  1319.     ByVal x1 As Double, _ 
  1320.     ByVal y1 As Double, _ 
  1321.     ByVal z1 As Double, _ 
  1322.     ByVal height As Double _ 
  1323. ) As Long
  1324.  
  1325. 'Description
  1326. 'This function will draw a line perpendicular to an existing line.
  1327. '
  1328. 'Input Parameters
  1329. 'Long g            handle of line to make new line perpendicular to 
  1330. 'Double x0            X coordinate of the point on the existing line
  1331. 'Double y0            Y coordinate of the point on the existing line
  1332. 'Double z0            Z coordinate of the point on the existing line
  1333. '
  1334. 'Return Value
  1335. 'Returns the handle of the perpendicular line as a Long.
  1336. '
  1337. 'See Also
  1338. '
  1339. 'Coding Example
  1340. '
  1341. 'Declaration
  1342. Declare Function TCWLinePerpendicular lib "TCAPI40" ( _ 
  1343.     ByVal g As Long, _ 
  1344.     ByVal x0 As Double, _ 
  1345.     ByVal y0 As Double, _ 
  1346.     ByVal z0 As Double _ 
  1347. ) As Long
  1348.  
  1349. 'Description
  1350. 'This function will draw a line parallel to an existing line, at a
  1351. 'specified distance from the line.
  1352. '
  1353. 'Input Parameters
  1354. 'Long g            handle of line to make new line parallel to
  1355. 'Double x0            X coordinate of the new line
  1356. 'Double y0            Y coordinate of the new line
  1357. 'Double z0            Z coordinate of the new line
  1358. '
  1359. 'Return Value
  1360. 'Returns the handle to the new parallel line as a Long.
  1361. '
  1362. 'See Also
  1363. '
  1364. 'Coding Example
  1365. '
  1366. 'Declaration
  1367. Declare Function TCWLineParallel lib "TCAPI40" ( _ 
  1368.     ByVal g As Long, _ 
  1369.     ByVal x0 As Double, _ 
  1370.     ByVal y0 As Double, _ 
  1371.     ByVal z0 As Double _ 
  1372. ) As Long
  1373.  
  1374. 'Section
  1375. 'DRAWING - Multi-line Creation Functions
  1376.  
  1377. 'These graphic creation functions add the graphic to the drawing.  
  1378. 'Do not use the graphic handle returned from these functions with
  1379. 'TCWGraphicAppend to append to the drawing or another graphic.
  1380.  
  1381. 'Description
  1382. 'This function will start the creation of a series of connected segments.
  1383. '
  1384. 'Use TCWGraphicXYZAdd or TCWGraphicVertexAdd to define the next segment.  
  1385. 'Use TCWGraphicClose to close the multi-line into a polygon.  
  1386. '
  1387. 'Input Parameters
  1388. 'Double x0            X coordinate of first end point 
  1389. 'Double y0            Y coordinate of first end point 
  1390. 'Double z0            Z coordinate of first end point 
  1391. '
  1392. 'Return Value
  1393. 'Returns the handle to the graphic as a Long.
  1394. '
  1395. 'See Also
  1396. 'TCWGraphicClose, TCWGraphicXYZAdd, TCWGraphicVertexAdd
  1397. '
  1398. 'Coding Example
  1399. '
  1400. 'Declaration
  1401. Declare Function TCWLineMultiline lib "TCAPI40" ( _ 
  1402.     ByVal x0 As Double, _ 
  1403.     ByVal y0 As Double, _ 
  1404.     ByVal z0 As Double _ 
  1405. ) As Long
  1406.  
  1407. 'Description
  1408. 'This function will start the creation of an irregular polygon.  
  1409. '
  1410. 'Use TCWGraphicXYZAdd or TCWGraphicVertexAdd to define the next point of the polygon.  
  1411. 'Use TCWGraphicClose to close the multi-line into the polygon.
  1412. '
  1413. 'Input Parameters
  1414. 'Double x0            X coordinate of first end point
  1415. 'Double y0            Y coordinate of first end point
  1416. 'Double z0            Z coordinate of first end point
  1417. '
  1418. 'Return Value
  1419. 'Returns the handle to the first segment as a Long.
  1420. '
  1421. 'See Also
  1422. 'TCWGraphicClose, TCWGraphicXYZAdd, TCWGraphicVertexAdd
  1423. '
  1424. 'Coding Example
  1425. '
  1426. 'Declaration
  1427. Declare Function TCWLineIrregularPolygon lib "TCAPI40" ( _ 
  1428.     ByVal x0 As Double, _ 
  1429.     ByVal y0 As Double, _ 
  1430.     ByVal z0 As Double _ 
  1431. ) As Long
  1432.  
  1433. 'Description
  1434. 'This function will start the creation of a series of connected double lines.
  1435. '
  1436. 'Use TCWGraphicXYZAdd or TCWGraphicVertexAdd to define the next point of the segment.  
  1437. 'Use TCWGraphicClose to close the multi-double line into a polygon.  
  1438. '
  1439. 'Input Parameters
  1440. 'Double x0            X coordinate of first end point
  1441. 'Double y0            Y coordinate of first end point
  1442. 'Double z0            Z coordinate of first end point
  1443. '
  1444. 'Return Value
  1445. 'Returns the handle to the graphic as a Long.
  1446. '
  1447. 'See Also
  1448. 'TCWGraphicClose, TCWGraphicXYZAdd, TCWGraphicVertexAdd
  1449. '
  1450. 'Coding Example
  1451. '
  1452. 'Declaration
  1453. Declare Function TCWDoubleLineMultiline lib "TCAPI40" ( _ 
  1454.     ByVal x0 As Double, _ 
  1455.     ByVal y0 As Double, _ 
  1456.     ByVal z0 As Double _ 
  1457. ) As Long
  1458.  
  1459. 'Description
  1460. 'This function will start the creation of a double line polygon with an 
  1461. 'arbitrary number of sides.    
  1462. '
  1463. 'Use TCWGraphicXYZAdd or TCWGraphicVertexAdd to define the next segment. 
  1464. 'Use TCWGraphicClose to close the multi-line into a polygon.  
  1465. '
  1466. 'Input Parameters
  1467. 'Double x0            X coordinate of first end point
  1468. 'Double y0            Y coordinate of first end point
  1469. 'Double z0            Z coordinate of first end point
  1470. '
  1471. 'Return Value
  1472. 'Returns the handle to the graphic as a long.
  1473. '
  1474. 'See Also
  1475. 'TCWGraphicClose, TCWGraphicXYZAdd, TCWGraphicVertexAdd
  1476. '
  1477. 'Coding Example
  1478. '
  1479. 'Declaration
  1480. Declare Function TCWDoubleLineIrregularPolygon lib "TCAPI40" ( _ 
  1481.     ByVal x0 As Double, _ 
  1482.     ByVal y0 As Double, _ 
  1483.     ByVal z0 As Double _ 
  1484. ) As Long
  1485.  
  1486. 'Description
  1487. 'This function will start the creation of a bezier curve, connecting
  1488. 'two end points that will gravitate toward control points along the path.
  1489. '
  1490. 'Use TCWGraphicClose to close the bezier curve, matching the last end point
  1491. 'with the first end point. 
  1492. '
  1493. 'Input Parameters
  1494. 'Double x0            X coordinate of the first end point 
  1495. 'Double y0            Y coordinate of the first end point 
  1496. 'Double z0            Z coordinate of the first end point 
  1497. '
  1498. 'Return Value
  1499. 'Returns the handle to the graphic as a Long.
  1500. '
  1501. 'See Also
  1502. 'TCWGraphicClose, TCWGraphicXYZAdd, TCWGraphicVertexAdd
  1503. '
  1504. 'Coding Example
  1505. '
  1506. 'Declaration
  1507. Declare Function TCWCurveBezier lib "TCAPI40" ( _ 
  1508.     ByVal x0 As Double, _ 
  1509.     ByVal y0 As Double, _ 
  1510.     ByVal z0 As Double _ 
  1511. ) As Long
  1512.  
  1513. 'Description
  1514. 'This function will start the creation of a spline curve, connecting
  1515. 'a series of points into a continuous curve.   
  1516. '
  1517. 'Use TCWGraphicClose to close the spline curve, matching the last end point 
  1518. 'with the first end point. 
  1519. '
  1520. 'Input Parameters
  1521. 'Double x0            X coordinate of the first end point 
  1522. 'Double y0            Y coordinate of the first end point 
  1523. 'Double z0            Z coordinate of the first end point 
  1524. '
  1525. 'Return Value
  1526. 'Returns the handle to the graphic as a Long.
  1527. '
  1528. 'See Also
  1529. 'TCWGraphicClose, TCWGraphicXYZAdd, TCWGraphicVertexAdd
  1530. '
  1531. 'Coding Example
  1532. '
  1533. 'Declaration
  1534. Declare Function TCWCurveSpline lib "TCAPI40" ( _ 
  1535.     ByVal x0 As Double, _ 
  1536.     ByVal y0 As Double, _ 
  1537.     ByVal z0 As Double _ 
  1538. ) As Long
  1539.  
  1540. 'Section
  1541. 'DRAWING - Double Line Creation Functions
  1542.  
  1543. 'These graphic creation functions add the graphic to the drawing.  
  1544. 'Do not use the graphic handle returned from these functions with
  1545. 'TCWGraphicAppend to append to the drawing or another graphic.
  1546.  
  1547. 'Description
  1548. 'This function will draw a double line segment from two specified end points.
  1549. '
  1550. 'Input Parameters
  1551. 'Double x0            X coordinate for the first point 
  1552. 'Double y0            Y coordinate for the first point 
  1553. 'Double z0            Z coordinate for the first point 
  1554. 'Double x1            X coordinate for the second point
  1555. 'Double y1            Y coordinate for the second point
  1556. 'Double z1            Z coordinate for the second point
  1557. '
  1558. 'Return Value
  1559. 'Returns the handle to the double line as a Long.
  1560. '
  1561. 'See Also
  1562. '
  1563. 'Coding Example
  1564. '
  1565. 'Declaration
  1566. Declare Function TCWDoubleLineSingle lib "TCAPI40" ( _ 
  1567.     ByVal x0 As Double, _ 
  1568.     ByVal y0 As Double, _ 
  1569.     ByVal z0 As Double, _ 
  1570.     ByVal x1 As Double, _ 
  1571.     ByVal y1 As Double, _ 
  1572.     ByVal z1 As Double _ 
  1573. ) As Long
  1574.  
  1575. 'Description
  1576. 'This function will draw a regular double line  polygon with the specified 
  1577. 'number of sides.
  1578. '
  1579. 'Input Parameters
  1580. 'Double x0            X coordinate for the center point 
  1581. 'Double y0            Y coordinate for the center point 
  1582. 'Double z0            Z coordinate for the center point 
  1583. 'Double x1            X coordinate for the corner point 
  1584. 'Double y1            Y coordinate for the corner point 
  1585. 'Double z1            Z coordinate for the corner point 
  1586. 'Long nsides        number of sides
  1587. '
  1588. 'Return Value
  1589. 'Returns the handle of the polygon graphic as a Long.  The polygon is 
  1590. 'constructed such that it would fit exactly inside a circle with the same 
  1591. 'center and radius.  
  1592. '
  1593. 'See Also
  1594. '
  1595. 'Coding Example
  1596. '
  1597. 'Declaration
  1598. Declare Function TCWDoubleLinePolygon lib "TCAPI40" ( _ 
  1599.     ByVal x0 As Double, _ 
  1600.     ByVal y0 As Double, _ 
  1601.     ByVal z0 As Double, _ 
  1602.     ByVal x1 As Double, _ 
  1603.     ByVal y1 As Double, _ 
  1604.     ByVal z1 As Double, _ 
  1605.     ByVal nsides As Long _ 
  1606. ) As Long
  1607.  
  1608. 'Description
  1609. 'This function will draw an orthogonal double line rectangle.
  1610. '
  1611. 'Input Parameters
  1612. 'Double x0            X coordinate of the upper left corner 
  1613. 'Double y0            Y coordinate of the upper left corner 
  1614. 'Double z0            Z coordinate of the upper left corner 
  1615. 'Double x1            X coordinate of the lower right corner
  1616. 'Double y1            Y coordinate of the lower right corner
  1617. 'Double z1            Z coordinate of the lower right corner
  1618. '
  1619. 'Return Value
  1620. 'Returns the handle of a graphic with 5 vertices.  The return value is a Long.
  1621. '
  1622. 'See Also
  1623. '
  1624. 'Coding Example
  1625. '
  1626. 'Declaration
  1627. Declare Function TCWDoubleLineRectangle lib "TCAPI40" ( _ 
  1628.     ByVal x0 As Double, _ 
  1629.     ByVal y0 As Double, _ 
  1630.     ByVal z0 As Double, _ 
  1631.     ByVal x1 As Double, _ 
  1632.     ByVal y1 As Double, _ 
  1633.     ByVal z1 As Double _ 
  1634. ) As Long
  1635.  
  1636. 'Description
  1637. 'This function will draw a double line rectangle oriented at the specified angle.
  1638. '
  1639. 'Input Parameters
  1640. 'Double x0            X coordinate of the upper left corner 
  1641. 'Double y0            Y coordinate of the upper left corner 
  1642. 'Double z0            Z coordinate of the upper left corner 
  1643. 'Double x1            X coordinate of the lower right corner
  1644. 'Double y1            Y coordinate of the lower right corner
  1645. 'Double z1            Z coordinate of the lower right corner
  1646. 'Double height        angle of rotation in radians 
  1647. '
  1648. 'Return Value
  1649. 'Returns a handle to a graphic with 5 vertices in the shape of a rectangle.
  1650. 'The fifth vertex is equal to the first.  The two points are the ends of the 
  1651. 'base edge.  The height of the rectangle is drawn in the direction that would 
  1652. 'be a "right turn" when traveling from the first point to the second. 
  1653. '
  1654. 'See Also
  1655. '
  1656. 'Coding Example
  1657. '
  1658. 'Declaration
  1659. Declare Function TCWDoubleLineRotatedRectangle lib "TCAPI40" ( _ 
  1660.     ByVal x0 As Double, _ 
  1661.     ByVal y0 As Double, _ 
  1662.     ByVal z0 As Double, _ 
  1663.     ByVal x1 As Double, _ 
  1664.     ByVal y1 As Double, _ 
  1665.     ByVal z1 As Double, _ 
  1666.     ByVal height As Double _ 
  1667. ) As Long
  1668.  
  1669. 'Description
  1670. 'This function will draw a double line perpendicular to an existing line.
  1671. '
  1672. 'Input Parameters
  1673. 'Long g            handle of line to make new line perpendicular to
  1674. 'Double x0            X coordinate of the point on the existing line
  1675. 'Double y0            Y coordinate of the point on the existing line 
  1676. 'Double z0            Z coordinate of the point on the existing line
  1677. 'Double x1            X coordinate of the second point on the new line
  1678. 'Double y1            Y coordinate of the second point on the new line
  1679. 'Double z1            Z coordinate of the second point on the new line
  1680. '
  1681. 'Return Value
  1682. 'Returns the handle of the perpendicular double line as a Long.
  1683. '
  1684. 'See Also
  1685. '
  1686. 'Coding Example
  1687. '
  1688. 'Declaration
  1689. Declare Function TCWDoubleLinePerpendicular lib "TCAPI40" ( _ 
  1690.     ByVal g As Long, _ 
  1691.     ByVal x0 As Double, _ 
  1692.     ByVal y0 As Double, _ 
  1693.     ByVal z0 As Double, _ 
  1694.     ByVal x1 As Double, _ 
  1695.     ByVal y1 As Double, _ 
  1696.     ByVal z1 As Double _ 
  1697. ) As Long
  1698.  
  1699. 'Description
  1700. 'This function will draw a double line parallel to an existing line, at a
  1701. 'specified distance from the line.
  1702. '
  1703. 'Input Parameters
  1704. 'Long g            handle of line to make new line parallel to
  1705. 'Double x0            X coordinate of the new line
  1706. 'Double y0            Y coordinate of the new line
  1707. 'Double z0            Z coordinate of the new line
  1708. '
  1709. 'Return Value
  1710. 'Returns the handle to the new parallel line as a Long.
  1711. '
  1712. 'See Also
  1713. '
  1714. 'Coding Example
  1715. '
  1716. 'Declaration
  1717. Declare Function TCWDoubleLineParallel lib "TCAPI40" ( _ 
  1718.     ByVal g As Long, _ 
  1719.     ByVal x0 As Double, _ 
  1720.     ByVal y0 As Double, _ 
  1721.     ByVal z0 As Double _ 
  1722. ) As Long
  1723.  
  1724. 'Section
  1725. ' DRAWING - Circle and Ellipse Creation Functions
  1726.  
  1727. 'These graphic creation functions add the graphic to the drawing.  
  1728. 'Do not use the graphic handle returned from these functions with
  1729. 'TCWGraphicAppend to append to the drawing or another graphic.
  1730.  
  1731. 'Description
  1732. 'This function will draw a circle from the specified center point and radius.
  1733. '
  1734. 'Input Parameters
  1735. 'Double x0            X coordinate of the center point
  1736. 'Double y0            Y coordinate of the center point
  1737. 'Double z0            Z coordinate of the center point
  1738. 'Double x1            X coordinate of the radius point
  1739. 'Double y1            Y coordinate of the radius point
  1740. 'Double z1            Z coordinate of the radius point
  1741. '
  1742. 'Return Value
  1743. 'Returns the handle to the circle as a Long.
  1744. '
  1745. 'See Also
  1746. '
  1747. 'Coding Example
  1748. '
  1749. 'Declaration
  1750. Declare Function TCWCircleCenterAndPoint lib "TCAPI40" ( _ 
  1751.     ByVal x0 As Double, _ 
  1752.     ByVal y0 As Double, _ 
  1753.     ByVal z0 As Double, _ 
  1754.     ByVal x1 As Double, _ 
  1755.     ByVal y1 As Double, _ 
  1756.     ByVal z1 As Double _ 
  1757. ) As Long
  1758.  
  1759. 'Description
  1760. 'This function will draw a circle using two opposite points on its perimeter.
  1761. '
  1762. 'Input Parameters
  1763. 'Double x0            X coordinate of the first point 
  1764. 'Double y0            Y coordinate of the first point 
  1765. 'Double z0            Z coordinate of the first point 
  1766. 'Double x1            X coordinate of the second point
  1767. 'Double y1            Y coordinate of the second point
  1768. 'Double z1            Z coordinate of the second point
  1769. '
  1770. 'Return Value
  1771. 'Returns the handle to the circle as a Long.
  1772. '
  1773. 'See Also
  1774. '
  1775. 'Coding Example
  1776. '
  1777. 'Declaration
  1778. Declare Function TCWCircleDoublePoint lib "TCAPI40" ( _ 
  1779.     ByVal x0 As Double, _ 
  1780.     ByVal y0 As Double, _ 
  1781.     ByVal z0 As Double, _ 
  1782.     ByVal x1 As Double, _ 
  1783.     ByVal y1 As Double, _ 
  1784.     ByVal z1 As Double _ 
  1785. ) As Long
  1786.  
  1787. 'Description
  1788. 'This function will draw a circle by defining three point on the circle's
  1789. 'perimeter.
  1790. '
  1791. 'Input Parameters
  1792. 'Double x0            X coordinate of the first point 
  1793. 'Double y0            Y coordinate of the first point 
  1794. 'Double z0            Z coordinate of the first point 
  1795. 'Double x1            X coordinate of the second point
  1796. 'Double y1            Y coordinate of the second point
  1797. 'Double z1            Z coordinate of the second point
  1798. 'Double x2            X coordinate of the third point 
  1799. 'Double y2            Y coordinate of the third point 
  1800. 'Double z2            Z coordinate of the third point 
  1801. '
  1802. 'Return Value
  1803. 'Returns the handle to the circle as a Long.
  1804. '
  1805. 'See Also
  1806. '
  1807. 'Coding Example
  1808. '
  1809. 'Declaration
  1810. Declare Function TCWCircleTriplePoint lib "TCAPI40" ( _ 
  1811.     ByVal x0 As Double, _ 
  1812.     ByVal y0 As Double, _ 
  1813.     ByVal z0 As Double, _ 
  1814.     ByVal x1 As Double, _ 
  1815.     ByVal y1 As Double, _ 
  1816.     ByVal z1 As Double, _ 
  1817.     ByVal x2 As Double, _ 
  1818.     ByVal y2 As Double, _ 
  1819.     ByVal z2 As Double _ 
  1820. ) As Long
  1821.  
  1822. 'Description
  1823. 'This function will draw an ellipse by defining its bounding rectangle.
  1824. '
  1825. 'Input Parameters
  1826. 'Double x0            X coordinate of bounding rectangle's upper left corner 
  1827. 'Double y0            Y coordinate of bounding rectangle's upper left corner 
  1828. 'Double z0            Z coordinate of bounding rectangle's upper left corner 
  1829. 'Double x1            X coordinate of bounding rectangle's lower right corner
  1830. 'Double y1            Y coordinate of bounding rectangle's lower right corner
  1831. 'Double z1            Z coordinate of bounding rectangle's lower right corner
  1832. '
  1833. 'Return Value
  1834. 'Returns the handle to the ellipse as a Long.
  1835. '
  1836. 'See Also
  1837. '
  1838. 'Coding Example
  1839. '
  1840. 'Declaration
  1841. Declare Function TCWEllipse lib "TCAPI40" ( _ 
  1842.     ByVal x0 As Double, _ 
  1843.     ByVal y0 As Double, _ 
  1844.     ByVal z0 As Double, _ 
  1845.     ByVal x1 As Double, _ 
  1846.     ByVal y1 As Double, _ 
  1847.     ByVal z1 As Double _ 
  1848. ) As Long
  1849.  
  1850. 'Description
  1851. 'This function will draw an ellipse rotated by specifying the ellipse's
  1852. 'center point, and major and minor axis radius points.
  1853. '
  1854. 'Input Parameters
  1855. 'Double x0            X coordinate of ellipse's center point 
  1856. 'Double y0            Y coordinate of ellipse's center point 
  1857. 'Double z0            Z coordinate of ellipse's center point 
  1858. 'Double x1            X coordinate of major axis radius point
  1859. 'Double y1            Y coordinate of major axis radius point
  1860. 'Double z1            Z coordinate of major axis radius point
  1861. 'Double x2            X coordinate of minor axis radius point
  1862. 'Double y2            Y coordinate of minor axis radius point
  1863. 'Double z2            Z coordinate of minor axis radius point
  1864. '
  1865. 'Return Value
  1866. 'Returns the handle of the rotated ellipse as a Long.
  1867. '
  1868. 'See Also
  1869. '
  1870. 'Coding Example
  1871. '
  1872. 'Declaration
  1873. Declare Function TCWEllipseRotatedEllipse lib "TCAPI40" ( _ 
  1874.     ByVal x0 As Double, _ 
  1875.     ByVal y0 As Double, _ 
  1876.     ByVal z0 As Double, _ 
  1877.     ByVal x1 As Double, _ 
  1878.     ByVal y1 As Double, _ 
  1879.     ByVal z1 As Double, _ 
  1880.     ByVal x2 As Double, _ 
  1881.     ByVal y2 As Double, _ 
  1882.     ByVal z2 As Double _ 
  1883. ) As Long
  1884.  
  1885. 'Description
  1886. 'This function will draw an ellipse, specified by the ratio of the
  1887. 'major axis length to the minor axis length.
  1888. '
  1889. 'Input Parameters
  1890. 'Double x0            X coordinate of ellipse's center point
  1891. 'Double y0            Y coordinate of ellipse's center point
  1892. 'Double z0            Z coordinate of ellipse's center point
  1893. 'Double x1            X coordinate of radius in Y direction 
  1894. 'Double y1            Y coordinate of radius in Y direction 
  1895. 'Double z1            Z coordinate of radius in Y direction 
  1896. 'Double xyratio    ratio of Rx/Ry 
  1897. '
  1898. 'Return Value
  1899. 'Returns the handle to the ellipse as a Long.
  1900. '
  1901. 'See Also
  1902. '
  1903. 'Coding Example
  1904. '
  1905. 'Declaration
  1906. Declare Function TCWEllipseFixedRatio lib "TCAPI40" ( _ 
  1907.     ByVal x0 As Double, _ 
  1908.     ByVal y0 As Double, _ 
  1909.     ByVal z0 As Double, _ 
  1910.     ByVal x1 As Double, _ 
  1911.     ByVal y1 As Double, _ 
  1912.     ByVal z1 As Double, _ 
  1913.     ByVal xyratio As Double _ 
  1914. ) As Long
  1915.  
  1916. 'Section
  1917. 'DRAWING - Arc Creation Functions
  1918.  
  1919. 'These graphic creation functions add the graphic to the drawing.  
  1920. 'Do not use the graphic handle returned from these functions with
  1921. 'TCWGraphicAppend to append to the drawing or another graphic.
  1922.  
  1923. 'Description
  1924. 'This function will draw a circular arc specified by it's center point,
  1925. 'point on it's circumference and a start and end angle. 
  1926. '
  1927. 'Input Parameters
  1928. 'Double x0            X coordinate of arc's center point
  1929. 'Double y0            Y coordinate of arc's center point
  1930. 'Double z0            Z coordinate of arc's center point
  1931. 'Double x1            X coordinate of the radius point
  1932. 'Double y1            Y coordinate of the radius point
  1933. 'Double z1            Z coordinate of the radius point
  1934. 'Double startangle    starting angle in radians
  1935. 'Double endangle    ending angle in radians 
  1936. '
  1937. 'Return Value
  1938. 'Returns the handle of the arc as a Long.
  1939. '
  1940. 'See Also
  1941. '
  1942. 'Coding Example
  1943. '
  1944. 'Declaration
  1945. Declare Function TCWArcCenterAndPoint lib "TCAPI40" ( _ 
  1946.     ByVal x0 As Double, _ 
  1947.     ByVal y0 As Double, _ 
  1948.     ByVal z0 As Double, _ 
  1949.     ByVal x1 As Double, _ 
  1950.     ByVal y1 As Double, _ 
  1951.     ByVal z1 As Double, _ 
  1952.     ByVal startangle As Double, _ 
  1953.     ByVal endangle As Double _ 
  1954. ) As Long
  1955.  
  1956. 'Description
  1957. 'This function will draw a circular arc from specified end points
  1958. 'of its diameter.
  1959. '
  1960. 'Input Parameters
  1961. 'Double x0            X coordinate of first end point 
  1962. 'Double y0            Y coordinate of first end point 
  1963. 'Double z0            Z coordinate of first end point 
  1964. 'Double x1            X coordinate of second end point
  1965. 'Double y1            Y coordinate of second end point 
  1966. 'Double z1            Z coordinate of second end point
  1967. 'Double startangle    starting angle in radians 
  1968. 'Double endangle    ending angle in radians
  1969. '
  1970. 'Return Value
  1971. 'Returns the handle to the arc as a Long.
  1972. '
  1973. 'See Also
  1974. '
  1975. 'Coding Example
  1976. '
  1977. 'Declaration
  1978. Declare Function TCWArcDoublePoint lib "TCAPI40" ( _ 
  1979.     ByVal x0 As Double, _ 
  1980.     ByVal y0 As Double, _ 
  1981.     ByVal z0 As Double, _ 
  1982.     ByVal x1 As Double, _ 
  1983.     ByVal y1 As Double, _ 
  1984.     ByVal z1 As Double, _ 
  1985.     ByVal startangle As Double, _ 
  1986.     ByVal endangle As Double _ 
  1987. ) As Long
  1988.  
  1989. 'Description
  1990. 'This function will draw a circular arc by defining (1) its starting
  1991. 'point, (2) a point on its perimeter and (3) its ending point.
  1992. '
  1993. 'Input Parameters
  1994. 'Double x0            X coordinate of starting point 
  1995. 'Double y0            Y coordinate of starting point 
  1996. 'Double z0            Z coordinate of starting point 
  1997. 'Double x1            X coordinate of point on perimeter 
  1998. 'Double y1            Y coordinate of point on perimeter 
  1999. 'Double z1            Z coordinate of point on perimeter 
  2000. 'Double x2            X coordinate of ending point
  2001. 'Double y2            Y coordinate of ending point
  2002. 'Double z2            Z coordinate of ending point
  2003. '
  2004. 'Return Value
  2005. 'Returns the handle to the arc as a Long.
  2006. '
  2007. 'See Also
  2008. '
  2009. 'Coding Example
  2010. '
  2011. 'Declaration
  2012. Declare Function TCWArcTriplePoint lib "TCAPI40" ( _ 
  2013.     ByVal x0 As Double, _ 
  2014.     ByVal y0 As Double, _ 
  2015.     ByVal z0 As Double, _ 
  2016.     ByVal x1 As Double, _ 
  2017.     ByVal y1 As Double, _ 
  2018.     ByVal z1 As Double, _ 
  2019.     ByVal x2 As Double, _ 
  2020.     ByVal y2 As Double, _ 
  2021.     ByVal z2 As Double _ 
  2022. ) As Long
  2023.  
  2024. 'Description
  2025. 'This function will draw an elliptical arc specified by its bounding
  2026. 'rectangle, starting and ending angles.
  2027. '
  2028. 'Input Parameters
  2029. 'Double x0            X coordinate of bounding rectangle's upper left corner 
  2030. 'Double y0            Y coordinate of bounding rectangle's upper left corner 
  2031. 'Double z0            Z coordinate of bounding rectangle's upper left corner 
  2032. 'Double x1            X coordinate of bounding rectangle's lower right corner
  2033. 'Double y1            Y coordinate of bounding rectangle's lower right corner
  2034. 'Double z1            Z coordinate of bounding rectangle's lower right corner
  2035. 'Double startangle    starting angle in radians 
  2036. 'Double endangle    ending angle in radians 
  2037. '
  2038. 'Return Value
  2039. 'Returns a handle to the elliptical arc as a Long.
  2040. '
  2041. 'See Also
  2042. '
  2043. 'Coding Example
  2044. '
  2045. 'Declaration
  2046. Declare Function TCWArcElliptical lib "TCAPI40" ( _ 
  2047.     ByVal x0 As Double, _ 
  2048.     ByVal y0 As Double, _ 
  2049.     ByVal z0 As Double, _ 
  2050.     ByVal x1 As Double, _ 
  2051.     ByVal y1 As Double, _ 
  2052.     ByVal z1 As Double, _ 
  2053.     ByVal startangle As Double, _ 
  2054.     ByVal endangle As Double _ 
  2055. ) As Long
  2056.  
  2057. 'Description
  2058. 'This function will draw an elliptical arc rotated by specifying the ellipse's
  2059. 'center point, and major and minor axis radius points, start and end angles.
  2060. '
  2061. 'Input Parameters
  2062. 'Double x0            X coordinate of elliptical arc's center point
  2063. 'Double y0            Y coordinate of elliptical arc's center point
  2064. 'Double z0            Z coordinate of elliptical arc's center point
  2065. 'Double x1            X coordinate of major axis radius point
  2066. 'Double y1            Y coordinate of major axis radius point
  2067. 'Double z1            Z coordinate of major axis radius point
  2068. 'Double x2            X coordinate of minor axis radius point
  2069. 'Double y2            Y coordinate of minor axis radius point
  2070. 'Double z2            Z coordinate of minor axis radius point
  2071. 'Double startangle    starting angle in radians 
  2072. 'Double endangle    ending angle in radians
  2073. '
  2074. 'Return Value
  2075. 'Returns the handle of the rotated elliptical arc as a Long.
  2076. '
  2077. 'See Also
  2078. '
  2079. 'Coding Example
  2080. '
  2081. 'Declaration
  2082. Declare Function TCWArcRotatedElliptical lib "TCAPI40" ( _ 
  2083.     ByVal x0 As Double, _ 
  2084.     ByVal y0 As Double, _ 
  2085.     ByVal z0 As Double, _ 
  2086.     ByVal x1 As Double, _ 
  2087.     ByVal y1 As Double, _ 
  2088.     ByVal z1 As Double, _ 
  2089.     ByVal x2 As Double, _ 
  2090.     ByVal y2 As Double, _ 
  2091.     ByVal z2 As Double, _ 
  2092.     ByVal startangle As Double, _ 
  2093.     ByVal endangle As Double _ 
  2094. ) As Long
  2095.  
  2096. 'Description
  2097. 'This function will draw an elliptical arc, specified by the ratio of the
  2098. 'major axis length to the minor axis length.
  2099. '
  2100. 'Input Parameters
  2101. 'Double x0            X coordinate of ellipse's center point
  2102. 'Double y0            Y coordinate of ellipse's center point
  2103. 'Double z0            Z coordinate of ellipse's center point
  2104. 'Double x1            X coordinate of radius in Y direction 
  2105. 'Double y1            Y coordinate of radius in Y direction 
  2106. 'Double z1            Z coordinate of radius in Y direction 
  2107. 'Double xyratio    ratio of Rx/Ry
  2108. 'Double startangle    starting angle in radians
  2109. 'Double endangle    ending angle in radians 
  2110. '
  2111. 'Return Value
  2112. 'Returns the handle to the ellipse as a Long.
  2113. '
  2114. 'See Also
  2115. '
  2116. 'Coding Example
  2117. '
  2118. 'Declaration
  2119. Declare Function TCWArcEllipticalFixedRatio lib "TCAPI40" ( _ 
  2120.     ByVal x0 As Double, _ 
  2121.     ByVal y0 As Double, _ 
  2122.     ByVal z0 As Double, _ 
  2123.     ByVal x1 As Double, _ 
  2124.     ByVal y1 As Double, _ 
  2125.     ByVal z1 As Double, _ 
  2126.     ByVal xyratio As Double, _ 
  2127.     ByVal startangle As Double, _ 
  2128.     ByVal endangle As Double _ 
  2129. ) As Long
  2130.  
  2131. 'Section
  2132. 'DRAWING - Text Creation Function
  2133.  
  2134. 'This graphic creation function adds the graphic to the drawing.  
  2135. 'Do not use the graphic handle returned from this function with
  2136. 'TCWGraphicAppend to append to the drawing or another graphic.
  2137.  
  2138. 'Description
  2139. 'This function will create text starting at the point specified.
  2140. '
  2141. 'Input Parameters
  2142. 'Double x0            X coordinate of text's starting point
  2143. 'Double y0            Y coordinate of text's starting point
  2144. 'Double z0            Z coordinate of text's starting point
  2145. 'String textstr    text string
  2146. 'Double size        font size
  2147. 'Double angle        angle of text
  2148. '
  2149. 'Return Value
  2150. 'Returns a handle to the text.
  2151. '
  2152. 'See Also
  2153. '
  2154. 'Coding Example
  2155. '
  2156. 'Declaration
  2157. Declare Function TCWText lib "TCAPI40" ( _ 
  2158.     ByVal x0 As Double, _ 
  2159.     ByVal y0 As Double, _ 
  2160.     ByVal z0 As Double, _ 
  2161.     ByRef textstr As String, _ 
  2162.     ByVal size As Double, _ 
  2163.     ByVal angle As Double _ 
  2164. ) As Long
  2165.  
  2166. 'Section
  2167. 'DRAWING - Dimension Creation Functions
  2168.  
  2169. 'These graphic creation functions add the graphic to the drawing.  
  2170. 'Do not use the graphic handle returned from these functions with
  2171. 'TCWGraphicAppend to append to the drawing or another graphic.
  2172.  
  2173. 'Description
  2174. 'This function will create a linear dimension showing horizontal distance.
  2175. '
  2176. 'Input Parameters
  2177. 'Double x0            X coordinate of first extension line 
  2178. 'Double y0            Y coordinate of first extension line 
  2179. 'Double z0            Z coordinate of first extension line 
  2180. 'Double x1            X coordinate of second extension line
  2181. 'Double y1            Y coordinate of second extension line
  2182. 'Double z1            Z coordinate of second extension line
  2183. 'Double x2            X coordinate of dimension 
  2184. 'Double y2            Y coordinate of dimension 
  2185. 'Double z2            Z coordinate of dimension 
  2186. '
  2187. 'Return Value
  2188. 'Returns the handle to the dimension as a Long.
  2189. '
  2190. 'See Also
  2191. '
  2192. 'Coding Example
  2193. '
  2194. 'Declaration
  2195. Declare Function TCWDimensionHorizontal lib "TCAPI40" ( _ 
  2196.     ByVal x0 As Double, _ 
  2197.     ByVal y0 As Double, _ 
  2198.     ByVal z0 As Double, _ 
  2199.     ByVal x1 As Double, _ 
  2200.     ByVal y1 As Double, _ 
  2201.     ByVal z1 As Double, _ 
  2202.     ByVal x2 As Double, _ 
  2203.     ByVal y2 As Double, _ 
  2204.     ByVal z2 As Double _ 
  2205. ) As Long
  2206.  
  2207. 'Description
  2208. 'This function will create a linear dimension showing horizontal distance.
  2209. '
  2210. 'Input Parameters
  2211. 'Long g            entity to horizontally dimension 
  2212. 'Double x0            X coordinate for dimension line location
  2213. 'Double y0            Y coordinate for dimension line location
  2214. 'Double z0            Z coordinate for dimension line location
  2215. '
  2216. 'Return Value
  2217. 'Returns the handle to the dimension as a Long.
  2218. '
  2219. 'See Also
  2220. '
  2221. 'Coding Example
  2222. '
  2223. 'Declaration
  2224. Declare Function TCWDimensionHorizontalEntity lib "TCAPI40" ( _ 
  2225.     ByVal g As Long, _ 
  2226.     ByVal x0 As Double, _ 
  2227.     ByVal y0 As Double, _ 
  2228.     ByVal z0 As Double _ 
  2229. ) As Long
  2230.  
  2231. 'Description
  2232. 'This function will create a linear dimension showing vertical distance.
  2233. '
  2234. 'Input Parameters
  2235. 'Double x0            X coordinate of first extension line 
  2236. 'Double y0            Y coordinate of first extension line 
  2237. 'Double z0            Z coordinate of first extension line 
  2238. 'Double x1            X coordinate of second extension line
  2239. 'Double y1            Y coordinate of second extension line
  2240. 'Double z1            Z coordinate of second extension line
  2241. 'Double x2            X coordinate of dimension 
  2242. 'Double y2            Y coordinate of dimension 
  2243. 'Double z2            Z coordinate of dimension 
  2244. '
  2245. 'Return Value
  2246. 'Returns the handle to the dimension as a Long.
  2247. '
  2248. 'See Also
  2249. '
  2250. 'Coding Example
  2251. '
  2252. 'Declaration
  2253. Declare Function TCWDimensionVertical lib "TCAPI40" ( _ 
  2254.     ByVal x0 As Double, _ 
  2255.     ByVal y0 As Double, _ 
  2256.     ByVal z0 As Double, _ 
  2257.     ByVal x1 As Double, _ 
  2258.     ByVal y1 As Double, _ 
  2259.     ByVal z1 As Double, _ 
  2260.     ByVal x2 As Double, _ 
  2261.     ByVal y2 As Double, _ 
  2262.     ByVal z2 As Double _ 
  2263. ) As Long
  2264.  
  2265. 'Description
  2266. 'This function will create a linear dimension showing vertical distance.
  2267. '
  2268. 'Input Parameters
  2269. 'Long g            entity to vertically dimension 
  2270. 'Double x0            X coordinate for dimension line location 
  2271. 'Double y0            Y coordinate for dimension line location
  2272. 'Double z0            Z coordinate for dimension line location
  2273. '
  2274. 'Return Value
  2275. 'Returns the handle to the dimension as a Long.
  2276. '
  2277. 'See Also
  2278. '
  2279. 'Coding Example
  2280. '
  2281. 'Declaration
  2282. Declare Function TCWDimensionVerticalEntity lib "TCAPI40" ( _ 
  2283.     ByVal g As Long, _ 
  2284.     ByVal x0 As Double, _ 
  2285.     ByVal y0 As Double, _ 
  2286.     ByVal z0 As Double _ 
  2287. ) As Long
  2288.  
  2289. 'Description
  2290. 'This function will create a linear dimension showing absolute distance
  2291. 'between two points.
  2292. '
  2293. 'Input Parameters
  2294. 'Double x0            X coordinate of first extension line 
  2295. 'Double y0            Y coordinate of first extension line 
  2296. 'Double z0            Z coordinate of first extension line 
  2297. 'Double x1            X coordinate of second extension line
  2298. 'Double y1            Y coordinate of second extension line
  2299. 'Double z1            Z coordinate of second extension line
  2300. 'Double x2            X coordinate of dimension 
  2301. 'Double y2            Y coordinate of dimension 
  2302. 'Double z2            Z coordinate of dimension 
  2303. '
  2304. 'Return Value
  2305. 'Returns the handle to the dimension as a Long.
  2306. '
  2307. 'See Also
  2308. '
  2309. 'Coding Example
  2310. '
  2311. 'Declaration
  2312. Declare Function TCWDimensionParallel lib "TCAPI40" ( _ 
  2313.     ByVal x0 As Double, _ 
  2314.     ByVal y0 As Double, _ 
  2315.     ByVal z0 As Double, _ 
  2316.     ByVal x1 As Double, _ 
  2317.     ByVal y1 As Double, _ 
  2318.     ByVal z1 As Double, _ 
  2319.     ByVal x2 As Double, _ 
  2320.     ByVal y2 As Double, _ 
  2321.     ByVal z2 As Double _ 
  2322. ) As Long
  2323.  
  2324. 'Description
  2325. 'This function will create a linear dimension showing parallel distance.
  2326. '
  2327. 'Input Parameters
  2328. 'Long g            entity to dimension 
  2329. 'Double x0            X coordinate for dimension line location 
  2330. 'Double y0            Y coordinate for dimension line location
  2331. 'Double z0            Z coordinate for dimension line location
  2332. '
  2333. 'Return Value
  2334. 'Returns the handle to the dimension as a Long.
  2335. '
  2336. 'See Also
  2337. '
  2338. 'Coding Example
  2339. '
  2340. 'Declaration
  2341. Declare Function TCWDimensionParallelEntity lib "TCAPI40" ( _ 
  2342.     ByVal g As Long, _ 
  2343.     ByVal x0 As Double, _ 
  2344.     ByVal y0 As Double, _ 
  2345.     ByVal z0 As Double _ 
  2346. ) As Long
  2347.  
  2348. 'Section
  2349. 'DRAWING - Undo Record Functions
  2350.  
  2351. 'Use these functions to create your own kind of undo which includes one or
  2352. 'more operations. Then, with one undo you can get back to the beginning.
  2353. 'TCADAPI will create undo records for all align functions, graphic creation and 
  2354. 'deletion, selection deletion, selection scaling, rotating and moving, explode, and group. 
  2355.  
  2356. 'Description
  2357. 'This function will start an undo record.  NOTE: a start record MUST be matched 
  2358. 'with an end record.
  2359. '
  2360. 'Input Parameters
  2361. 'Long d            handle of a drawing 
  2362. 'String title        string to associate with undo record   
  2363. '
  2364. 'Return Value
  2365. '0 if no errors.  Non-zero if an error occurred. Use TCWLastErrorGet to retrieve 
  2366. 'error string.
  2367. '
  2368. 'See Also
  2369. 'TCWUndoRecordAddGraphic, TCWUndoRecordEnd
  2370. '
  2371. 'Coding Example
  2372. '
  2373. 'Declaration
  2374. Declare Function TCWUndoRecordStart lib "TCAPI40" ( _ 
  2375.     ByVal d As Long, _ 
  2376.     ByRef title As String _ 
  2377. ) As Long
  2378.  
  2379. 'Description
  2380. 'This function will add graphics to the undo record.  Use this
  2381. 'function to accumulate graphics that you may want to undo.
  2382. '
  2383. 'Input Parameters
  2384. 'Long d            handle of a drawing 
  2385. 'Long g            graphic to add to undo record 
  2386. '
  2387. 'Return Value
  2388. '0 if no errors.  Non-zero if an error occurred. Use TCWLastErrorGet to retrieve 
  2389. 'error string.
  2390. '
  2391. 'See Also
  2392. 'TCWUndoRecordStart, TCWUndoRecordEnd
  2393. '
  2394. 'Coding Example
  2395. '
  2396. 'Declaration
  2397. Declare Function TCWUndoRecordAddGraphic lib "TCAPI40" ( _ 
  2398.     ByVal d As Long, _ 
  2399.     ByVal g As Long _ 
  2400. ) As Long
  2401.  
  2402. 'Description
  2403. 'This function will close an opened undo record.
  2404. '
  2405. 'Input Parameters
  2406. 'Long d            handle of a drawing
  2407. '
  2408. 'Return Value
  2409. '0 if no errors.  Non-zero if an error occurred. Use TCWLastErrorGet to retrieve 
  2410. 'error string.
  2411. '
  2412. 'See Also
  2413. 'TCWUndoRecordStart, TCWUndoRecordAddGraphic
  2414. '
  2415. 'Coding Example
  2416. '
  2417. 'Declaration
  2418. Declare Function TCWUndoRecordEnd lib "TCAPI40" ( _ 
  2419.     ByVal d As Long _ 
  2420. ) As Long
  2421.  
  2422. 'Section
  2423. 'DRAWING - Block Functions
  2424.  
  2425. 'Description
  2426. 'This function will return the handle of a block with the specified
  2427. 'block name.
  2428. '
  2429. 'Input Parameters
  2430. 'String blockname            name of block to return 
  2431. '
  2432. 'Return Value
  2433. 'Handle of the block as a Long.
  2434. '
  2435. 'See Also
  2436. '
  2437. 'Coding Example
  2438. '
  2439. 'Declaration
  2440. Declare Function TCWBlockGet lib "TCAPI40" ( _ 
  2441.     ByRef blockname As String _ 
  2442. ) As Long
  2443.  
  2444. 'Description
  2445. 'This function will create a block from the selected graphics.  The block
  2446. 'will be named from the name specified. 
  2447. '
  2448. 'Input Parameters
  2449. 'String blockname    string for block name 
  2450. '
  2451. 'Return Value
  2452. '0 if no errors.  Non-zero if an error occurred. Use TCWLastErrorGet to retrieve 
  2453. 'error string.
  2454. 'See Also
  2455. '
  2456. 'Coding Example
  2457. '
  2458. 'Declaration
  2459. Declare Function TCWBlockCreate lib "TCAPI40" ( _ 
  2460.     ByRef blockname As String _ 
  2461. ) As Long
  2462.  
  2463. 'Description
  2464. 'This function will insert a block into the drawing.
  2465. '
  2466. 'Input Parameters
  2467. 'String blockname    block name to insert 
  2468. 'Double x0            x coordinate for where to insert block
  2469. 'Double y0            y coordinate for where to insert block
  2470. 'Double z0            z coordinate for where to insert block
  2471. '
  2472. 'Return Value
  2473. 'Returns the handle to the new instance of the block as a Long.
  2474. '
  2475. 'See Also
  2476. '
  2477. 'Coding Example
  2478. '
  2479. 'Declaration
  2480. Declare Function TCWBlockInsert lib "TCAPI40" ( _ 
  2481.     ByRef blockname As String, _ 
  2482.     ByVal x0 As Double, _ 
  2483.     ByVal y0 As Double, _ 
  2484.     ByVal z0 As Double _ 
  2485. ) As Long
  2486.  
  2487. 'Section
  2488. 'DRAWING - Get and Set Property Functions
  2489.  
  2490. 'Description
  2491. 'This function will return the value of the property that has been
  2492. 'requested.  This function is written in Basic due to problems with Enable
  2493. 'not supporting Variants with DLLs.
  2494. '
  2495. 'Input Parameters
  2496. 'String propertyname        name of property look up 
  2497. '
  2498. 'AVAILABLE PROPERTIES:        DESCRIPTION:
  2499. '"PenColor"                pen color as &H00bbggrr or -3 for by layer, -4 for by block
  2500. '"PenWidth"                pen width as a Double
  2501. '"PenScale"                pen scale as a Double
  2502. '"PenStyle"                pen style as a Integer 
  2503. '"BrushColor"                brush color as &H00bbggrr or -3 for by layer, -4 for by block or -5 for by pen
  2504. '"BrushScale"                brush scale as a Double
  2505. '"BrushAngle"                brush angle as a Double
  2506. '"BrushStyle"                brush style as a Double
  2507. '"TextStyle"                flags: &H0000 = regular, &H0001 = italic, &H0002 = bold, &H0004 = strikethru, &H0008 = hidden, &H0040 = allcaps
  2508. '"ScaleSystem"                0 for world, 1 for paper, 2 for device
  2509. '"BrushDrawMode"            brush drawing mode as n Integer
  2510. '"PenAlignment"            pen alignment as a String
  2511. '"HatchCross"                hatch cross as an Integer
  2512. '"Layer"                    layer id as an Integer
  2513. '"Info"                    info string as a String
  2514. '"TextFont"                text font as a String
  2515. '"TextFormat"                0 for left justify, 1 for center, 2 for right justify
  2516. '"TextSize"                text size as a Double
  2517. '
  2518. 'Return Value
  2519. 'Value of property requested.
  2520. '
  2521. 'AVAILABLE PROPERTIES:        VALUE RETURNED:
  2522. '"PenColor"                (Long)
  2523. '"PenWidth"                (Double)
  2524. '"PenScale"                (Double)
  2525. '"PenStyle"                (Integer) 
  2526. '"BrushColor"                (Long)
  2527. '"BrushScale"                (Double)
  2528. '"BrushAngle"                (Double)
  2529. '"BrushStyle"                (Double)
  2530. '"TextStyle"                (Integer)
  2531. '"ScaleSystem"                (Integer)
  2532. '"BrushDrawMode"            (Integer)
  2533. '"PenAlignment"            (String)
  2534. '"HatchCross"                (Integer)
  2535. '"Layer"                    (Integer)
  2536. '"Info"                    (String)
  2537. '"TextFont"                (String)
  2538. '"TextFormat"                (Integer)
  2539. '"TextSize"                (Double)
  2540. '
  2541. 'See Also
  2542. '
  2543. 'Coding Example
  2544. '
  2545. 'Declaration
  2546. 'Declare Function TCWDrawingPropertyGet ( _ 
  2547. '    ByRef propertyname As String _ 
  2548. ')As Variant
  2549.  
  2550. 'Description
  2551. 'This function will set the property with the specified value.
  2552. '
  2553. 'Input Parameters
  2554. 'String propertyname        name of property to modify 
  2555. 'Variant value                value to set to 
  2556. '
  2557. 'AVAILABLE PROPERTIES:        DESCRIPTION:
  2558. '"PenColor"                pen color as &H00bbggrr or -3 for by layer, -4 for by block
  2559. '"PenWidth"                pen width as a Double
  2560. '"PenScale"                pen scale as a Double
  2561. '"PenStyle"                pen style as a Integer 
  2562. '"BrushColor"                brush color as &H00bbggrr or -3 for by layer, -4 for by block or -5 for by pen
  2563. '"BrushScale"                brush scale as a Double
  2564. '"BrushAngle"                brush angle as a Double
  2565. '"BrushStyle"                brush style as a Double
  2566. '"TextStyle"                flags: &H0000 = regular, &H0001 = italic, &H0002 = bold, &H0004 = strikethru, &H0008 = hidden, &H0040 = allcaps
  2567. '"ScaleSystem"                0 for world, 1 for paper, 2 for device
  2568. '"BrushDrawMode"            brush drawing mode as n Integer
  2569. '"PenAlignment"            pen alignment as a String
  2570. '"HatchCross"                hatch cross as an Integer
  2571. '"Layer"                    layer id as an Integer
  2572. '"Info"                    info string as a String
  2573. '"TextFont"                text font as a String
  2574. '"TextFormat"                0 for left justify, 1 for center, 2 for right justify
  2575. '"TextSize"                text size as a Double
  2576. '
  2577. 'Return Value
  2578. '0 if no errors.  Non-zero if errors.  Use TCWLastErrorGet to retrieve error string.
  2579. '
  2580. 'See Also
  2581. '
  2582. 'Coding Example
  2583. '
  2584. 'Declaration
  2585. 'Declare Function TCWDrawingPropertySet ( _ 
  2586. '    ByRef propertyname As String, _ 
  2587. '    ByVal value As Variant _ 
  2588. ')As Long
  2589.  
  2590. 'Section
  2591. 'GRAPHICS - Graphic Functions
  2592.  
  2593. 'Description
  2594. 'This function will return the number of graphics in the drawing or it will return 
  2595. 'the number of graphics contained in a graphic.  If you supply a drawing handle as 
  2596. 'the first parameter to the function, the count will be the number of top level
  2597. 'graphics in the drawing.  If you supply a graphic handle as the first parameter to 
  2598. 'the function, the count will be the number of graphics contained in the graphic.
  2599. 'This function can be used with TCWGraphicAt to cycle through all the graphics in the 
  2600. 'drawing or graphic.
  2601. '
  2602. 'Input Parameters
  2603. 'Long handle            handle of the drawing or graphic
  2604. '
  2605. 'Return Value
  2606. 'Number of graphics in the drawing or graphic as a Long.
  2607. '
  2608. 'See Also
  2609. 'TCWGraphicAt
  2610. '
  2611. 'Coding Example
  2612. '
  2613. 'Declaration
  2614. Declare Function TCWGraphicCount lib "TCAPI40" ( _ 
  2615.     ByVal d As Long _ 
  2616. ) As Long
  2617.  
  2618. 'Description
  2619. 'This function will return the handle to the requested graphic.  The index
  2620. 'should be a number from 0 to the value-1 returned by TCWGraphicCount.  If you
  2621. 'are cycling through the graphics in the drawing, use the drawing handle you
  2622. 'used with TCWGraphicCount.  If you are cycling through the graphics within a
  2623. 'graphic, use the graphic handle you used with TCWGraphicCount.
  2624. '
  2625. 'Input Parameters
  2626. 'Long handle        handle to a drawing or a graphic
  2627. 'Long index        requested graphic index
  2628. '
  2629. 'Return Value
  2630. 'Handle of the graphic as a Long.
  2631. '
  2632. 'See Also
  2633. '
  2634. 'Coding Example
  2635. '
  2636. 'Declaration
  2637. Declare Function TCWGraphicAt lib "TCAPI40" ( _ 
  2638.     ByVal d As Long, _ 
  2639.     ByVal index As Long _ 
  2640. ) As Long
  2641.  
  2642. 'Description
  2643. 'This function will add a graphic to the active drawing.
  2644. '
  2645. 'Input Parameters
  2646. 'Long g1            if NULL, add to drawing, otherwise add graphic to this parent graphic
  2647. 'Long g2            graphic to add to drawing 
  2648. '
  2649. 'Return Value
  2650. '0 if no errors.  Non-zero if an error occurred. Use TCWLastErrorGet to retrieve 
  2651. 'error string.
  2652. '
  2653. 'See Also
  2654. '
  2655. 'Coding Example
  2656. '
  2657. 'Declaration
  2658. Declare Function TCWGraphicAppend lib "TCAPI40" ( _ 
  2659.     ByVal g1 As Long, _ 
  2660.     ByVal g2 As Long _ 
  2661. ) As Long
  2662.  
  2663. 'Description
  2664. 'This function will add the next segment to the multiline that is in
  2665. 'progress.
  2666. '
  2667. 'Input Parameters
  2668. 'Long g            graphic to add next point to
  2669. 'Double x0            X coordinate of point
  2670. 'Double y0            Y coordinate of point
  2671. 'Double z0            Z coordinate of point
  2672. '
  2673. 'Return Value
  2674. '0 if no errors.  Non-zero if an error occurred. Use TCWLastErrorGet to retrieve 
  2675. 'error string.
  2676. '
  2677. 'See Also
  2678. 'TCWGraphicClose, TCWGraphicVertexAdd
  2679. '
  2680. 'Coding Example
  2681. '
  2682. 'Declaration
  2683. Declare Function TCWGraphicXYZAdd lib "TCAPI40" ( _ 
  2684.     ByVal g As Long, _ 
  2685.     ByVal x0 As Double, _ 
  2686.     ByVal y0 As Double, _ 
  2687.     ByVal z0 As Double _ 
  2688. ) As Long
  2689.  
  2690. 'Description
  2691. 'This function will close the multiline, making the last point the same
  2692. 'as the first point.
  2693. '
  2694. 'Input Parameters
  2695. 'Long g            graphic to close 
  2696. '
  2697. 'Return Value
  2698. '0 if no errors.  Non-zero if an error occurred. Use TCWLastErrorGet to retrieve 
  2699. 'error string.
  2700. '
  2701. 'See Also
  2702. 'TCWGraphicXYZAdd, TCWGraphicVertexAdd
  2703. '
  2704. 'Coding Example
  2705. '
  2706. 'Declaration
  2707. Declare Function TCWGraphicClose lib "TCAPI40" ( _ 
  2708.     ByVal g As Long _ 
  2709. ) As Long
  2710.  
  2711. 'Description
  2712. 'This function will add a vertex to a graphic in the active drawing.
  2713. '
  2714. 'Input Parameters
  2715. 'Long g            graphic 
  2716. 'Long v            vertex to add to graphic 
  2717. '
  2718. 'Return Value
  2719. '0 if no errors.  Non-zero if an error occurred. Use TCWLastErrorGet to retrieve 
  2720. 'error string.
  2721. '
  2722. 'See Also
  2723. '
  2724. 'Coding Example
  2725. '
  2726. 'Declaration
  2727. Declare Function TCWGraphicVertexAdd lib "TCAPI40" ( _ 
  2728.     ByVal g As Long, _ 
  2729.     ByVal v As Long _ 
  2730. ) As Long
  2731.  
  2732. 'Description
  2733. 'This function will add a vertex to the specified graphic.
  2734. '
  2735. 'Input Parameters
  2736. 'Long g            handle of graphic 
  2737. 'Double x0            X coordinate of vertex
  2738. 'Double y0            Y coordinate of vertex
  2739. 'Double z0            Z coordinate of vertex
  2740. '
  2741. 'Return Value
  2742. '0 if no errors.  Non-zero if an error occurred. Use TCWLastErrorGet to retrieve 
  2743. 'error string.
  2744. '
  2745. 'See Also
  2746. '
  2747. 'Coding Example
  2748. '
  2749. 'Declaration
  2750. Declare Function TCWVertexAppend lib "TCAPI40" ( _ 
  2751.     ByVal g As Long, _ 
  2752.     ByVal x0 As Double, _ 
  2753.     ByVal y0 As Double, _ 
  2754.     ByVal z0 As Double _ 
  2755. ) As Long
  2756.  
  2757. 'Description
  2758. 'This function will make a new graphic with the same properties as
  2759. 'the specified graphic.  The graphic is not added to the drawing.  You
  2760. 'must explicitly do this.  Use TCWGraphicAppend with the first parameter
  2761. 'NULL to add the graphic to the drawing.  use TCWGraphicApend with the
  2762. 'first parameter being the handle of the graphic that will be the 
  2763. 'parent of the appended graphic.
  2764. '
  2765. 'Input Parameters
  2766. 'Long g            graphic to copy
  2767. '
  2768. 'Return Value
  2769. 'Returns the handle to the new graphic as a Long.
  2770. '
  2771. 'See Also
  2772. '
  2773. 'Coding Example
  2774. '
  2775. 'Declaration
  2776. Declare Function TCWGraphicCopy lib "TCAPI40" ( _ 
  2777.     ByVal g As Long _ 
  2778. ) As Long
  2779.  
  2780. 'Description
  2781. 'This function will delete the specified graphic.  
  2782. '
  2783. 'Input Parameters
  2784. 'Long g            graphic to delete
  2785. '
  2786. 'Return Value
  2787. '0 if no errors.  Non-zero if an error occurred. Use TCWLastErrorGet to retrieve 
  2788. 'error string.
  2789. '
  2790. 'See Also
  2791. '
  2792. 'Coding Example
  2793. '
  2794. 'Declaration
  2795. Declare Function TCWGraphicDispose lib "TCAPI40" ( _ 
  2796.     ByVal g As Long _ 
  2797. ) As Long
  2798.  
  2799. 'Description
  2800. 'This function will create a new graphic with the default drawing setting. TurboCAD internal 
  2801. 'types available are GK_GRAPHIC = 11 (polyline) and GK_ARC = 2. 
  2802. '
  2803. 'If you create your own Smart Object (TurboCAD v4 custom shapes), then supply the appropriate 
  2804. 'regen name for the object (use GK_GRAPHIC for the kind).
  2805. '
  2806. 'Input Parameters
  2807. 'Long kind                kind of graphic to make
  2808. 'String regenmethod    Regen method if external regenerated graphic, use "" if TurboCAD type 
  2809. '
  2810. 'Return Value
  2811. 'Returns the handle to the new graphic as a Long.
  2812. '
  2813. 'See Also
  2814. '
  2815. 'Coding Example
  2816. '
  2817. 'Declaration
  2818. Declare Function TCWGraphicCreate lib "TCAPI40" ( _ 
  2819.     ByVal kind As Long, _ 
  2820.     ByRef regenmethod As String _ 
  2821. ) As Long
  2822.  
  2823. 'Description
  2824. 'This function will draw the graphic on the drawing.
  2825. '
  2826. 'Input Parameters
  2827. 'Long g            handle of graphic
  2828. 'Long mode            0 is normal and 1 is inverted
  2829. '
  2830. 'Return Value
  2831. '0 if no errors.  Non-zero if an error occurred. Use TCWLastErrorGet to retrieve 
  2832. 'error string.
  2833. '
  2834. 'See Also
  2835. '
  2836. 'Coding Example
  2837. '
  2838. 'Declaration
  2839. Declare Function TCWGraphicDraw lib "TCAPI40" ( _ 
  2840.     ByVal g As Long, _ 
  2841.     ByVal mode As Long _ 
  2842. ) As Long
  2843.  
  2844. 'Description
  2845. 'This function will return the graphic handle from the unique database id.
  2846. '
  2847. 'Input Parameters
  2848. 'Long id            unique id of graphic
  2849. '
  2850. 'Return Value
  2851. ' The handle of the graphic.  If 0, use TCWLastErrorGet to retrieve error string.
  2852. '
  2853. 'See Also
  2854. '
  2855. 'Coding Example
  2856. '
  2857. 'Declaration
  2858. Declare Function TCWGraphicHandleFromID lib "TCAPI40" ( _ 
  2859.     ByVal id As Long _ 
  2860. ) As Long
  2861.  
  2862. 'Description
  2863. 'This function will set the graphic's reference point, using the 
  2864. 'vertex supplied.
  2865. '
  2866. 'Input Parameters
  2867. 'Long g            graphic handle
  2868. 'Long v            vertex for new reference point
  2869. '
  2870. 'Return Value
  2871. '0 if no errors.  Non-zero if an error occurred. Use TCWLastErrorGet to retrieve 
  2872. 'error string.
  2873. '
  2874. 'See Also
  2875. '
  2876. 'Coding Example
  2877. '
  2878. 'Declaration
  2879. Declare Function TCWGraphicReferencePointSet lib "TCAPI40" ( _ 
  2880.     ByVal g As Long, _ 
  2881.     ByVal v As Long _ 
  2882. ) As Long
  2883.  
  2884. 'Description
  2885. 'This function will return the graphic reference point.
  2886. '
  2887. 'Input Parameters
  2888. 'Long g            graphic handle
  2889. '
  2890. 'Return Value
  2891. 'The the reference point vertex handle as a long.  If 0, use TCWLastErrorGet to
  2892. 'retrieve the error text.
  2893. '
  2894. 'See Also
  2895. '
  2896. 'Coding Example
  2897. '
  2898. 'Declaration
  2899. Declare Function TCWGraphicReferencePointGet lib "TCAPI40" ( _ 
  2900.     ByVal g As Long _ 
  2901. ) As Long
  2902.  
  2903. 'Section
  2904. 'GRAPHICS - Selection Manipulation Functions
  2905.  
  2906. 'The following group of functions work on the currently selected graphics in the
  2907. 'drawing.  They can be used in conjunction with TCWSelectionCount and TCWSelectionAt
  2908. 'to cycle through all the graphics in the drawing.
  2909.  
  2910. 'Description
  2911. 'Will scale the selected graphics in the x, y and z direction. A value of 1.0 in
  2912. 'any parameter will not change the scale.
  2913. '
  2914. 'Input Parameters
  2915. 'Double xscale            X scale factor
  2916. 'Double yscale            Y scale factor
  2917. 'Double zscale            Z scale factor
  2918. 'Double x0                x coordinate of reference point
  2919. 'Double y0                y coordinate of reference point
  2920. 'Double z0                z coordinate of reference point
  2921. '
  2922. 'Return Value
  2923. '0 if no errors.  Non-zero if an error occurred. Use TCWLastErrorGet to retrieve 
  2924. 'error string.
  2925. '
  2926. 'See Also
  2927. '
  2928. 'Coding Example
  2929. '
  2930. 'Declaration
  2931. Declare Function TCWSelectionScale lib "TCAPI40" ( _ 
  2932.     ByVal xscale As Double, _ 
  2933.     ByVal yscale As Double, _ 
  2934.     ByVal zscale As Double, _ 
  2935.     ByVal x0 As Double, _ 
  2936.     ByVal y0 As Double, _ 
  2937.     ByVal z0 As Double _ 
  2938. ) As Long
  2939.  
  2940. 'Description
  2941. 'This function will move the selected graphic to the new coordinates.
  2942. '
  2943. 'Input Parameters
  2944. 'Double dx            delta x coordinate to move selected graphic
  2945. 'Double dy            delta y coordinate to move selected graphic
  2946. 'Double dz            delta z coordinate to move selected graphic
  2947. '
  2948. 'Return Value
  2949. '0 if no errors.  Non-zero if an error occurred. Use TCWLastErrorGet to retrieve 
  2950. 'error string.
  2951. '
  2952. 'See Also
  2953. '
  2954. 'Coding Example
  2955. '
  2956. 'Declaration
  2957. Declare Function TCWSelectionMove lib "TCAPI40" ( _ 
  2958.     ByVal dx As Double, _ 
  2959.     ByVal dy As Double, _ 
  2960.     ByVal dz As Double _ 
  2961. ) As Long
  2962.  
  2963. 'Description
  2964. 'This function will rotate the selected graphics by the rotation angle
  2965. 'supplied.
  2966. '
  2967. 'Input Parameters
  2968. 'String axis        "X", "Y", or "Z" where "X" means rotate in the Y-Z plane
  2969. 'Double angle        rotation angle in radians
  2970. 'Double x0            x coordinate of reference point
  2971. 'Double y0            y coordinate of reference point
  2972. 'Double z0            z coordinate of reference point
  2973. '
  2974. 'Return Value
  2975. '0 if no errors.  Non-zero if an error occurred. Use TCWLastErrorGet to retrieve 
  2976. 'error string.
  2977. '
  2978. 'See Also
  2979. '
  2980. 'Coding Example
  2981. '
  2982. 'Declaration
  2983. Declare Function TCWSelectionRotate lib "TCAPI40" ( _ 
  2984.     ByRef axis As String, _ 
  2985.     ByVal angle As Double, _ 
  2986.     ByVal x0 As Double, _ 
  2987.     ByVal y0 As Double, _ 
  2988.     ByVal z0 As Double _ 
  2989. ) As Long
  2990.  
  2991. 'Description
  2992. 'This function will apply a hatch pattern to the selected graphics.
  2993. '
  2994. 'Input Parameters
  2995. 'None
  2996. '
  2997. 'Return Value
  2998. '0 if no errors.  Non-zero if an error occurred. Use TCWLastErrorGet to retrieve 
  2999. 'error string.
  3000. '
  3001. 'See Also
  3002. '
  3003. 'Coding Example
  3004. '
  3005. 'Declaration
  3006. Declare Function TCWCreateHatch lib "TCAPI40" () As Long
  3007.  
  3008. 'Description
  3009. 'This function will create a group out of the selected graphics.
  3010. '
  3011. 'Input Parameters
  3012. 'String groupname    name of group 
  3013. '
  3014. 'Return Value
  3015. '0 if no errors.  Non-zero if an error occurred. Use TCWLastErrorGet to retrieve 
  3016. 'error string.
  3017. '
  3018. 'See Also
  3019. '
  3020. 'Coding Example
  3021. '
  3022. 'Declaration
  3023. Declare Function TCWGroupCreate lib "TCAPI40" ( _ 
  3024.     ByRef groupname As String _ 
  3025. ) As Long
  3026.  
  3027. 'Description
  3028. 'This function will explode a selected group or block into its individual 
  3029. 'graphics. If the selected graphic is a simple graphic such as a line, the 
  3030. 'function has no effect.
  3031. '
  3032. 'Input Parameters
  3033. 'None
  3034. '
  3035. 'Return Value
  3036. '0 if no errors.  Non-zero if an error occurred. Use TCWLastErrorGet to retrieve 
  3037. 'error string.
  3038. '
  3039. 'See Also
  3040. '
  3041. 'Coding Example
  3042. '
  3043. 'Declaration
  3044. Declare Function TCWExplode lib "TCAPI40" () As Long
  3045.  
  3046. 'Description
  3047. 'This function will move the selected graphics to the front of the drawing.
  3048. '
  3049. 'Input Parameters
  3050. 'None
  3051. '
  3052. 'Return Value
  3053. '0 if no errors.  Non-zero if an error occurred. Use TCWLastErrorGet to retrieve 
  3054. 'error string.
  3055. '
  3056. 'See Also
  3057. '
  3058. 'Coding Example
  3059. '
  3060. 'Declaration
  3061. Declare Function TCWBringtoFront lib "TCAPI40" () As Long
  3062.  
  3063. 'Description
  3064. 'This function will move the selected graphics to the back of the drawing.
  3065. '
  3066. 'Input Parameters
  3067. 'None
  3068. '
  3069. 'Return Value
  3070. '0 if no errors.  Non-zero if an error occurred. Use TCWLastErrorGet to retrieve 
  3071. 'error string.
  3072. '
  3073. 'See Also
  3074. '
  3075. 'Coding Example
  3076. '
  3077. 'Declaration
  3078. Declare Function TCWSendtoBack lib "TCAPI40" () As Long
  3079.  
  3080. 'Description
  3081. 'This function will align the bottoms of the selected graphics.
  3082. '
  3083. 'Input Parameters
  3084. 'None
  3085. '
  3086. 'Return Value
  3087. 'Returns the handle of the first selected graphic as a Long.
  3088. '
  3089. 'See Also
  3090. '
  3091. 'Coding Example
  3092. '
  3093. 'Declaration
  3094. Declare Function TCWAlignBottom lib "TCAPI40" () As Long
  3095.  
  3096. 'Description
  3097. 'This function will align the tops of the selected graphics.
  3098. '
  3099. 'Input Parameters
  3100. '
  3101. 'Return Value
  3102. 'Returns the handle of the first selected graphic as a Long.
  3103. '
  3104. 'See Also
  3105. '
  3106. 'Coding Example
  3107. '
  3108. 'Declaration
  3109. Declare Function TCWAlignTop lib "TCAPI40" () As Long
  3110.  
  3111. 'Description
  3112. 'This function will align the middles of the selected graphics.
  3113. '
  3114. 'Input Parameters
  3115. 'None
  3116. '
  3117. 'Return Value
  3118. 'Returns the handle of the first selected graphic as a Long.
  3119. '
  3120. 'See Also
  3121. '
  3122. 'Coding Example
  3123. '
  3124. 'Declaration
  3125. Declare Function TCWAlignMiddle lib "TCAPI40" () As Long
  3126.  
  3127. 'Description
  3128. 'This function will align the left sides of the selected graphics.
  3129. '
  3130. 'Input Parameters
  3131. 'None
  3132. '
  3133. 'Return Value
  3134. 'Returns the handle of the first selected graphic as a Long.
  3135. '
  3136. 'See Also
  3137. '
  3138. 'Coding Example
  3139. '
  3140. 'Declaration
  3141. Declare Function TCWAlignLeft lib "TCAPI40" () As Long
  3142.  
  3143. 'Description
  3144. 'This function will align the right sides of the selected graphics.
  3145. '
  3146. 'Input Parameters
  3147. 'None
  3148. '
  3149. 'Return Value
  3150. 'Returns the handle of the first selected graphic as a Long.
  3151. '
  3152. 'See Also
  3153. '
  3154. 'Coding Example
  3155. '
  3156. 'Declaration
  3157. Declare Function TCWAlignRight lib "TCAPI40" () As Long
  3158.  
  3159. 'Description
  3160. 'This function will align the centers of the selected graphics.
  3161. '
  3162. 'Input Parameters
  3163. 'None
  3164. '
  3165. 'Return Value
  3166. 'Returns the handle of the first selected graphic as a Long.
  3167. '
  3168. 'See Also
  3169. '
  3170. 'Coding Example
  3171. '
  3172. 'Declaration
  3173. Declare Function TCWAlignCenter lib "TCAPI40" () As Long
  3174.  
  3175. 'Section
  3176. 'GRAPHICS - Get and Set Property Functions
  3177.  
  3178. 'Description
  3179. 'This function will return the value of the property that has been
  3180. 'requested.  This function is written in Basic because of limitations
  3181. 'within Enable Basic for Variants and DLLs.
  3182. '
  3183. 'Input Parameters 
  3184. 'Long graphic            graphic to get property from
  3185. 'String propertyname    name of property look up 
  3186. '
  3187. 'AVAILABLE PROPERTIES:        DESCRIPTION:
  3188. '"BrushAngle"                brush angle as a Double
  3189. '"BrushColor"                brush color as &H00bbggrr or -3 for by layer, -4 for by block or -5 for by pen
  3190. '"BrushDrawMode"            brush drawing mode as n Integer
  3191. '"BrushScale"                brush scale as a Double
  3192. '"BrushStyle"                brush style as a Double
  3193. '"DatabaseID"                unique id for graphic
  3194. '"HatchCross"                hatch cross as an Integer
  3195. '"Info"                    info string as a String
  3196. '"Layer"                    layer id as an Integer
  3197. '"LimitVertices"            if true, node-edit cannot insert or delete vertices
  3198. '"PenAlignment"            pen alignment as a String
  3199. '"PenColor"                pen color as &H00bbggrr or -3 for by layer, -4 for by block
  3200. '"PenScale"                pen scale as a Double
  3201. '"PenStyle"                pen style as a Integer 
  3202. '"PenWidth"                pen width as a Double
  3203. '"ScaleSystem"                0 for world, 1 for paper, 2 for device
  3204. '"Selected"                selected flag as a Long
  3205. '"TextFont"                text font as a String
  3206. '"TextFormat"                0 for left justify, 1 for center, 2 for right justify
  3207. '"TextSize"                text size as a Double
  3208. '"TextStyle"                flags: &H0000 = regular, &H0001 = italic, &H0002 = bold, &H0004 = strikethru, &H0008 = hidden, &H0040 = allcaps
  3209. '
  3210. '"Closed"                    closed flag as a Long (READ ONLY)
  3211. '"Kind"                    graphic type as a Long (READ ONLY)
  3212. '"RegenMethod"                regen method name as a String (READ ONLY)
  3213. '
  3214. 'Return Value
  3215. 'Value of property requested.
  3216. '
  3217. 'AVAILABLE PROPERTIES:        VALUE RETURNED:
  3218. '"BrushAngle"                (Double)
  3219. '"BrushColor"                (Long)
  3220. '"BrushDrawMode"            (Integer)
  3221. '"BrushScale"                (Double)
  3222. '"BrushStyle"                (Double)
  3223. '"DatabaseID"                (Long)
  3224. '"HatchCross"                (Integer)
  3225. '"Info"                    (String)
  3226. '"Layer"                    (Integer)
  3227. '"LimitVertices"            (Integer)
  3228. '"PenAlignment"            (String)
  3229. '"PenColor"                (Long)
  3230. '"PenScale"                (Double)
  3231. '"PenStyle"                (Integer)
  3232. '"PenWidth"                (Double)
  3233. '"ScaleSystem"                (Integer)
  3234. '"Selected"                -1 if selected, 0 if not (Long)
  3235. '"TextFont"                (String)
  3236. '"TextFormat"                (Integer)
  3237. '"TextSize"                (Double)
  3238. '"TextStyle"                (Integer)
  3239. '
  3240. '"Closed"                    -1 if closed, 0 if not  (Long - READ ONLY)
  3241. '"Kind"                    GK_nnnnn (Long - READ ONLY)
  3242. '"RegenMethod"                (String - READ ONLY)
  3243. 'See Also
  3244. '
  3245. 'Coding Example
  3246. '
  3247. 'Declaration
  3248. 'Declare Function TCWGraphicPropertyGet ( _ 
  3249. '    ByVal g As Long, _ 
  3250. '    ByRef propertyname As String _ 
  3251. ')As Variant
  3252.  
  3253.  
  3254. 'Description
  3255. 'This function will set the property with the specified value.
  3256. '
  3257. 'Input Parameters
  3258. 'Long graphic                graphic to set property for
  3259. 'String propertyname        name of property to modify
  3260. 'Variant value                value to set to 
  3261. '
  3262. 'AVAILABLE PROPERTIES:            VALUE:
  3263. '"BrushAngle"                    (Double)    
  3264. '"BrushColor"                    &H00bbggrr or -3 for by layer, -4 for by block or -5 for by pen (Long)    
  3265. '"BrushDrawMode"                (Integer)    
  3266. '"BrushScale"                    (Double)    
  3267. '"BrushStyle"                    (Integer)    
  3268. '"DatabaseID"                    (Long)
  3269. '"HatchCross"                    (Integer)
  3270. '"Info"                        (String)    
  3271. '"Layer"                        (Integer)    
  3272. '"LimitVertices"                (Integer)if true, node-edit cannot insert or delete vertices
  3273. '"PenAlignment"                (String)
  3274. '"PenColor"                    &H00bbggrr or -3 for by layer, -4 for by block (Long)
  3275. '"PenWidth"                    1.5 (Double)
  3276. '"PenScale"                    1 (Double)
  3277. '"PenStyle"                    (Integer)    
  3278. '"ScaleSystem"                    0 for world, 1 for paper, 2 for device (Integer)
  3279. '"Selected"                    1 to select, 0 to deselect (Integer)
  3280. '"TextStyle"                    flags: &H0000 = regular, &H0001 = italic, &H0002 = bold, &H0004 = strikethru, &H0008 = hidden, &H0040 = allcaps (Integer)    
  3281. '"TextFont"                    (String)    
  3282. '"TextFormat"                    0 for left justify, 1 for center, 2 for right justify (Integer)    
  3283. '"TextSize"                    (Double)    
  3284. '
  3285. 'Return Value
  3286. '0 if no errors.  Non-zero if errors.  Use TCWLastErrorGet to retrieve error string.
  3287. '
  3288. 'See Also
  3289. '
  3290. 'Coding Example
  3291. '
  3292. 'Declaration
  3293. 'Declare Function TCWGraphicPropertySet ( _ 
  3294. '    ByVal graphic As Long, _ 
  3295. '    ByRef propertyname As String, _ 
  3296. '    ByVal value As Variant
  3297. ')As Long
  3298.  
  3299.  
  3300. 'Section
  3301. 'GRAPHICS - Vertex Functions
  3302.  
  3303. 'Description
  3304. 'This function will return the number vertices in the specified graphic.
  3305. '
  3306. 'Input Parameters
  3307. 'Long g            graphic to count vertices in 
  3308. '
  3309. 'Return Value
  3310. 'Number of vertices as a Long.
  3311. '
  3312. 'See Also
  3313. '
  3314. 'Coding Example
  3315. '
  3316. 'Declaration
  3317. Declare Function TCWVertexCount lib "TCAPI40" ( _ 
  3318.     ByVal g As Long _ 
  3319. ) As Long
  3320.  
  3321. 'Description
  3322. 'This function will return the handle to the vertex requested.  Valid index
  3323. 'numbers are 0 to the number-1 returned by VertexCount.
  3324. '
  3325. 'Input Parameters
  3326. 'Long g            graphic to get vertex from
  3327. 'Long index        vertex to return
  3328. '
  3329. 'Return Value
  3330. 'Handle to vertex as a Long.
  3331. '
  3332. 'See Also
  3333. '
  3334. 'Coding Example
  3335. '
  3336. 'Declaration
  3337. Declare Function TCWVertexAt lib "TCAPI40" ( _ 
  3338.     ByVal g As Long, _ 
  3339.     ByVal index As Long _ 
  3340. ) As Long
  3341.  
  3342. 'Description
  3343. 'This function will create a new vertex at the specified coordinates.
  3344. '
  3345. 'Caller is responsible for disposing of this object unless it is added to a graphic.
  3346. '
  3347. 'Input Parameters
  3348. 'Double x0            X coordinate of vertex
  3349. 'Double y0            Y coordinate of vertex
  3350. 'Double z0            Z coordinate of vertex
  3351. '
  3352. 'Return Value
  3353. 'Returns the handle to the new vertex as a Long.  
  3354. '
  3355. 'See Also
  3356. '
  3357. 'Coding Example
  3358. '
  3359. 'Declaration
  3360. Declare Function TCWVertexCreate lib "TCAPI40" ( _ 
  3361.     ByVal x0 As Double, _ 
  3362.     ByVal y0 As Double, _ 
  3363.     ByVal z0 As Double _ 
  3364. ) As Long
  3365.  
  3366. 'Description
  3367. 'This function will create a new vertex at the coordinates 0,0,0.
  3368. '
  3369. 'Caller is responsible for disposing of this object unless it is added to a graphic.
  3370. '
  3371. 'Input Parameters
  3372. 'None
  3373. '
  3374. 'Return Value
  3375. 'Returns the handle to the new vertex as a Long.  
  3376. '
  3377. 'See Also
  3378. '
  3379. 'Coding Example
  3380. '
  3381. 'Declaration
  3382. Declare Function TCWVertexZero lib "TCAPI40" () As Long
  3383.  
  3384. 'Description
  3385. 'This function will create a new vertex that is initialized to the
  3386. 'same coordinates as the vertex specified.
  3387. '
  3388. 'Input Parameters
  3389. 'Long v            handle of a vertex to copy
  3390. '
  3391. 'Return Value
  3392. 'Returns the handle to the new vertex as a Long.  
  3393. '
  3394. 'See Also
  3395. '
  3396. 'Coding Example
  3397. '
  3398. 'Declaration
  3399. Declare Function TCWVertexCopy lib "TCAPI40" ( _ 
  3400.     ByVal v As Long _ 
  3401. ) As Long
  3402.  
  3403. 'Description
  3404. 'This function will delete the specified vertex.  
  3405. '
  3406. 'Input Parameters
  3407. 'Long v            handle of a vertex to delete
  3408. '
  3409. 'Return Value
  3410. '0 if no errors.  Non-zero if an error occurred. Use TCWLastErrorGet to retrieve 
  3411. 'error string.
  3412. '
  3413. 'See Also
  3414. '
  3415. 'Coding Example
  3416. '
  3417. 'Declaration
  3418. Declare Function TCWVertexDispose lib "TCAPI40" ( _ 
  3419.     ByVal v As Long _ 
  3420. ) As Long
  3421.  
  3422. 'Description
  3423. 'This function will return the X coordinate of a vertex.
  3424. '
  3425. 'Input Parameters
  3426. 'Long v            handle of a vertex 
  3427. '
  3428. 'Return Value
  3429. ' X coordinate as a Double. 
  3430. '
  3431. 'See Also
  3432. '
  3433. 'Coding Example
  3434. '
  3435. 'Declaration
  3436. Declare Function TCWGetX lib "TCAPI40" ( _ 
  3437.     ByVal v As Long _ 
  3438. ) As Double
  3439.  
  3440. 'Description
  3441. 'This function will set the X coordinate of a vertex.
  3442. '
  3443. 'Input Parameters
  3444. 'Long v            handle of a vertex 
  3445. 'Double x0            coordinate value
  3446. '
  3447. 'Return Value
  3448. '0 if no errors.  Non-zero if an error occurred. Use TCWLastErrorGet to retrieve 
  3449. 'error string.
  3450. '
  3451. 'See Also
  3452. '
  3453. 'Coding Example
  3454. '
  3455. 'Declaration
  3456. Declare Function TCWSetX lib "TCAPI40" ( _ 
  3457.     ByVal v As Long, _ 
  3458.     ByVal x0 As Double _ 
  3459. ) As Long
  3460.  
  3461. 'Description
  3462. 'This function will return the Y coordinate of a vertex.
  3463. '
  3464. 'Input Parameters
  3465. 'Long v            handle of a vertex 
  3466. '
  3467. 'Return Value
  3468. 'Y coordinate as a Double. 
  3469. '
  3470. 'See Also
  3471. '
  3472. 'Coding Example
  3473. '
  3474. 'Declaration
  3475. Declare Function TCWGetY lib "TCAPI40" ( _ 
  3476.     ByVal v As Long _ 
  3477. ) As Double
  3478.  
  3479. 'Description
  3480. 'This function will set the Y coordinate of a vertex.
  3481. '
  3482. 'Input Parameters
  3483. 'Long v            handle of a vertex 
  3484. 'Double y0            coordinate value
  3485. '
  3486. 'Return Value
  3487. '0 if no errors.  Non-zero if an error occurred. Use TCWLastErrorGet to retrieve 
  3488. 'error string.
  3489. '
  3490. 'See Also
  3491. '
  3492. 'Coding Example
  3493. '
  3494. 'Declaration
  3495. Declare Function TCWSetY lib "TCAPI40" ( _ 
  3496.     ByVal v As Long, _ 
  3497.     ByVal y0 As Double _ 
  3498. ) As Long
  3499.  
  3500. 'Description
  3501. 'This function will return the Z coordinate of a vertex.
  3502. '
  3503. 'Input Parameters
  3504. 'Long v            handle of a vertex 
  3505. '
  3506. 'Return Value
  3507. 'Z coordinate as a Double. 
  3508. '
  3509. 'See Also
  3510. '
  3511. 'Coding Example
  3512. '
  3513. 'Declaration
  3514. Declare Function TCWGetZ lib "TCAPI40" ( _ 
  3515.     ByVal v As Long _ 
  3516. ) As Double
  3517.  
  3518. 'Description
  3519. 'This function will set the Z coordinate of a vertex.
  3520. '
  3521. 'Input Parameters
  3522. 'Long v            handle of a vertex 
  3523. 'Double z0            coordinate value
  3524. '
  3525. 'Return Value
  3526. '0 if no errors.  Non-zero if an error occurred. Use TCWLastErrorGet to retrieve 
  3527. 'error string.
  3528. '
  3529. 'See Also
  3530. '
  3531. 'Coding Example
  3532. '
  3533. 'Declaration
  3534. Declare Function TCWSetZ lib "TCAPI40" ( _ 
  3535.     ByVal v As Long, _ 
  3536.     ByVal z0 As Double _ 
  3537. ) As Long
  3538.  
  3539. 'Description
  3540. 'This function will set the X and Y coordinates of a vertex.
  3541. '
  3542. 'Input Parameters
  3543. 'Long v            handle of a vertex 
  3544. 'Double x0            x coordinate value
  3545. 'Double y0            y coordinate value
  3546. '
  3547. 'Return Value
  3548. '0 if no errors.  Non-zero if an error occurred. Use TCWLastErrorGet to retrieve 
  3549. 'error string.
  3550. '
  3551. 'See Also
  3552. '
  3553. 'Coding Example
  3554. '
  3555. 'Declaration
  3556. Declare Function TCWSetXY lib "TCAPI40" ( _ 
  3557.     ByVal v As Long, _ 
  3558.     ByVal x0 As Double, _ 
  3559.     ByVal y0 As Double _ 
  3560. ) As Long
  3561.  
  3562. 'Description
  3563. 'This function will set the X, Y and Z coordinates of a vertex.
  3564. '
  3565. 'Input Parameters
  3566. 'Long v            handle of a vertex 
  3567. 'Double x0            x coordinate value
  3568. 'Double y0            y coordinate value
  3569. 'Double z0            z coordinate value
  3570. '
  3571. 'Return Value
  3572. '0 if no errors.  Non-zero if an error occurred. Use TCWLastErrorGet to retrieve 
  3573. 'error string.
  3574. '
  3575. 'See Also
  3576. '
  3577. 'Coding Example
  3578. '
  3579. 'Declaration
  3580. Declare Function TCWSetXYZ lib "TCAPI40" ( _ 
  3581.     ByVal v As Long, _ 
  3582.     ByVal x0 As Double, _ 
  3583.     ByVal y0 As Double, _ 
  3584.     ByVal z0 As Double _ 
  3585. ) As Long
  3586.  
  3587. 'Description
  3588. 'This function will set the state for the pen.  Sets the up or down
  3589. 'state of the pen at the specified vertex.
  3590. '
  3591. 'Input Parameters
  3592. 'Long v            handle of a vertex 
  3593. 'Long state        TRUE if pen should be down 
  3594. '
  3595. 'Return Value
  3596. '0 if no errors.  Non-zero if an error occurred. Use TCWLastErrorGet to retrieve 
  3597. 'error string.
  3598. '
  3599. 'See Also
  3600. '
  3601. 'Coding Example
  3602. '
  3603. 'Declaration
  3604. Declare Function TCWPenDown lib "TCAPI40" ( _ 
  3605.     ByVal v As Long, _ 
  3606.     ByVal state As Long _ 
  3607. ) As Long
  3608.  
  3609. 'Section
  3610. 'VIEW - Functions
  3611.  
  3612. 'Description
  3613. 'This function will activate the specified view.
  3614. '
  3615. 'Input Parameters
  3616. 'Long index        view number
  3617. '
  3618. 'Return Value
  3619. 'Returns the handle to the view as a Long. 
  3620. '
  3621. 'See Also
  3622. 'TCWViewCount, TCWViewActive
  3623. '
  3624. 'Coding Example
  3625. '
  3626. 'Declaration
  3627. Declare Function TCWViewAt lib "TCAPI40" ( _ 
  3628.     ByVal index As Long _ 
  3629. ) As Long
  3630.  
  3631. 'Description
  3632. 'This function will return the number of views that are open.
  3633. '
  3634. 'Input Parameters
  3635. 'None
  3636. '
  3637. 'Return Value
  3638. 'Count of the number of open views as a Long. 
  3639. '
  3640. 'See Also
  3641. 'TCWViewAt, TCWViewActive
  3642. '
  3643. 'Coding Example
  3644. '
  3645. 'Declaration
  3646. Declare Function TCWViewCount lib "TCAPI40" () As Long
  3647.  
  3648. 'Description
  3649. 'This function will return the handle to the active view.
  3650. '
  3651. 'Input Parameters
  3652. 'None
  3653. '
  3654. 'Return Value
  3655. 'Handle to view as a Long. 
  3656. '
  3657. 'See Also
  3658. 'TCWViewAt, TCWViewCount
  3659. '
  3660. 'Coding Example
  3661. '
  3662. 'Declaration
  3663. Declare Function TCWViewActive lib "TCAPI40" () As Long
  3664.  
  3665. 'Description
  3666. 'This function will force a redraw on the current view.
  3667. '
  3668. 'Input Parameters
  3669. 'None
  3670. '
  3671. 'Return Value
  3672. '0 if no errors.  Non-zero if an error occurred. Use TCWLastErrorGet to retrieve 
  3673. 'error string.
  3674. '
  3675. 'See Also
  3676. '
  3677. 'Coding Example
  3678. '
  3679. 'Declaration
  3680. Declare Function TCWViewRedraw lib "TCAPI40" () As Long
  3681.  
  3682. 'Description
  3683. 'This function will flush any remaining paint messages to the view.
  3684. '
  3685. 'Input Parameters
  3686. 'None
  3687. '
  3688. 'Return Value
  3689. '0 if no errors.  Non-zero if an error occurred. Use TCWLastErrorGet to retrieve 
  3690. 'error string.
  3691. '
  3692. 'See Also
  3693. '
  3694. 'Coding Example
  3695. '
  3696. 'Declaration
  3697. Declare Function TCWViewUpdateWindow lib "TCAPI40" () As Long
  3698.  
  3699. 'Description
  3700. 'This function will zoom the current view to full view.  
  3701. '
  3702. 'Input Parameters
  3703. 'None
  3704. '
  3705. 'Return Value
  3706. '0 if no errors.  Non-zero if an error occurred. Use TCWLastErrorGet to retrieve 
  3707. 'error string.
  3708. '
  3709. 'See Also
  3710. '
  3711. 'Coding Example
  3712. '
  3713. 'Declaration
  3714. Declare Function TCWViewZoom lib "TCAPI40" () As Long
  3715.  
  3716. 'Description
  3717. 'This function will zoom in the current view.  The amount of zoom is
  3718. 'determined by the zoom factor setting on the Options|Program Setup|General
  3719. 'property page.
  3720. '
  3721. 'Input Parameters
  3722. 'None
  3723. '
  3724. 'Return Value
  3725. '0 if no errors.  Non-zero if an error occurred. Use TCWLastErrorGet to retrieve 
  3726. 'error string.
  3727. '
  3728. 'See Also
  3729. '
  3730. 'Coding Example
  3731. '
  3732. 'Declaration
  3733. Declare Function TCWViewZoomIn lib "TCAPI40" () As Long
  3734.  
  3735. 'Description
  3736. 'This function will zoom out the current view.  The amount of zoom is
  3737. 'determined by the zoom factor setting on the Options|Program Setup|General
  3738. 'property page.
  3739. '
  3740. 'Input Parameters
  3741. 'None
  3742. '
  3743. 'Return Value
  3744. '0 if no errors.  Non-zero if an error occurred. Use TCWLastErrorGet to retrieve 
  3745. 'error string.
  3746. '
  3747. 'See Also
  3748. '
  3749. 'Coding Example
  3750. '
  3751. 'Declaration
  3752. Declare Function TCWViewZoomOut lib "TCAPI40" () As Long
  3753.  
  3754. 'Description
  3755. 'This function will zoom to the printed page size.  
  3756. '
  3757. 'Input Parameters
  3758. 'None
  3759. '
  3760. 'Return Value
  3761. '0 if no errors.  Non-zero if an error occurred. Use TCWLastErrorGet to retrieve 
  3762. 'error string.
  3763. '
  3764. 'See Also
  3765. '
  3766. 'Coding Example
  3767. '
  3768. 'Declaration
  3769. Declare Function TCWViewZoomPage lib "TCAPI40" () As Long
  3770.  
  3771. 'Description
  3772. 'This function will zoom to a view that contains all of the objects in the drawing.  
  3773. '
  3774. 'Input Parameters
  3775. 'None
  3776. '
  3777. 'Return Value
  3778. '0 if no errors.  Non-zero if an error occurred. Use TCWLastErrorGet to retrieve 
  3779. 'error string.
  3780. '
  3781. 'See Also
  3782. '
  3783. 'Coding Example
  3784. '
  3785. 'Declaration
  3786. Declare Function TCWViewZoomExtents lib "TCAPI40" () As Long
  3787.  
  3788. 'Description
  3789. 'This function will zoom to a view that is bounded by the rectangle points 
  3790. 'specified.  
  3791. '
  3792. 'Input Parameters
  3793. 'Double x0            X coordinate of top left corner of rectangle
  3794. 'Double y0            Y coordinate of top left corner of rectangle
  3795. 'Double z0            Z coordinate of top left corner of rectangle
  3796. 'Double x1            X coordinate of lower right corner of rectangle
  3797. 'Double y1            Y coordinate of lower right corner of rectangle
  3798. 'Double z1            Z coordinate of lower right corner of rectangle
  3799. '
  3800. 'Return Value
  3801. '0 if no errors.  Non-zero if an error occurred. Use TCWLastErrorGet to retrieve 
  3802. 'error string.
  3803. '
  3804. 'See Also
  3805. '
  3806. 'Coding Example
  3807. '
  3808. 'Declaration
  3809. Declare Function TCWViewZoomWindow lib "TCAPI40" ( _ 
  3810.     ByVal x0 As Double, _ 
  3811.     ByVal y0 As Double, _ 
  3812.     ByVal z0 As Double, _ 
  3813.     ByVal x1 As Double, _ 
  3814.     ByVal y1 As Double, _ 
  3815.     ByVal z1 As Double _ 
  3816. ) As Long
  3817.  
  3818. 'Description
  3819. 'This function will return x coordinate which represents the bottom left
  3820. 'corner of the view.  
  3821. '
  3822. 'Input Parameters
  3823. 'None
  3824. '
  3825. 'Return Value
  3826. 'x coordinate as a Double.
  3827. '
  3828. 'See Also
  3829. 'TCWViewExtentsGetY1, TCWViewExtentsGetZ1, TCWViewExtentsGetX2, TCWViewExtentsGetY2,
  3830. 'TCWViewExtentsGetZ2
  3831. '
  3832. 'Coding Example
  3833. 'Find center of screen
  3834. '    xc = (TCWViewExtentsGetX1() + TCWViewExtentsGetX2())/2
  3835. '    yc = (TCWViewExtentsGetY1() + TCWViewExtentsGetY2())/2    
  3836. '
  3837. '    ' Create the empty circle graphic    
  3838. '    g = TCWCircleCenterAndPoint(xc, yc, 0.0, xc, yc+3, 0.0)    
  3839. '
  3840. 'Declaration
  3841. Declare Function TCWViewExtentsGetX1 lib "TCAPI40" () As Double
  3842.  
  3843. 'Description
  3844. 'This function will return y coordinate which represents the bottom left
  3845. 'corner of the view.  
  3846. '
  3847. 'Input Parameters
  3848. 'None
  3849. '
  3850. 'Return Value
  3851. 'y coordinate as a Double.
  3852. '
  3853. 'See Also
  3854. 'TCWViewExtentsGetX1, TCWViewExtentsGetZ1, TCWViewExtentsGetX2, TCWViewExtentsGetY2,
  3855. 'TCWViewExtentsGetZ2
  3856. '
  3857. 'Coding Example
  3858. 'Find center of screen
  3859. '    xc = (TCWViewExtentsGetX1() + TCWViewExtentsGetX2())/2
  3860. '    yc = (TCWViewExtentsGetY1() + TCWViewExtentsGetY2())/2    
  3861. '
  3862. '    ' Create the empty circle graphic    
  3863. '    g = TCWCircleCenterAndPoint(xc, yc, 0.0, xc, yc+3, 0.0)    
  3864. '
  3865. 'Declaration
  3866. Declare Function TCWViewExtentsGetY1 lib "TCAPI40" () As Double
  3867.  
  3868. 'Description
  3869. 'This function will return z coordinate which represents the bottom left
  3870. 'corner of the view.  
  3871. '
  3872. 'Input Parameters
  3873. 'None
  3874. '
  3875. 'Return Value
  3876. 'z coordinate as a Double.
  3877. '
  3878. 'See Also
  3879. 'TCWViewExtentsGetX1, TCWViewExtentsGetY1, TCWViewExtentsGetX2, TCWViewExtentsGetY2,
  3880. 'TCWViewExtentsGetZ2
  3881. '
  3882. 'Coding Example
  3883. 'Find center of screen
  3884. '    xc = (TCWViewExtentsGetX1() + TCWViewExtentsGetX2())/2
  3885. '    yc = (TCWViewExtentsGetY1() + TCWViewExtentsGetY2())/2    
  3886. '
  3887. '    ' Create the empty circle graphic    
  3888. '    g = TCWCircleCenterAndPoint(xc, yc, 0.0, xc, yc+3, 0.0)    
  3889. '
  3890. 'Declaration
  3891. Declare Function TCWViewExtentsGetZ1 lib "TCAPI40" () As Double
  3892.  
  3893. 'Description
  3894. 'This function will return x coordinate which represents the top right
  3895. 'corner of the view.  
  3896. '
  3897. 'Input Parameters
  3898. 'None
  3899. '
  3900. 'Return Value
  3901. 'x coordinate as a Double.
  3902. '
  3903. 'See Also
  3904. 'TCWViewExtentsGetX1, TCWViewExtentsGetY1, TCWViewExtentsGetZ1, TCWViewExtentsGetY2,
  3905. 'TCWViewExtentsGetZ2
  3906. '
  3907. 'Coding Example
  3908. 'Find center of screen
  3909. '    xc = (TCWViewExtentsGetX1() + TCWViewExtentsGetX2())/2
  3910. '    yc = (TCWViewExtentsGetY1() + TCWViewExtentsGetY2())/2    
  3911. '
  3912. '    ' Create the empty circle graphic    
  3913. '    g = TCWCircleCenterAndPoint(xc, yc, 0.0, xc, yc+3, 0.0)    
  3914. '
  3915. 'Declaration
  3916. Declare Function TCWViewExtentsGetX2 lib "TCAPI40" () As Double
  3917.  
  3918. 'Description
  3919. 'This function will return y coordinate which represents the top right
  3920. 'corner of the view.  
  3921. '
  3922. 'Input Parameters
  3923. 'None
  3924. '
  3925. 'Return Value
  3926. 'y coordinate as a Double.
  3927. '
  3928. 'See Also
  3929. 'TCWViewExtentsGetX1, TCWViewExtentsGetY1, TCWViewExtentsGetZ1, TCWViewExtentsGetX2,
  3930. 'TCWViewExtentsGetZ2
  3931. '
  3932. 'Coding Example
  3933. 'Find center of screen
  3934. '    xc = (TCWViewExtentsGetX1() + TCWViewExtentsGetX2())/2
  3935. '    yc = (TCWViewExtentsGetY1() + TCWViewExtentsGetY2())/2    
  3936. '
  3937. '    ' Create the empty circle graphic    
  3938. '    g = TCWCircleCenterAndPoint(xc, yc, 0.0, xc, yc+3, 0.0)    
  3939. '
  3940. 'Declaration
  3941. Declare Function TCWViewExtentsGetY2 lib "TCAPI40" () As Double
  3942.  
  3943. 'Description
  3944. 'This function will return z coordinate which represents the top right
  3945. 'corner of the view.  
  3946. '
  3947. 'Input Parameters
  3948. 'None
  3949. '
  3950. 'Return Value
  3951. 'z coordinate as a Double.
  3952. '
  3953. 'See Also
  3954. 'TCWViewExtentsGetX1, TCWViewExtentsGetY1, TCWViewExtentsGetZ1, TCWViewExtentsGetX2,
  3955. 'TCWViewExtentsGetY2
  3956. '
  3957. 'Coding Example
  3958. 'Find center of screen
  3959. '    xc = (TCWViewExtentsGetX1() + TCWViewExtentsGetX2())/2
  3960. '    yc = (TCWViewExtentsGetY1() + TCWViewExtentsGetY2())/2    
  3961. '
  3962. '    ' Create the empty circle graphic    
  3963. '    g = TCWCircleCenterAndPoint(xc, yc, 0.0, xc, yc+3, 0.0)    
  3964. '
  3965. 'Declaration
  3966. Declare Function TCWViewExtentsGetZ2 lib "TCAPI40" () As Double
  3967.  
  3968. 'Section
  3969. 'LAYERS - Management Functions
  3970.  
  3971. 'Description
  3972. 'This function will return the number of layers in the active drawing.
  3973. '
  3974. 'Input Parameters
  3975. 'None
  3976. '
  3977. 'Return Value
  3978. 'Count of the number of layers as a Long.
  3979. '
  3980. 'See Also
  3981. '
  3982. 'Coding Example
  3983. '
  3984. 'Declaration
  3985. Declare Function TCWLayersCount lib "TCAPI40" () As Long
  3986.  
  3987. 'Description
  3988. 'This function will return the layer in the active drawing, requested by the index.
  3989. '
  3990. 'Input Parameters
  3991. 'None
  3992. '
  3993. 'Return Value
  3994. 'Handle to the layer as a Long.
  3995. '
  3996. 'See Also
  3997. '
  3998. 'Coding Example
  3999. '
  4000. 'Declaration
  4001. Declare Function TCWLayersAt lib "TCAPI40" ( _ 
  4002.     ByVal Index As Long _ 
  4003. ) As Long
  4004.  
  4005. 'Description
  4006. 'This function will create a new layer in the active drawing.  If the layer
  4007. 'already exits, the settings are overwritten.
  4008. '
  4009. 'Input Parameters
  4010. 'String lName        name of layer
  4011. 'Integer visible    TRUE if visible
  4012. 'Integer frozen    TRUE if graphics on layer cannot be edited or selected
  4013. 'Integer ReadOnly    TRUE if graphics on layer cannot be edited
  4014. 'Long lColor        color as &H00bbggrr
  4015. 'Long lLineStyle    line style
  4016. '
  4017. 'Return Value
  4018. 'Layer ID or 0 if layer could not be created.  Use TCWLastErrorGet to
  4019. 'retrieve error string.
  4020. '    
  4021. 'See Also
  4022. 'TCWLayerDispose
  4023. '
  4024. 'Coding Example
  4025. '
  4026. 'Declaration
  4027. Declare Function TCWLayerCreate lib "TCAPI40" ( _ 
  4028.     ByRef lName As String, _ 
  4029.     ByVal visible As Long, _ 
  4030.     ByVal frozen As Long, _ 
  4031.     ByVal readonly As Long, _ 
  4032.     ByVal lColor As Long, _ 
  4033.     ByVal lLineStyle As Long _ 
  4034. ) As Long
  4035.  
  4036. 'Description
  4037. 'This function will delete the layer in the active drawing, requested by the index.
  4038. '
  4039. 'Input Parameters
  4040. 'Long Index        layer to delete
  4041. '
  4042. 'Return Value
  4043. '0 if no errors.  Non-zero if an error occurred. Use TCWLastErrorGet to retrieve 
  4044. 'error string.
  4045. '
  4046. 'See Also
  4047. '
  4048. 'Coding Example
  4049. '
  4050. 'Declaration
  4051. Declare Function TCWLayerDispose lib "TCAPI40" ( _ 
  4052.     ByVal Index As Long _ 
  4053. ) As Long
  4054.  
  4055. 'Section
  4056. 'LAYERS - Get and Set Property Functions
  4057.  
  4058. 'Description
  4059. 'This function will return the value of the property that has been
  4060. 'requested. This mechanism is being used to get around Enable 3.0
  4061. 'non-support for Variants in DLLs.
  4062. '
  4063. 'Input Parameters
  4064. 'Long layer                layer id returned from LayerAt
  4065. 'String propertyname        name of property look up
  4066. '
  4067. 'AVAILABLE PROPERTIES:        DESCRIPTION:
  4068. '"Color"                    layer color
  4069. '"Frozen"                    graphics on layer are non editable and non selectable
  4070. '"LineStyle"                layer line style                        
  4071. '"Name"                    layer name                
  4072. '"Readonly"                graphics on layer are read only        
  4073. '"Visible"                    is layer visible in drawing    
  4074. '
  4075. 'Return Value
  4076. 'Value of property requested
  4077. '
  4078. 'AVAILABLE PROPERTIES:        VALUE RETURNED:
  4079. '"Color"                    &H00bbggrr as a Long
  4080. '"Frozen"                    -1 if frozen, 0 if not 
  4081. '"LineStyle"                layer line style as a Long
  4082. '"Name"                    layer name as a String
  4083. '"Readonly"                -1 if read only, 0 if not 
  4084. '"Visible"                    -1 if visible, 0 if not
  4085. '
  4086. 'See Also
  4087. '
  4088. 'Coding Example
  4089. 'Dim dActive As Long
  4090. 'Dim count As Long
  4091. 'Dim i As Long
  4092. 'Dim LayerID As Long
  4093. 'Dim LayVar As String
  4094. 'Dim Result As Variant
  4095. 'Sub Main
  4096. '    LayVar = "c:\imsi\tcw40\Samples\mouse.tcw"
  4097. '    TCWDrawingOpen "c:\imsi\tcw40\Samples\mouse.tcw"
  4098. '
  4099. '    count = TCWLayersCount()
  4100. '    MsgBox count
  4101. '    i = 1
  4102. '    LayVar = "Name"
  4103. '    Do While (i <> count)
  4104. '       LayerID = TCWLayersAt(i)
  4105. '       Result = TCWLayerPropertyGet(LayerID, LayVar)
  4106. '       MsgBox Result
  4107. '       i = i + 1
  4108. '    Loop
  4109. '    MsgBox "Finished"
  4110. '
  4111. 'End Sub
  4112. '
  4113. 'Declaration
  4114. 'Declare Function TCWLayerPropertyGet ( _ 
  4115. '    ByVal layer As Long, _ 
  4116. '    ByRef propertyname As String _ 
  4117. ')As Variant
  4118.  
  4119. 'Description
  4120. 'This function will set the property with the specified value.
  4121. '
  4122. 'Input Parameters
  4123. 'Long layer                layer id
  4124. 'String propertyname        name of property to modify 
  4125. 'Variant value                value to set to 
  4126. '
  4127. 'AVAILABLE PROPERTIES:        VALUES:
  4128. '"Color"                    &H00bbggrr
  4129. '"Frozen"                    1 to set frozen, 0 to unset
  4130. '"Linestyle"                Long                    
  4131. '"Name"                    String                
  4132. '"Readonly"                1 to set readonly, 0 to unset        
  4133. '"Visible"                    1 to set visible, 0 to unset     
  4134. '
  4135. 'Return Value
  4136. '0 if no errors.  Non-zero if errors.  Use TCWLastErrorGet to retrieve error string.
  4137. '
  4138. 'See Also
  4139. '
  4140. 'Coding Example
  4141. '
  4142. 'Declaration
  4143. 'Declare Function TCWLayerPropertySet ( _
  4144. '    ByVal layer As Long, _ 
  4145. '    ByRef propertyname As String, _ 
  4146. '    ByVal value As Variant
  4147. ')As Long
  4148.  
  4149.  
  4150.  
  4151. 'Section
  4152. 'FILE I/O - Functions
  4153.  
  4154. 'Description
  4155. 'This function will open a text file for input.
  4156. '
  4157. 'Input Parameters
  4158. 'String filename        name of file to open for reading.
  4159. '
  4160. 'Return Value
  4161. 'Handle to the file as a Long.  If return value is 0, use TCWLastErrorGet to 
  4162. 'retrieve error string.
  4163. '
  4164. 'See Also
  4165. 'TCWCloseInput, TCWReadInput, TCWReadInputToken
  4166. '
  4167. 'Coding Example
  4168. '
  4169. 'Declaration
  4170. Declare Function TCWOpenInput lib "TCAPI40" ( _ 
  4171.     ByRef filename As String _ 
  4172. ) As Long
  4173.  
  4174. 'Description
  4175. 'This function reads characters from the input file (fd) until it reaches a:
  4176. 'space, next line, of eof or the max number of characters has been read (256).
  4177. '
  4178. 'Input Parameters
  4179. 'Long fd                file descriptor returned by TCWOpenInput
  4180. 'String strtext        buffer for data to be read into
  4181. '
  4182. 'Return Value
  4183. '0 if no errors
  4184. '-1 if EOF seen
  4185. 'Non-zero (not -1) if errors.  Use TCWLastErrorGet to retrieve error string.
  4186. '
  4187. 'See Also
  4188. 'TCWOpenInput, TCWCloseInput, TCWReadInput
  4189. '
  4190. 'Coding Example
  4191. '
  4192. 'Declaration
  4193. Declare Function TCWReadInputToken lib "TCAPI40" ( _ 
  4194.     ByVal fd As Long, _ 
  4195.     ByRef bstrtext As String _ 
  4196. ) As Long
  4197.  
  4198. 'Description
  4199. 'This function reads the entire line from the input file (fd) into the buffer pbstrBuffer.
  4200. 'The line separator character is '\n'.  '\r' is ignored.
  4201. '
  4202. 'Input Parameters
  4203. 'Long    fd            file descriptor returned by TCWOpenInput
  4204. 'String strtext    buffer for data to be read into
  4205. '
  4206. 'Return Value
  4207. '0 if no errors
  4208. '-1 if EOF seen
  4209. 'Non-zero (not -1) if errors.  Use TCWLastErrorGet to retrieve error string.
  4210. '
  4211. 'See Also
  4212. 'TCWCloseInput, TCWOpenInput, TCWReadInputToken
  4213. '
  4214. 'Coding Example
  4215. '
  4216. 'Declaration
  4217. Declare Function TCWReadInput lib "TCAPI40" ( _ 
  4218.     ByVal fd As Long, _ 
  4219.     ByRef bstrtext As String _ 
  4220. ) As Long
  4221.  
  4222. 'Description
  4223. 'This function closes the input file.
  4224. '
  4225. 'Input Parameters
  4226. 'Long fd            file descriptor returned by TCWOpenInput
  4227. '
  4228. 'Return Value
  4229. '0 if no errors.  Non-zero if an error occurred. Use TCWLastErrorGet to retrieve 
  4230. 'error string.
  4231. '
  4232. 'See Also
  4233. 'TCWOpenInput, TCWReadInput, TCWReadInputToken
  4234. '
  4235. 'Coding Example
  4236. '
  4237. 'Declaration
  4238. Declare Function TCWCloseInput lib "TCAPI40" ( _ 
  4239.     ByVal fd As Long _ 
  4240. ) As Long
  4241.  
  4242. 'Description
  4243. 'This function will open a text file for output.
  4244. '
  4245. 'Input Parameters
  4246. 'String filename            name of file to open for writing.
  4247. '
  4248. 'Return Value
  4249. 'Handle to the file as a Long.  If return value is 0, use TCWLastErrorGet to 
  4250. 'retrieve error string.
  4251. '
  4252. 'See Also
  4253. 'TCWCloseOutput, TCWWriteOutput
  4254. '
  4255. 'Coding Example
  4256. '
  4257. 'Declaration
  4258. Declare Function TCWOpenOutput lib "TCAPI40" ( _ 
  4259.     ByRef filename As String _ 
  4260. ) As Long
  4261.  
  4262. 'Description
  4263. 'This function writes the buffer bstrBuffer to the file (fd).
  4264. '
  4265. 'Input Parameters
  4266. 'Long fd                    file descriptor returned by TCWOpenOutput
  4267. 'String strtext            buffer for data to be read into
  4268. '
  4269. 'Note that max number of bytes you can write is  0xFFFE (65534).
  4270. '
  4271. 'Return Value
  4272. '0 if no errors.  Non-zero if an error occurred. Use TCWLastErrorGet to retrieve 
  4273. 'error string.
  4274. '
  4275. 'See Also
  4276. 'TCWCloseOutput, TCWOpenOutput
  4277. '
  4278. 'Coding Example
  4279. '
  4280. 'Declaration
  4281. Declare Function TCWWriteOutput lib "TCAPI40" ( _ 
  4282.     ByVal fd As Long, _ 
  4283.     ByRef bstrBuffer As String _ 
  4284. ) As Long
  4285.  
  4286. 'Description
  4287. 'This function closes the output file.
  4288. '
  4289. 'Input Parameters
  4290. 'Long fd            file descriptor returned by TCWOpenOutput
  4291. '
  4292. 'Return Value
  4293. '0 if no errors.  Non-zero if an error occurred. Use TCWLastErrorGet to retrieve 
  4294. 'error string.
  4295. '
  4296. 'See Also
  4297. 'TCWOpenOutput, TCWWriteOutput
  4298. '
  4299. 'Coding Example
  4300. '
  4301. 'Declaration
  4302. Declare Function TCWCloseOutput lib "TCAPI40" ( _ 
  4303.     ByVal fd As Long _ 
  4304. ) As Long
  4305.  
  4306. 'Section
  4307. 'SCREEN - Mouse to Point Functions
  4308.  
  4309. 'Description
  4310. 'This function will set the vertex to the value of the next mouse pick in the
  4311. 'active viewport. The user should use the left mouse button.  A value will not be
  4312. 'returned until the mouse button is released.
  4313. '
  4314. 'Input Parameters
  4315. 'Long v                handle to a vertex
  4316. 'String prompt            prompt for user
  4317. 'Long g                handle of a graphic to drag (or NULL)
  4318. 'Long vd                reference to a vertex in the drag graphic (or NULL)
  4319. 'Long os                snap modes which give "magnetic: functionality
  4320. 'Long cursor            1 for arrow, 2 for cross, 3 for ibeam
  4321. '
  4322. 'Return Value
  4323. '0 if no errors.  Non-zero if an error occurred. Use TCWLastErrorGet to retrieve 
  4324. 'error string.
  4325. '
  4326. 'See Also
  4327. ' TCWVertexFindVertex, TCWVertexFindGraphic
  4328. '
  4329. 'Coding Example
  4330. '
  4331. 'Declaration
  4332. Declare Function TCWGetPoint lib "TCAPI40" ( _ 
  4333.     ByVal v As Long, _ 
  4334.     ByVal Prompt As String, _ 
  4335.     ByVal gd As Long, _ 
  4336.     ByVal vd As Long, _ 
  4337.     ByVal osmode As Long, _ 
  4338.     ByVal cursor As Long _ 
  4339. ) As Long
  4340.  
  4341. 'Description
  4342. 'This function will update the supplied vertex's X, Y, and Z coordinates with the
  4343. 'X, Y, and Z coordinates of the closest vertex based on the snap mode used. 
  4344. '
  4345. 'Input Parameters
  4346. 'Long v            handle to a vertex
  4347. 'Long os            snap modes which are active combination of the following values:
  4348. '
  4349. '. .                SNAP_NEARESTPOINT  0x0008
  4350. '. .                SNAP_MIDPOINT      0x0020
  4351. '. .                SNAP_CENTER        0x0040
  4352. '. .                SNAP_QUADRANTPOINT 0x0080
  4353. '. .                SNAP_ANYPOINT      0x00FC
  4354. '. .                SNAP_NEARESTENTITY 0x0100 (overrides other snaps)
  4355. '
  4356. 'Return Value
  4357. '0 if no errors.  Non-zero if an error occurred. Use TCWLastErrorGet to retrieve 
  4358. 'error string.  Input parameter is updated to reflect closest vertex.
  4359. '
  4360. 'See Also
  4361. 'TCWVertexFindGraphic
  4362. '
  4363. 'Coding Example
  4364. '
  4365. 'Declaration
  4366. Declare Function TCWVertexFindVertex lib "TCAPI40" ( _ 
  4367.     ByVal v As Long, _ 
  4368.     ByVal osmode As Long _ 
  4369. ) As Long
  4370.  
  4371. 'Description
  4372. 'This function with return the handle to the graphic that is closest to the 
  4373. 'supplied vertex. 
  4374. '
  4375. 'Input Parameters
  4376. 'Long v            handle to a vertex
  4377. '
  4378. 'Return Value
  4379. '0 if no errors.  Non-zero if an error occurred. Use TCWLastErrorGet to retrieve 
  4380. 'error string.
  4381. '
  4382. 'See Also
  4383. 'TCWVertexFindVertex
  4384. '
  4385. 'Coding Example
  4386. '
  4387. 'Declaration
  4388. Declare Function TCWVertexFindGraphic lib "TCAPI40" ( _ 
  4389.     ByVal v As Long _ 
  4390. ) As Long
  4391.  
  4392.