Working with ECSchema from reference attachments.

We are in MicroStation Connect (latest) working with .NET api. (flexible)

We are trying to pull an ecschema from a reference model that is attached.  We need to use the reference model in case the schema are not the same.  We work through the DgnECManager API.  We have been successful geting the schema names back using the DiscoverSchema methods.  Our problem is when we try to use the LocateSchema calls we get a null back when we try to get the OpenPlant_3D (but it does work for the OpenPlant schema).  Here is some of the calls we have been trying:

 


IEnumerable<string> currSchemaNames3 = dgnMgr.DiscoverSchemasForModel(currDgnModel, DPN.DgnEC.ReferencedModelScopeOption.None, false);

var dgnFileOpt = new DPN.DgnEC.FindInstancesScopeOption(DPN.DgnEC.DgnECHostType.Element |DPN.DgnEC.DgnECHostType.File, false);

var dgnFileScope = DPN.DgnEC.FindInstancesScope.CreateScope(currDgnFile, dgnFileOpt);

ECOS.IECSchema schemaStrict = dgnMgr.LocateSchemaInScope(dgnFileScope, "OpenPlant_3D", 1, 7, ECOS.SchemaMatchType.Exact);

ECOS.IECSchema schemaLoose = dgnMgr.LocateSchemaInScope(dgnFileScope, "OpenPlant_3D", 1, 7, ECOS.SchemaMatchType.LatestCompatible);

ECOS.IECSchema baseSchema = dgnMgr.LocateSchemaInScope(dgnFileScope, "OpenPlant", 1, 7, ECOS.SchemaMatchType.LatestCompatible);

ECOS.IECSchema modelSchema = dgnMgr.LocateSchema(currDgnConn,"OpenPlant_3D", 1, 7, ECOS.SchemaMatchType.LatestCompatible);

If we could get more documentation on these calls it would help :) We have been poking at various options here.

thanks,

mark anderson