Select to view content in your preferred language

Need workaround for ArcFM extension

10128
12
Jump to solution
02-27-2015 11:59 AM
StevenHirsch
New Contributor

I am using ArcGIS RT 10.1 in Java to work with a customer geodatabase.  After receiving an update of the data, I started seeing Automation execptions on any attempt at opening a feature class:

AutomationException: 0x80041352 - Unable to create object class extension COM component [MyClassName] in 'Esri GeoDatabase' at

com.esri.arcgis.geodatabase.Workspace.openFeatureClass(Unknown Source)

I finally traced this down to the data having come from the ArcFM environment (apparently there are extension classes associated that we do not have access to).  After a bit more digging I found a way to clear the extensions by doing this for every feature class:

        IFeatureWorkspaceSchemaEdit edit = (IFeatureWorkspaceSchemaEdit) featureWorkspace;
        edit.alterClassExtensionCLSID(feature_class_name,null,null);

        UID id = new UID();
        id.setValue(com.esri.arcgis.geodatabase.Feature.class);
        edit.alterInstanceCLSID(feature_class_name,id);

This gets me about 98% of the way there.  I can open the feature class, traverse the network, get my hands on shapes, etc.  However, now I cannot get from a network EID directly back to a shape.  Any attempt at calling:

iGeometricNetwork.getGeometryForEdgeEID(eid);

or

iGeometricNetwork.getGeometryForJunctionEID(eid);

throws this exception:

AutomationException: 0x80004005 - Unspecified error

Clearly there is a connection broken between the geometric network and the feature class.  I'm guessing I need to be doing something slightly different in the schema edit, but the documentation is not forthcoming on the details.  Can anyone give me the magic incantation?

0 Kudos
1 Solution

Accepted Solutions
ChrisKushnir
New Contributor III

... so I think your on the right track.

1) Get the existing CLSID for the class

2) Null out the class extension.

3) Map the old ArcFM CLSID to the new ArcGIS one:

     mmGeoDatabase.MMArcFMObject -> esriGeoDatabase.Object

     [basically: mmGeoDatabase.MMArcFM* -> esriGeoDatabase.*]

     mmGeoDatabase.MMArcFMAnnotationFeature Class -> esriGeoDatabase.Feature

      mmGeoDatabase.MMArcFMDimensionFeature Class -> esriGeoDatabase.???  

View solution in original post

0 Kudos
12 Replies
StevenHirsch
New Contributor

Bump...  Is there really no one on this forum who can help?  I think if someone can provide me with the ESRI default values for ClassExtensionCLSID and InstanceCLSID I'd be set.  Unfortunately, even after considerable digging through the documentation I cannot find a method to query either of those attributes.

0 Kudos
StevenHirsch
New Contributor

Bump again.  I suspect I need to focus this question a bit better.  Let me try again:

If I've opened a feature class that participates in a geometry network, how can I obtain the extension CLSID for that class?  I've come across the 'IObjectClassDescription' interface that appears capable of telling me what the extension class id is, but cannot find any way to obtain an instance that implements this interface.   Opening the feature class gets me an IFeatureClassProxy and I can find no clear path from there to an ability to query the extension class information (this is an all-too-familiar problem with the Java API, but that's a whole separate frustration...)

My reasoning relative to the original problem:  If I can find out what extension class is used to manage objects in a conventional geometric network, I'm hoping I can force the features from the ArcFM data set back to something that ArcObjects can properly resolve.

0 Kudos
ChrisKushnir
New Contributor III

IClass Interface

EXTCLSID - the extension class ID

Extension - the instance (returns object, need to cast to appropriate interface)

ExtensionProperties - properties to alter the extension behaviour, specific to the instance

IClassSchemaEdit and IClassSchemaEdit2 - alter the class extension for a given table.

I think your original question was clear.  The concern is you've done the obvious thing, change the class extension, and are still having issues.  That's non-standard enough that I'm not sure anyone would have tried that before.

If you look at the MM class extensions you se they do have edge and junction specific ones which suggests there may be deeper ties than just the class extension:

So, you've nulled out the class extension and changes the class type from the ArcFM one to the appropriate ArcGIS one.  Did you set it to the correct ArcGIS one i.e. Object, Feature, Edge, or Junction ?  From your original post it looks like you set to Feature when you may need to set to either Simple or ComplexEdgeFeature.

0 Kudos
ChrisKushnir
New Contributor III

... so I think your on the right track.

1) Get the existing CLSID for the class

