Automation using excel sheet

Automation using excel sheet

stepron.sjangam
Contributor Contributor
855 Views
3 Replies
Message 1 of 4

Automation using excel sheet

stepron.sjangam
Contributor
Contributor

I’m looking for a way to automate my daily panel drawing routine.

I was looking for a solution when I came up with excel and VBA. Basically, what I’m trying to achieve is, based on user input to the attached standard excel sheet, AutoCAD will create the panel drawing using standard stretchable dynamic blocks. 

The drawing consists mostly of panels drawn at exact distances from each other see the attached snapshot.

Is it possible to achieve the results I’m looking for with excel and VBA? If yes, are there any good resources where I can find in depth tutorials on how to accomplish this task? All I could find was "Introduction to Visual Basic® for Applications for Autodesk® AutoCAD®" at Autodesk pages.

Or is there any other way how I can automate this based on user input?

 

Please check attached standard excel & standard panel blocks.

0 Likes
Accepted solutions (1)
856 Views
3 Replies
Replies (3)
Message 2 of 4

stepron.sjangam
Contributor
Contributor

Hi All

0 Likes
Message 3 of 4

norman.yuan
Mentor
Mentor
Accepted solution

Using data in Excel sheet to automate AutoCAD is a topic that has been discussed in the forum at least hundreds, if not even more times. Simply search "Excel" in this forum, or search "Excel & AutoCAD" on the net, you would get tons of links leading you to lot of sample code.

 

It looks like, to me, that you need to learn or know better on AutoCAD side VBA (e.g. AutoCAD COM API) first. Unless the entire workflow is to be done by someone who knows very little about AutoCAD (yes, his/here computer has to have AutoCAD installed), and the data in the Excel sheet MUST be presented in certain format (e.g. the sheet is not mainly for data storage and for quick browsing/inputting), it would be better to do things from AutoCAD side, rather than from Excel side.

 

Not knowing your level of programming on both sides (Excel/AutoCAD), it is difficult to suggest further. But you would divide the task into a few separate portions: changing dynamic block reference's properties (in your case, "stretch" the block references); gathering data stored in Excel sheet; either automating Excel from AutoCAD side to retrieve the data and then update the blocks, or automating AutoCAD from Excel side to let AutoCAD update the blocks (the latter is much slower, which may matter if you have a drawing with many blocks, or you have to do with many drawings).

 

With all said, it is not a difficult task to do,

 

 

Norman Yuan

Drive CAD With Code

EESignature

0 Likes
Message 4 of 4

stepron.sjangam
Contributor
Contributor

Any one here, who can help me out on this?

0 Likes