Dear VBA experts,
I am trying to determine a way by which I would know what references a user have selected in a References dialog box as shown in the picture below. Any code or syntax that will help me get the list of selected references in the dialog box would be very helpful.
Thank you so much,
Sincerely,
Rabi
Rabi: I am trying to determine what references a user has selected in a References dialog …
I am trying to determine what references a user has selected in a References dialog …
Unfortunately VBA's UserForms, and the API that goes with them, know nothing about MicroStation dialogs. There's no way for VBA to interrogate a non-VBA dialog.
MDL provides a possibility, but that's not what you're asking.
Regards, Jon Summers LA Solutions
Dear Jon,
I thought so. I did implemented another way to reattach the missing references at the moment. Well I will see if I can get more things done in C#. Thank you for your help.
Rabi: I will see if I can get more things done in C# …
I will see if I can get more things done in C# …
Changing language to a .NET product won't necessarily help. You need MDL or C++ that can handle the pointers and callbacks used to peer inside a MicroStation dialog.
Jon is right. Just changing to .NET you are still going to use the same COM api that is in VBA and in fact you will probably end up with more problems. What I have done in the past is to use an application running in MicroStation that allows me to use the CExpression processor in VBA to get to the list box information. Attached is some code that will get the reference file list box.
HTH,
Mark Anderson [Bentley]
mark anderson [Bentley]
Visit me at https://communities.bentley.com/communities/other_communities/bentley_innovation/default.aspx
Thank you Mark. I will look at it.
Regards,
Mark I can't work out how to use this ... if its an mdl can you compile it for xm?
can you get it to write an txt file say to c:\temp\refout.txt ...
Lorys
Started msnt work 1990 - Retired Nov 2022 ( oh boy am I old )
But was long time user V8iss10 (8.11.09.919) dabbler CE update 16 (10.16.00.80)
MicroStation user since 1990 Melbourne Australia.click link to PM me