ASE, SQL, OLE, ADE

Reply
*JIC
Message 1 of 5 (80 Views)

Excel question

80 Views, 4 Replies
12-05-2002 11:19 PM
I am looking for a good location of information regarding inserting
information from excel into autocad.
any info is appreciated


Phil
*Dotson, Terry W.
Message 2 of 5 (80 Views)

Re: Excel question

12-06-2002 02:52 AM in reply to: *JIC
JIC wrote:

> I am looking for a good location of information regarding inserting
> information from excel into autocad.

What exactly are you looking to do?

Terry
*JIC
Message 3 of 5 (80 Views)

Re:

12-06-2002 03:32 AM in reply to: *JIC
use it for my plumbing/mechanical calcs that i have set up in excel.

Terry W. Dotson wrote:
> JIC wrote:
>
>
>>I am looking for a good location of information regarding inserting
>>information from excel into autocad.
>
>
> What exactly are you looking to do?
>
> Terry
*Goodfellow, John
Message 4 of 5 (80 Views)

Re: Excel question

12-06-2002 04:24 AM in reply to: *JIC
Take a look at the ACAD help file "ActiveX and VBA Developers Guide", Ch.
12. Here's a code sample. Include a ref. to the Excel 8.0 object library
in your ACAD VBA project.

Private Sub UseExcel(strFSpecXLS As String)
' strFSpecXLS is the full path + filename + ext of the Excel file
Dim oExcel As Excel.Application, oWrkBk As Excel.Workbook, oWrkSh As
Excel.Worksheet

If Dir(strFSpecXLS) <> "" Then
Set oExcel = New Excel.Application
Set oWrkBk = oExcel.Workbooks.Open(strFSpecXLS)
Set oWrkSh = oWrkBk.Worksheets("WorksheetName")

' Assign input values to cells
' oSensor is a class object
' oRecSet is an ADO recordset contained in oSensor
oWrkSh.[C8] = oSensor.oRecSet!GlaWid
oWrkSh.[C9] = oSensor.oRecSet!GlaHgt
oWrkSh.[C10] = oSensor.oRecSet!ActWid
oWrkSh.[C11] = oSensor.oRecSet!ActHgt

' Run calculations
oWrkSh.Calculate

' Return output values to recordset
oSensor.oRecSet!TGRTopMax = oWrkSh.[D24]
oSensor.oRecSet!TGRTopMin = oWrkSh.[C24]
oSensor.oRecSet!TGRGlaMax = oWrkSh.[H24]
oSensor.oRecSet!TGRGlaMin = oWrkSh.[G24]
Else
Err.Raise vbObjectError + 9998, strThisProc, "File not found: " &
strFSpecXLS
End If

oWrkBk.Close True ' True means "save the workbook changes"
oExcel.Quit
End Sub
--
John Goodfellow
irtfnm
use john at goodfellowassoc dot com


"JIC" wrote in message
news:3DF0C00E.5000508@netscape.net...
> I am looking for a good location of information regarding inserting
> information from excel into autocad.
> any info is appreciated
>
>
> Phil
>
*Dotson, Terry W.
Message 5 of 5 (80 Views)

Re:

12-08-2002 10:21 PM in reply to: *JIC
JIC wrote:

> use it for my plumbing/mechanical calcs that i have set up in excel.

And then produce a table in the drawing, or draw those as objects?

Terry

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community