Hi,I am trying to access the grid properties (grid lines, coordinates, orientation, etc.) of a OpenBuildings Designer model from a c# addin. I can see from the XML export that the used EC schema should be StructuralModelingComponents.06.00.When I ask the DgnECManager for discover-able schemas, it doesn´t include that schema though.
List<string> schemas = Enumerable.ToList(manager.DiscoverSchemas(Session.Instance.GetActiveDgnFile(), ReferencedModelScopeOption.All, true));
I also tried
FindInstancesScope scope = FindInstancesScope.CreateScope(Session.Instance.GetActiveDgnFile(), new FindInstancesScopeOption(DgnECHostType.All, true)); IECSchema schema = manager.LocateSchemaInScope(scope, "StructuralModelingComponents", 6, 0, SchemaMatchType.Latest);
The IntegratedStructuralModel schema wouldn´t work either.
Are grid lines somehow not part of the model or should I look in a different schema?
Might there be a different way to access grids?
See also https://www.itwinjs.org/bis/domains/processphysical.ecschema/#ismcartesiangrid for reference.
Tilman Reinhardt said: the used EC schema should be StructuralModelingComponents.06.00
Is that schema present on your development computer? Look in folder ..\MicroStation\ECSchemas and its sub-folders.
..\MicroStation\ECSchemas
Here's an example that reads element properties, including EC Schema props. It's written in C++ but you should be able to translate to C# since most classes and their methods have similar names.
Regards, Jon Summers LA Solutions
Hi Jon,
it is not present in ..\AECOsimBuildingDesigner\ECSchemas,
but it is in ..\AECOsimBuildingDesigner\Assemblies\Schemas
Tried to copy the schema, but that didn´t seem to help.
Also I think I am using the approach you lined out, actually put together mostly from your code snippets ;)
Best,Tilman
Tilman Reinhardt said:[The schema] is in ..\AECOsimBuildingDesigner\Assemblies\Schemas
LocateSchemaInScope() is one of several methods to find a schema. I don't know which one is appropriate to find a schema in a folder unknown to MicroStation.
LocateSchemaInScope()
Post a new question in this Forum.