I can update tag values from Excel to MicroStation, but only by a single selection. I'm looking for assistance in vba coding to be able to update by selection set from Excel to Microstation. I'm still working with my IT Department for purchasing Jon's FlexiTable, so for the time being, I'm trying to move forward with what I have. Any assistance will be greatly appreciated.
0383.TagTesting.zip
Dustin Hunt said:I can update tag values from Excel to MicroStation, but only by a single selection
It's unclear what you mean by 'only by a single selection'. Are you selecting something in Excel, or something in MicroStation?
If you want to copy data from Excel to MicroStation, first figure out how to extract data from your Excel worksheet. Excel VBA ranges are invaluable.
While a little bit long in the tooth, these books about Excel VBA are instructive.
When you come to apply those data to DGN elements, then you should use ModelReference.Scan to find the elements. Once found, you have to match the Excel data with the DGN object you want to update.
ModelReference.Scan
Regards, Jon Summers LA Solutions
Thanks for the info Jon. I purchased "Learning MircoStation VBA", by Jerry Winters and "Excel VBA Programming for dummies", by Michael Alexander and John Walkenbach. In the "Learning MicroStation VBA" book, it has VBA code that reads your tags and stores them in an Excel spreadsheet. I was able to add the code that specified a specific Excel spreadsheet to export the tag info to. It also has code that will export the tag info from Excel back to MicroStation and update the tag values based on what's shown in excel. You highlight one cell to update one tag at a time. You can't update based on a selection in Excel. It states in the book this can be done, but leaves that to the reader. I've not been able to locate an example to go by that exports data from excel to MicroStation. I've gone thru hours and hours of Excel tutorials online but nothing that is what I'm looking for. I'll figure it out sometime...… Thanks again for the info.