Guide to Using DWG and Other Formats
Guide to Using DWG and Other Formats
Guide to Using DWG and Other Formats
|
You can send key-ins to MicroStation through a DDE link. For example, you can create a macro in a spreadsheet to start a DDE “conversation” with and send key-ins to MicroStation.
MicroStation understands the following types of DDE requests:
INITIATE — Establishes a DDE link with MicroStation.
EXECUTE — Passes key-in(s) to MicroStation.
TERMINATE — Ends DDE conversation with MicroStation.
Applications that can make these DDE requests include Excel, Lotus 1-2-3, Object Vision, Visual Basic, and Word Basic.
The following Microsoft Excel macro rotates the contents of MicroStation's View 1 in 5° increments about the horizontal axis.
In this macro, chan is any Excel variable name, and it is needed to refer to this particular conversation in subsequent DDE requests. The contents of the macro are explained in the following table:
=INITIATE("Ustn","Keyin") |
Opens the conversation with MicroStation. The constants Ustn and Keyin are mandatory. |
=EXECUTE(chan,"rv=5") |
Passes the key-in RV=5 to MicroStation. |
=FOR("Count",1,40) |
Starts a loop for 40 times. |
=EXECUTE(chan,"selview 1") |
Uses the key-in SELVIEW 1 to simulate the entry of a data point in View 1. |
=NEXT() |
Marks the end of the loop. |
=TERMINATE(chan) |
Terminates the DDE conversation with MicroStation. |
=RETURN() |
Marks the end of the Excel macro. |