Is there a way to get the Entire Sheet Index to a list box using Visual Studio? I can see if it is read only
You've missed some vital information...
Bob Thorburn said:I can see if it is read only
Is there something else you intended to add ... there's no question there?
Regards, Jon Summers LA Solutions
Sorry guys, In Openroads Designer 10.08 using VB.Net but a response for C++ is okay too. this is the only reference I can find
I tried DragDrop but all I get is the drawing name and a bunch of trash.
<bsicliproot MSTOPWINDOWID="3474980866"><datanode formatName="MicroStation DgnEC data"><DgnECInstanceDataList><DgnECInstanceData><ECQuery xmlns="http://www.bentley.com/schemas/Bentley.ECQuery.1.0" type="Bentley.EC.Persistence.Query.ECQuery,Bentley.EC.Persistence.2.0"><SearchClass ecSchema="BentleyDesignLinksPresentation" ecClass="ModelLinkProperties" isPolymorphic="true"/><WhereCriteria type="Bentley.EC.Persistence.Query.WhereCriteria,Bentley.EC.Persistence.2.0"><WhereCriterion type="Bentley.EC.Persistence.Query.WhereCriteria,Bentley.EC.Persistence.2.0"/><Expression type="Bentley.EC.Persistence.Query.ECInstanceIdExpression,Bentley.EC.Persistence.2.0"><WhereCriterion type="Bentley.EC.Persistence.Query.ECInstanceIdExpression,Bentley.EC.Persistence.2.0"/><LeftSideObject><BuiltInType xmlns="http://www.bentley.com/schemas/Bentley.ECSerializable.1.0" typeCode="String">ECInstanceID</BuiltInType></LeftSideObject><RelationalOperator xmlns="">EQ</RelationalOperator><RightSideObject><BuiltInType xmlns="http://www.bentley.com/schemas/Bentley.ECSerializable.1.0" typeCode="String">#00010:EC040000000D:1517020000</BuiltInType></RightSideObject></Expression></WhereCriteria></ECQuery><DgnMoniker><![CDATA[<MSDocMoniker><FileName>C:\Worksets\FDOT\12345678900.dgnws</FileName><FullPath>C:\Worksets\FDOT\12345678900.dgnws</FullPath></MSDocMoniker>]]></DgnMoniker></DgnECInstanceData></DgnECInstanceDataList></datanode></bsicliproot>
HI Bob Thorburn,
The MicroStation SDK provides (1) example (..\Miscellaneous\validateSheetLinks) that shows how to extract workset SheetLink information stored within a DgnLinkTree, But at this time (no public API) we do not have an example or simplified API showing full Create, Read, Update, Delete (CRUD) operations.
I filed Enhancement 1099748 to publish a simplified sheet link management API that wraps and calls the underlying DgnLinkTree API.
Hopefully since you mention C++ being an option in your solution, the validateSheetLinks example will help you to move forward.
Bob Thorburn said:Bentley.Internal.MstnPlatformNET.SessionSymbols
SessionSymbols is not documented in MstnPlatformNet help, probably because it's not public but internal.
ListBox1.Items.Add expects an object, or array of objects. You appear to have passed it a single Boolean value IsSheetIndexReadOnly.
Frankly, if you want to work with unpublished code internal to Bentley Systems, then this Programming Forum is not the best place to ask for help. You need help directly from the horse's mouth.
Bob Thorburn said:In Openroads Designer 10.08
I assume you mean OpenRoads Designer CE - 2020 Release 2 Update 8, build 10.08.01.33? Please, be precise. I do not like the way how civil products are named, but the names are unique, as well as complete build number.
This version of ORD is built on top of PowerPlatform CE U13, which is important when discussing API related to MicroStation.
Bob Thorburn said:using VB.Net but a response for C++ is okay too
It's a bit strange span of technologies ;-) VB.NET is not developed (on hold) weird language, on the other hand, C++ is "full power" tool, but seriously complex. But to write MicroStation apps code, both native and managed APIs (C# is much much better of course) are very useful.
Bob Thorburn said:ListBox1.Items.Add(Bentley.Internal.MstnPlatformNET.SessionSymbols.IsSheetIndexReadOnly
I am not sure what is expected this code will do (Jon wrote good explanation).
Because you use ListBox, I assume you use WinForms. What I remember (but it's quite long time and in C#), for ListBox it's recommended to create a proper collection and to set it as ListBox DataSource.
Bob Thorburn said:I tried DragDrop but all I get is the drawing name and a bunch of trash.
Seriously? Even when XML data are not big help in the discussion, to say that EC data list is a bunch of trash is to throw out one from the most crucial technologies in Bentley world (and it's not about MicroStation only, but also iModelJS and iTwins). To be familiar (at least a bit) with EC data is "must to know" today.
Bob Thorburn said:Is there a way to get the Entire Sheet Index
The example mentioned by Bob provides I think a lot of useful information how to obtain the data in C++.
I think quite the same approach (to load workset file at background) can be used in NET API also. The only (but important) difference is that there is no DgnLinkManager available. But the link data can be obtained as EC data using EC Query and interpreted using standard EC API (I did it not with sheet index, but URL links attached to elements, which are very similar). The only thing I am not sure about is whether it's possible to use EC Query with a file loaded at background (not active opened file).
Labyrinth Technology | dev.notes() | cad.point
Thanks you all for the input, good information
I would like to extend and clarify my answer: It's possible to obtain information about Sheet Index tree and its content using EC query and no specialized API is necessary. It requires construct the tree from obtained EC data, but it's not extremely complicated, especially when e.g. simple list of sheets in the index is required.
Jan Šlegr said:It's possible to obtain information about Sheet Index tree and its content using EC query and no specialized API is necessary. It requires construct the tree from obtained EC data, but it's not extremely complicated
That's good to know! Would you care to elaborate?
Jon Summers said:Would you care to elaborate?
Hmm ... I did not, sorry.
I am open to share my knowledge, but it does not mean I will share everything I know for free, especially when it's based on a pyramid of complex knowledge and substantial amount of invested time, both my free and paid by other companies through projects I worked on.