HI,
Anybody please help me with a piece of code to close the Alert Box using C# (Apply Yes Button)?
Thanks,
Vinoth
Thanks Jon. Let me try your suggestion.
Vinoth Joseph
ATKINS
Bangalore, India
Yes, Jan. Developing an external application.
with regards,
vinoth
Hi Vinoth,
I guess it's not important for the discussion (but you never know ;-), but to ensure I understand your code correctly: You are developing external application, not MicroStation addin?
With regards,
Jan
Bentley Accredited Developer: iTwin Platform - AssociateLabyrinth Technology | dev.notes() | cad.point
Yes, Jon. exactly.
and in another case, if the file is write protected getting same Alert.
Vinoth Joseph said:_ust.OpenDesignFile(@pathandfile, true);
So the problem is that, even though you're requesting that the file be opened read-only, MicroStation still prompts you to confirm?
Vinoth Joseph said:Yes, Jon. exactly.
I figured out how to do this with C/C++ in this article.
The code twiddles MDL global variable mgds_modes.always_read_only. You can get at MDL variables using a C expression, which in VBA is the SetCExpressionValue Method.
mgds_modes.always_read_only
SetCExpressionValue Method
Try something like:
SetCExpression "mgds_modes.always_read_only", 1 ' or zero
Regards, Jon Summers LA Solutions
Jon, I'm using Using C#.
using BCOM = Bentley.Interop.MicroStationDGN;
BCOM.Application _ust = new BCOM.ApplicationClass();
BCOM.DesignFile dff = _ust.OpenDesignFile(@pathandfile, true);
How are you opening the file? If you're writing C# for MicroStation V8i then you are using VBA via an InterOp. Please show some code.