Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
George Omura. Lisp programing tutorial for AutoCAD customization / [TUTORIAL] Autodesk - AutoCAD - VBA Integrating with Microsoft Excel.rtf
Скачиваний:
93
Добавлен:
02.05.2014
Размер:
630.89 Кб
Скачать

Reason #6: Tabulation

In an AutoCAD drawing, put a bunch of text entities with numeric values (for example, currency) in a vertical column (see Figure 1). Now add them up and report that value at the bottom of the column. Oops! Something changed. Edit one of the text entity values and retotal everything. Find their average value or their minimal value or their maximum value and report that, too, at the bottom of the column. Oops! Sales tax just went up! Increase all of the text entity values by a new percentage value and change the new total at the bottom of the column. Are we having fun yet?

For years, people have been using TEXT entities to report tabulated data on drawings without the benefit of tabulation tools to do it, and a TEXT entity doesn't know the difference between a dollar and a toilet. Spreadsheets have been cranking out this kind of information for over a decade. Think hard about this one, folks. Maybe, just maybe, the process of creating schedules is possible without getting a headache.

Figure 1: Creating a schedule even this simple is time-consuming to construct and tally without a spreadsheet.

Reason #7: True Text-Formatting Control

At the recent AUGI® Annual General Meeting, the top 10 wish-list items were announced for the year and right up there near the top (for the umpteenth year in a row) was "tabbing for MTEXT"). If you've ever tried to align columns of TEXT or reorganize the line-by-line textual content of an entity after its assigned width space changed (a very painful process), or if you've ever tried to perform any number of basic text-formatting manipulations within AutoCAD software (which are a cinch to do in Excel), you know how hard it is. Now you don't have to wait for such tools. By importing spreadsheet data (or even my linking and/or embedding it), you can bring full text control to your AutoCAD drawings (see Figure 2). Changing the assigned width of columns of textual or numerical data can be as simple as a drop-and-drag operation.

3 of 4 16/10/2004 07:18 p.m.

Autodesk - AutoCAD - VBA: Integrating with Microsoft Excel - Part 1 http://usa.autodesk.com/adsk/servlet/item?siteID=123112&id=2671...

Figure 2: When you bring Excel grids into your drawings, you have complete control over text formatting, column width, cell border thickness, and even background patterning.

Reason #8: Formulas?

What else can a spreadsheet do with data in a cell? Well for one thing, it can contain a formula to generate cell content based on other cells. That means that you can actually apply formulas for TEXT entities in your drawings! Aside from obvious uses of this capability

(such as generating totals after a part count), you could even use Excel to figure out (through conditional states) what text, notes, or details need to be imported into a drawing based on parts found in a drawing. Yes, folks... this starts getting wild.

Reason #9: Automated Linework Generation

And while we're on the subject of things being imported based on queries and tallies and other amazing spreadsheet operations, we can also generate linework itself from spreadsheets. You can convert databases to an Excel format, and easily view and edit them. And once you have that data in a spreadsheet format, it is possible to start generating linework from it! Imagine that you have a basic COGO

point set of X, Y, and Z values broken down into three columns. Contour lines or TINs could be generated from this information.

Reason #10: Costing Out a Drawing

Excel spreadsheets make great reference tables. Imagine that you have a list of prices for items you insert into your drawings, and imagine that you want a part count and a financial assessment of a drawing. To do this, you can begin with surveys of the entity database, pulling the necessary computational information into preset columns in a spreadsheet, and then price out the cost of the entire project based on an entirely different spreadsheet of price-per-item values. Inventories on steroids, and generated no less by a CAD user!