2) Null out the class extension.

3) Map the old ArcFM CLSID to the new ArcGIS one:

     mmGeoDatabase.MMArcFMObject -> esriGeoDatabase.Object

     [basically: mmGeoDatabase.MMArcFM* -> esriGeoDatabase.*]

     mmGeoDatabase.MMArcFMAnnotationFeature Class -> esriGeoDatabase.Feature

      mmGeoDatabase.MMArcFMDimensionFeature Class -> esriGeoDatabase.???  

0 Kudos
StevenHirsch
New Contributor

Setting the instance CLSID at the feature class level to ComplexEdgeFeature or SimpleJunctionFeature (depending on the class's broad category) gets me a lot further and most of the attempts at going from network eid to geometry are working.  The operative word being "most".  I'm still seeing a healthy number of these complaints:

AutomationException: 0x80041352 - Unable to create object class extension COM component [FaultIndicator] in 'Esri GeoDatabase'

Can a single feature class have both SimpleEdgeFeatures and ComplexEdgeFeatures mixed?  I can see where trying to treat a simple edge as a complex edge would be problematic.  How would I edit the CLSID for individual instance in the case where I can't open the feature class without a blanket modification to begin with.  Perhaps I'm confused here, so please bear with me.

Also, casting the IFeatureClassProxy object to IClass and calling getEXTCLSID() yields a null result.

0 Kudos
ChrisKushnir
New Contributor III

The 1352 error, to me, suggests that maybe you've only converted some of the classes in the network from ArcFM to ArcGIS i.e. you converted the conductor but not the Fault Indicator ?  You may have to map all features in the network from their ArcFM class to their ArcGIS counterpart.

When you create/convert the feature class to be used in a geometric network you specify if it's simple _or_ complex.  All rows in the given feature class are then of the specified type e.g. can't create a simple edge feature class and have some of its rows behave as complex.  As such, it's important that you map the ArcFM class to the correct ArcGIS one i.e. simple to simple, complex to complex.

... I haven't done this, but have you tried using the ArcCatalog network dataset context menu option "ArcFM Solution Object Converter" and selecting "Convert to use ESRI Objects" ?  I've only used it the other way, convert ESRI to ArcFM, but I believe it's supposed to do exactly what you are trying to do ... sorry, reread original post, seems issue is you don't have ArcFM installed on your machine.  Can you get the client to do this on a copy of the DB and have them provide that to you ?

I'm afraid I've only used C/C++ and C# arcobjects API's, not Java.  It looks like IFeatureClassProxy is Java only.  I assume it's analogous to IFeatureClass.

I'm not sure why getEXTCLSID would return null unless there isn't actually an extension registered with the class.  Check the SDE.GDB_OBJECTCLASSES table to see what the CLSID and EXTCLSID's are so you know if it's your code or not.  I would not suggest editing the values directly in that table ... but then again it might work.

0 Kudos
ChrisKushnir
New Contributor III

For ArcGIS 10 the location of the CLSID config info has moved.

See: How-To - ArcFM - How to Get Object Type GUIDs i... | exchange

0 Kudos
StevenHirsch
New Contributor

Thanks for the pointer.  Wouldn't I need access to an ESRI server for that query?  Or, is there a means to extract that information from a file geodatabase?

0 Kudos
ChrisKushnir
New Contributor III

Yes, you would need access to the database.  I usually have full access to a development copy of a clients database.  My current client uses Oracle, so I use sqldeveloper to do these kind of queries.  SQL Server should be similar.  File GDB, not sure, but obviously you'd have to run the query via AO e.g. qd = IFeatureWorkspace.CreateQueryDef, set qd properties, then qd.Evaluate to get the results cursor.

0 Kudos