Hi,
I need to create ECQuery using classes from SmartFeaturesSchema.
My problem is that this schema is not stored in DGN file and is in not delivered with MicroStation installation as extrinsic too, but seems to be generated dynamically in memory when relevant element is queried.
It leads to Catch-22 situation: To find such element(s), I need the schema to be available to add classes to q query, but I am not able to obtain the schema until I have element described by this schema.
What is recommended way how to obtain this schema?
With regards,
Jan
The problem is solved now :-)
I used LocateDeliveredSchema() method that does not return the required schema. But method LocateSchemaInScope() returns the schema correctly, even when it is not persisted.
Regards,
Bentley Accredited Developer: iTwin Platform - AssociateLabyrinth Technology | dev.notes() | cad.point
Answer Verified By: Jan Šlegr
Jan Šlegr said:SmartFeaturesSchema is not stored in DGN file and is not delivered with MicroStation installation as extrinsic, but seems to be generated dynamically in memory when relevant element is queried.
Jan Šlegr said:method LocateSchemaInScope() returns the schema correctly
I'm pleased to read that you solved your problem overnight. But where is that schema stored? Is it even possible to examine the schema?
Regards, Jon Summers LA Solutions
Jon Summers said:But where is that schema stored?
Nowhere, it's kept in memory when it's required.
My assumption why it's not delivered with MicroStation as extrinsic static schema is that it's still under construction and development, so it's less risky to generate it on demand in memory.
My experience is that every schema, even when describing static structures, requires long time (even years) to be stabilized and used as public one. During this period, it's not good idea to provide it to anybody external.
Or maybe I am wrong, and this schema is treated as internal, not to be public ;-)
Jon Summers said:Is it even possible to examine the schema?
As any other schema, during the debug at least.
I think the code that serializes the schema to xml file should be quite simple, but so far I do not see any reason to examine the schema fully. In this particular case, without to see how exactly and in what situation it's used, I am not sure it brings me any benefit (even with my knowledge of EC world ;-)