Written by Bob Mecham.
MicroStation can import files from external application such as Microsoft Word and Excel.
Link an Excel Sheet to MicroStation:
1. Open the Excel file and Select the amount of data you want to copy.
2. From the Excel pulldown Edit>Copy. The data is copied to the clipboard.
3. Open the MicroStation file you want to paste the Excel Sheet into.
4. From the MicroStation pulldown Edit>Paste Special. The Paste Special dialog appears.
5. From the list of Data Type select “Linked Microsoft Excel Worksheet”
6. Select the Paste icon.
7. In the Paste OLE Tool Settings dialog set the Method to By Size and set the appropriate scale.
8. Place a data point in the view to place the linked excel sheet.
There are three ways to import the source files as pictures, embedded files, or linked files.
– A picture is a screen capture of the application. The image is static and is not updated when changes are made to the source.
– An embedded file is imported and saved into the DGN file. Edits made to the embedded file are saved in the DGN file.
– A linked file is imported to the DGN file but still resides in the original application. Edits are made to the source file and can be updated using the MicroStation Update link tool.
When viewing a linked or embedded file in MicroStation it may appear shaded. This is due to the source application, Excel, being currently opened and its worksheet edited (see screen shot below). Once the source application is saved and closed the shading will not be seen in MicroStation
After changes are made to the source application the data stored in the DGN file will need updating. OLE data can be updated from the MicroStation pulldown menu Edit>Update Links
Okay, I knew all this. My question is, how do you perform the same OLE actions from within VBA? I haven’t found anyone with a clean solution. I have a pretty dirty solution that requires lots of user interaction and has lots of opportunities for operator error. I want to eliminate those possibilities. (Yes, I’ve tried recording a macro.)
There is no clean solution for this in MicroStation as there isn’t anything available in the API.
The best advice I can give you for your question is go to this link…