using excel to draw in AUTOCAD

webking
01-24-2002, 03:44 PM
Is it possible that by using some kind of routine in excel spread sheet we can make diagram of the object if we place x, y,z coordinate in AUTOCAD.
Like if i place X , Y , Z axes coordinates of an object in excel spread sheet can excel draw that object or lets say that the values from excel are picked up by AUTOCAD to make that object.

MarkG
01-24-2002, 04:36 PM
Excel cannot access the AutoCAD object model but AutoCAD can read an Excel spreadsheet or an Access database. You would need to write code in AutoCAD VBA to read from a spreadsheet or connect to a database and then draw an object. It's also possible to do through VB by referencing the AutoCAD Object Library....... I read and write to databases on a regular basis from AutoCAD. AutoCAD uses DAO for database connectivity, at least through version 2000. ADO is not available in 2000 but may be in version 2002, I don't know.

Here's a simple snippet of code to connect to a database in AutoCAD VBA:


'Connect to database
'------------------------------------------------------------------------------------
Set db = DBEngine.Workspaces(0).OpenDatabase("C:\Program Files\ACAD2000\cofdata.mdb")
Set Rec = db.OpenRecordset("SELECT * FROM PFD_COF_Data WHERE " _
& "UniqueEquipmentID = '" & cmbEquip.Text & "'")

uncleshark
01-26-2002, 11:38 AM
It is possible to send data from excel to autocad using the sendkeys instruction. Just set up a loop that sends the data using the sendkeys instruction.

I used this method in word to create a 3d helix in autocad.

webking
01-26-2002, 02:33 PM
Thank you for your help ful reply but can please guide me how to do this using MS word or excel.
Like if i wanna draw a Circle in AUTOCAD from Ms Word or excel what steps should i follow.
Is it possible that some how i can draw the Steel Angle Shapes in this way. Like my objective is to draw the shop drawings of a 60 meter high communication tower. Is it possible that i can do the same using Ms Excel. or is there any freeware which includes the Steel Shapes file for Autocad.

uncleshark
01-27-2002, 07:36 AM
What are these steel shapes. I guess they are the profile shape of a steel beam . Is that right?

Ok.

Questions.
1. what version of autocad you using?
2. Do you need 3d drawing or just 2d
3. How much experience do you have with vba
4. what sort of data do you have in the spreadsheet. do you have an example

Please feel free to email me. I am only a newcomer but like i said, i have already got word to construct a helix in autocad and know the basics of controlling autocad from vba.

webking
01-27-2002, 11:43 AM
The Steel Shapes are :-

Single ANgle and double Angle and Bolts.
basically i have to make the shop drawings for a communication tower. i have uploaded its design diagram on the web:-

http://tosirzaffar.4t.com

i have autocad 2002

new user of VBA.

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum