Hello,
Question with moving old V8i MicroStation Basic to Connect Edition VBA (or macro recorder).
Starting from a DGN that has a rectangular matrix (mesh/ grid?) over the map of the country. In each case (box) of the DGN matrix we have a text element (e.g. 511S1).
The VBA should allow to manually select the text in one box (click), save that text in a variable and then attach the corresponding raster ref file which is the topographical Map matching that specific box.
So the macro should in this example attach raster ref "511S1.tif" (not intercative)., which is the text string captured by the selection + the ".tif" string.
I searched a lot but can not find the trick to save that text content in a var in VBA.
Thank you very very much in advance for your help,
Best regards,
Nicolas Tobbackx
Hi Nicolas,
NicolasT said:The VBA should allow to manually select the text in one box (click)
if the grid looks ike a regular matrix and both borders and texts can be easily indetified (a combination of level / color is not shared with any other element), it's even not necessary to select the text. Macro can be written in such way any click into a particular grid would be enough. But of course it requires some extra code to find surrounding grid borders and text inside. When grid is XY oriented (not rotated or slanted), it's not very complicated.
With regards,
Jan
Bentley Accredited Developer: iTwin Platform - AssociateLabyrinth Technology | dev.notes() | cad.point
Thank you Jan, I figured it out meanwhile. Many thanks for your contribution. : best regards, Nico