Win10, MicroStation CONNECT Update 10, VS 2017 Communities, C# .NET AddIn
Hi there,
I am an oldfashioned MicroStation programmer, and now busy with a small pilot to try some functionality in Mst CONNECT C# .NET AddIn.
Now, I seem to be unable to place a linestring having a next graphicgroup. I am not able to find out how to set the graphicgroup in the element to
be created.
I have found:
Bentley.MstnPlatformNET.Settings.CurrentGraphicGroup += 1;
But for example my Bentley.DgnPlatformNET.LineStringElement that I created does not seem to have some property GraphicGroup or so.
How to set it, in the element to be Added? Somebody please?
Related, I have a complaint about documentation, as for .NET. I have:
DgnPlatformNet.chm
MicroStationAPI.chm (for usage through Interop)
MSTNPlatformNET.chm
They certainly add value, in that you can search them and sometimes find something. and together with having luck in searching examples,
sometimes there is joy.
But they are basically some auto generated stuff lacking many details. Basically you see the same things that you see in Intellisence in Visual Studio.
without too much of an explanation.
For example I do not see for "OnDataButton" what the return value does;
some example says "return false" so I return false. But what is it for, what happens if I return true, these kind of explanations are lacking
(this is just an example, I do not need this precise explanation for now).
For example I do not see, from documentation, how to access "Fence", to get it´s contents. From some old stuff I had, yes I get something:
public static Bentley.Interop.MicroStationDGN.Application s_App;
s_App = (Bentley.Interop.MicroStationDGN.Application)System.Runtime.InteropServices.Marshal.GetActiveObject(
"MicroStationDGN.Application");
s_App.ActiveDesignFile.Fence
ElementEnumerator elmsEnumerator = Cinca.s_App.ActiveDesignFile.Fence.GetContents();
and ok it works,
but if it were for documentation, I am nowhere. Some more description, a mention of how to be able to access the method or property, a small
example would be welcome.
(The MSTNPlatformNET.chm, every now and then, has slightly some more text than DgnPlatformNET.chm, sometimes it has "Remarks").
best regards, Jan Willem de Pater