home *** CD-ROM | disk | FTP | other *** search
/ BUG 11 / BUGCD1998_02.ISO / aplic / turbocad / tcw.z / layer.bas < prev    next >
BASIC Source File  |  1997-05-05  |  523b  |  31 lines

  1. 'Program to get the id and name of each layer in the drawing
  2. Sub Main()
  3. Dim dActive As Long
  4. Dim hDrawing As Long
  5. Dim count As Long
  6. Dim i As Long
  7. Dim LayerID As Long
  8. Dim LayVar As String
  9. Dim Result As Variant
  10.  
  11. hDrawing = TCWDrawingOpen("c:\imsi\tcw40\Samples\mouse.tcw")
  12.  
  13. count = TCWLayersCount()
  14. i = 1
  15. LayVar = "Name"
  16. Do While (i <> count)
  17.     LayerID = TCWLayersAt(i)
  18.     Msgbox LayerID
  19.     Result = TCWLayerPropertyGet(LayerID, LayVar)
  20.     MsgBox Result
  21.     i = i + 1
  22. Loop
  23. MsgBox "Finished"
  24.  
  25. End Sub
  26.  
  27.  
  28.  
  29.  
  30.  
  31.