1

I'm trying to automate the complete creation of a schematic template with ArcObjects SDK for Java (10.2).

I've managed to create the GDB, the schematic dataset and the schematic diagram class (template).

Then, I created a schematic element class associated with a feature class taken from the same GDB, which works.

I would like to share a field "NAME" between the feature class and the schematic element class, in order to label the nodes of a schematic diagram.

So, I tried that:

...
 ISchematicElementClass nodeSchematicElementClass = schematicDataset.createSchematicElementClass("NODE", esriSchematicElementType.esriSchematicNodeType);
 nodeSchematicElementClass.setSchematicDataSourceByRef(schematicDataSource);
 nodeSchematicElementClass.alterAssociatedObjectClass(schematicDataSource, nodeFeatureClass.getObjectClassID());
 nodeSchematicElementClass.setGeometryType(esriGeometryType.esriGeometryPoint);
 nodeSchematicElementClass.setExternalQueryEvaluationMode(esriSchematicExternalQueryEvaluationMode.esriSchematicQueryBuildEvaluation);
 nodeSchematicElementClass.setQueryString("SELECT * FROM NODE");
 schematicDiagramClass.associateSchematicElementClass(nodeSchematicElementClass);

 UID associatedFieldUID = new UID();
 associatedFieldUID.setValue("{7DE3A19D-32D0-41CD-B896-37CA3AFBD88A}"); // taken from the file ...\Desktop10.2\bin\configuration\CLSID\esri.clsid.ecfg
 ISchematicAttribute schematicAttribute = nodeSchematicElementClass.createSchematicAttribute("NAME", associatedFieldUID);

then I get the following ArcObjects error in the last line:

AutomationException: 0x80040a28 - Additional field can't be added : NAME in 'Esri Schematics'

I get the same error with any other field name.

Does anybody have a solution? Am I doing something wrong with my attribute field association?

  • The Schematics extension is quite a specialized subject I would suggest you post this question on the new ESRI geoNet forum, you are more likely to get a response from an expert? – Hornbydd Sep 3 '14 at 9:03
  • Here the link of this question on ESRI GeoNet: geonet.esri.com/message/401408 – superrache Sep 12 '14 at 9:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.