Message 1 of 11
LineStart and LineEnd to excel

Not applicable
11-30-2007
06:03 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello everyone,
I´m creating a VBA application in Excel that takes objects from AutoCAD and places it´s properties in an Excel sheet. (With the properties from this sheet i want to create a SVG file.)
Writing layer, color, handle, name and text to excel works beautifully using the acax17enu.tlb library. example:
Dim ent As AcadEntity
Dim Excel As Object
Dim excelSheet As Object
Dim entLayer As String
entLayer = ""
entLayer = ent.Layer
excelSheet.Cells(R, 1).Value = entLayer
and voila the layer is in column A
I also neet Start and Endpoint of a line or path of a polyline and center of circles etc. For now I use the Getpoint function to acquire these points:
dim startpoint as variant
dim x as double,y as double,z as double
StartPoint = ThisDrawing.Utility.GetPoint(Prompt:="Pick Insert Point:")
x=startpoint(0)
y=startpoint(1)
z=startpoint(2)
excelSheet.Cells(R, 7).Value = x
excelSheet.Cells(R, 8).Value = y
the function requires you to interactively select the points rather than automatically selecting startpoint and endpoint. Is there another way to do this?
Are these points in another library maybe?
Or can I get the Getpoint function to automatically select certain points?
Thanks!
I´m creating a VBA application in Excel that takes objects from AutoCAD and places it´s properties in an Excel sheet. (With the properties from this sheet i want to create a SVG file.)
Writing layer, color, handle, name and text to excel works beautifully using the acax17enu.tlb library. example:
Dim ent As AcadEntity
Dim Excel As Object
Dim excelSheet As Object
Dim entLayer As String
entLayer = ""
entLayer = ent.Layer
excelSheet.Cells(R, 1).Value = entLayer
and voila the layer is in column A
I also neet Start and Endpoint of a line or path of a polyline and center of circles etc. For now I use the Getpoint function to acquire these points:
dim startpoint as variant
dim x as double,y as double,z as double
StartPoint = ThisDrawing.Utility.GetPoint(Prompt:="Pick Insert Point:")
x=startpoint(0)
y=startpoint(1)
z=startpoint(2)
excelSheet.Cells(R, 7).Value = x
excelSheet.Cells(R, 8).Value = y
the function requires you to interactively select the points rather than automatically selecting startpoint and endpoint. Is there another way to do this?
Are these points in another library maybe?
Or can I get the Getpoint function to automatically select certain points?
Thanks!