using OpenRail Designer CE - 2021 Release 2 - Version 10.10.21.04 (but I guess the version is not crucial in this case ;-)
My question is similar to Stanislav's question in Developers and Programming forum (where not answered).
When SpeedTable is obtained from Alignment using Alignment.ActiveSpeedTable property, the functionality is limited: As asked in the linked discussion, e.g. for speed schema (DesignSpeed class), it is not possible to receive its name, which makes the data useless, because DesignSpeed class publishes only start and end speed, but no information for what speed schema it is defined.
I found that in parallel to Bentley.CifNET.GeometryModel.SDK.SpeedTable class, another SpeedTable class, with better functionality, exists in Bentley.CifNET.GeometryModel namespace. I assume it is a part of implementation of Speed Table dialog, but it is not "public SDK".
Is there a way to instantiate this "better and more complex" class for selected alignment? Despite of the same name and similar functionality, they are "different animals" ;-) because SpeedTable from SDK is inherited from ModelEntity, whereas internal SpeedTable inherits NamedEntityReferenced and IStationPoints.
Of course, if simpler / alternative answer exists for Stanislav's question how to obtain speed schema name for specific DesignSpeed class (e.g. to access EC data directly), it would be great :-)
I played a bit (a lot of "a bit", consuming a lot of time ;-) and I was able to solve the problem partially: For any cant table, I am able to obtain speed profile name (the name of a column in speed table) that was used to calculate the cant table.
One question still remains: How to find the column names in Speed table? It is not necessary to be obtained directly, e.g. column (speed schema) would be enough. With it, SpeedTable class in public SDK is useless, because it publishes SpeedSection(s) and a collection of DesignSpeed for every speed section, but it cannot be analyzed anyhow, to what scheme (like V100, V130...) the speed belongs.
Even simple List<string>, sorted in the same order as DesignSpeed colection, would help.
Bentley Accredited Developer: iTwin Platform - AssociateLabyrinth Technology | dev.notes() | cad.point
Hi Henrique Nacamae,
Can you or one of your development colleagues provide any additional insights on this issue?
Thank you in advance,Bob
thanks for the reaction.
Because I know (I was able to analyze) the speed table is attached as nongraphical element in the file, but not to the element itself, maybe to know (which sounds like not related question ;-) how to create ECQuery in C# for data stored as Type 66 (Application data), would be enoug.
I assume it would be possible to jump through EC relationships to find all necessary data. But how to start with Type 66 is not clear to me (is it File scope? or something different)...
To be more precise, the element looks like this in ORLD:
I solved the problem myself :-)
Now, using EC queries I am able to find EC data, representing SpeedTable, belonging to specific alignment (identified by element id). What I need - the speed schema name (column name in GUI) - is available there ... just a couple of hops through relationship classes ;-)
I hope the stored index is equal to an order, in which SpeedTable data is enumerated in API, so other information can be obtained through API. But in fact, when not, no problem, because I have an idea how complete table can be reconstructed using EC queries.
Answer Verified By: Jan Šlegr