Site Map
|
DDE and AutoCAD LT When Autodesk decided to remove the AutoLISP programming language from AutoCAD LT just prior to release many people wrote AutoCAD LT off as a novelty CAD application for only the basic CAD requirements. However, simply by running in the Microsoft Windows multitasking environment, AutoCAD opens itself to arguably a easier and more flexiable programming language - Visual Basic Dynamic data echange, or DDE is a feature provided by the Microsoft Windows operating system which allows two applications to "talk" to each other. Examples of DDE at work are the cut and paste commands found in most Windows applications and the launching of the appropiate program when a file is doubleclicked in File Manager, or Explorer. To establish a DDE link with AutoCAD we need to set the LinkMode and LinkTopic properties for the contol that will supply the commands to AutoCAD. Contols that support these properties are:
I find a TextBox contol the easiest to use. The LinkTopic property varies for different versions:
The pipe symbol [ | ], or ASCII charactor code 124, is found above the backslash on standard keyboards. The following code establishes a DDE link with AutoCAD LT and sends the commands to plot a drawing by limits. To use paste into the Declarations section of a form that contains a TextBox and a CommandButton. Note that as there is no error trapping AutoCAD LT must be running before you run the code. -------------------------Start of Code----------------------
-------------------------End of Code---------------------- DDEDemo is small application that demonstartes how the principals discribed above can be used. The source code, written in VB4 is available here. Download ddedemo.zip (3.59KB, last modified 06/07/97)
|
||||||||||||||||||||||||||||||||
|
Copyright © 1998
by BigByte Drafting. |