-2

I want to use AutoCAD to generate a 3D model which is composed of many basic 3D geometries such as sphere, cube, etc.

I have the dimensions and the origin and orientation of the local coordinate system of the basic geometries. The data are stored in an Excel file. Each row of the excel data corresponds to one geometry and the columns are for dimensions, origin coordinates, and orientations. The data format is defined for each type of geometry.

I wanted to use AutoLisp or VBA or some other macro tool for AutoCAD to automate this process so that when the data is changed, I just need to run the macro to read the data and regenerate the AutoCAD 3D model.

What is the best solution?

Community
  • 1
  • 1
user19041
  • 1
  • 1
  • What it seems like you are asking is how to take vertices stored in an excel spread sheet and use them to generate a 3-d model in AutoCAD. Just from my experience with VBA programming, you might want to start with CSV data, it's more easily read by a wide variety of languages, unlike the proprietary xls and convoluted xlsx formats. I suggest starting small and hard coding values in your script and see what objects you are able to generate. From there move on to reading a simple shape in from a CSV, finally moving on to your full product. – Pete Garafano Feb 02 '13 at 03:57

1 Answers1

1

There is no "best" solution for the general case. If you have experience with AutoLISP, use AutoLISP. If you have and use Visual Studio, use the ObjectARX .NET API. You could also write an Excel macro that generates a simple script file, use VBA inside AutoCAD, or drive AutoCAD from within Excel. The "best" way in your case is whichever way you feel most comfortable with.

Owen Wengerd
  • 1,628
  • 1
  • 11
  • 11