What Is ActiveX Automation?
You’ve seen by now that AutoCAD is an immensely flexible and programmable drawingsystem.You can control AutoCAD from the command prompt,from menus and tool-bars,and from AutoLISP macros and programs.Autodesk also supplies a set ofexten-sions for controlling AutoCAD from the C++ language.These extensions,calledObjectARX,are designed for use from C++ only and are beyond the scope ofthis book.Starting with AutoCAD 14,there’s an entirely new way to control AutoCAD—through ActiveX Automation.ActiveX Automation is a Microsoft-created standard,formerly called OLE Automation,that allows one Windows application to controlanother Windows application through exposed “objects.”In this chapter,you’ll see how you can use an external application to control AutoCAD and become familiar with theActiveX Automation capabilities ofAutoCAD 2005.Ifyou want to see some immediate examples ofActiveX Automation programming,skip forward to the
Automation Techniques
section.But be sure to come back and readother material in this chapter for an overview ofthe potential ofActiveX Automationwith AutoCAD.
Integrating Applications
AutoCAD is a marvelously flexible application,but like all computer applications,it’sspecialized in one particular area.AutoCAD’s specialty is producing drawings.Despitesome capabilities for handling text,numbers,and data storage,AutoCAD isn’t a wordprocessor,spreadsheet,or database program—nor should it be.By concentrating theirefforts on drawing functionality,the Autodesk developers can produce the best possibledrawing application,and let other teams produce the best possible word processors,spreadsheets,and databases.However,there are times when it would be nice to combine the capabilities ofmulti-ple programs.Imagine that you have a complex architectural drawing for an entire build-ing,such as an office building,and you need to produce some custom reports on thenumber ofdesks,chairs,and computer workstations the plan includes.Yes,you could fig-ure out a way to do this within AutoCAD itself.But wouldn’t it be much easier to some-how use the AutoCAD data within a database program that has a powerful reportgenerator? Or suppose you need to include a summary oflumber board feet in a docu-ment you’re preparing in a word processor.Wouldn’t you like to be able to read the neces-sary information from the drawing file you’ve been working with?
WHAT IS ACTIVEX AUTOMATION?
3
T
HISCHAPTERORIGINALLYAPPEAREDIN
M
ASTERING
A
UTO
CAD 2004
AND
A
UTO
CAD LT 2004
ANDHASBEENUPDATEDFOR
A
UTO
CAD 2005
AND
A
UTO
CAD LT 2005.
Leave a Comment