Hi,
I want to set an EA Property like 'ShowConstraints' (EA.DiagramObject) in C# dynamically / by reflection.
For datatypes 'long' or 'string' it works well by e.g.:
diaObj.GetType().InvokeMember("ElementDisplayMode", System.Reflection.BindingFlags.SetProperty, null, diaObj, new object[] { 2 });
On the first view, it looks as if 'true 'isn't correctly translated to the COM 'true'. I tried 1, 255, 65535, -1, ... - no success.
For datatype 'boolean', I can set it only to 'false' but never to 'true'. I tried a lot - no success. According to the documentation, it should work for COM interop. Yes, setting to 'false', 'reading' works well.
One of my tries:
diaObj.GetType().InvokeMember("ShowNotes", System.Reflection.BindingFlags.PutRefDispProperty, null, diaObj, new object[] { (true });
Any idea, experiences?
Thanks for your help.
Helmut