<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How to set spatial reference to a schematic diagram class with Arcobjects? in ArcObjects SDK Questions</title>
    <link>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-set-spatial-reference-to-a-schematic/m-p/536459#M14532</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can get &lt;A href="http://resources.esri.com/help/9.3/arcgisengine/ArcObjects/esriSchematic/ISchematicElementClass_SchematicDataset.htm"&gt;SchematicDataset&lt;/A&gt; and then alter spatial reference&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 27 Jan 2015 14:28:23 GMT</pubDate>
    <dc:creator>nicogis</dc:creator>
    <dc:date>2015-01-27T14:28:23Z</dc:date>
    <item>
      <title>How to set spatial reference to a schematic diagram class with Arcobjects?</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-set-spatial-reference-to-a-schematic/m-p/536454#M14527</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I used ArcObjects for .NET to create a schematic dataset, then a schematic diagram class (aka "schematic template" in the UI) wherein I load feature classes.&lt;/P&gt;&lt;P&gt;To do that, I followed the sample: "Create A Standard Builder Schematic Diagram Class From Scratch".&lt;/P&gt;&lt;P&gt;But when I generate diagrams, I get from ArcMap a "missing spatial reference" warning.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So how to set the spatial reference?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In ArcMap, it's possible in the properties of the schematic template. But using ArcObjects, I can't find an interface of the class SchematicDiagramClass to set the ISpatialReference.&lt;/P&gt;&lt;P&gt;I would appreciate any help on that.&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Jan 2015 10:35:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-set-spatial-reference-to-a-schematic/m-p/536454#M14527</guid>
      <dc:creator>KevinLECOCQ</dc:creator>
      <dc:date>2015-01-27T10:35:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to set spatial reference to a schematic diagram class with Arcobjects?</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-set-spatial-reference-to-a-schematic/m-p/536455#M14528</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;SchematicDiagramClass implements IGeoDataset &lt;A href="http://resources.arcgis.com/en/help/arcobjects-net/componenthelp/index.html#//003s000002qr000000" title="http://resources.arcgis.com/en/help/arcobjects-net/componenthelp/index.html#//003s000002qr000000"&gt;ArcObjects Help for .NET developers&lt;/A&gt;&amp;nbsp; that has SpatialReference &lt;A href="http://resources.arcgis.com/en/help/arcobjects-net/componenthelp/index.html#//0025000003m6000000" title="http://resources.arcgis.com/en/help/arcobjects-net/componenthelp/index.html#//0025000003m6000000"&gt;ArcObjects Help for .NET developers&lt;/A&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Jan 2015 10:39:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-set-spatial-reference-to-a-schematic/m-p/536455#M14528</guid>
      <dc:creator>nicogis</dc:creator>
      <dc:date>2015-01-27T10:39:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to set spatial reference to a schematic diagram class with Arcobjects?</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-set-spatial-reference-to-a-schematic/m-p/536456#M14529</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, but the spatial reference property of IGeoDataset is read-only: &lt;A href="http://resources.arcgis.com/en/help/arcobjects-net/componenthelp/index.html#//0025000003n0000000"&gt;http://resources.arcgis.com/en/help/arcobjects-net/componenthelp/index.html#//0025000003n0000000&lt;/A&gt;&lt;/P&gt;&lt;P&gt;There is only a "get" to the spatial reference object.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Jan 2015 10:42:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-set-spatial-reference-to-a-schematic/m-p/536456#M14529</guid>
      <dc:creator>KevinLECOCQ</dc:creator>
      <dc:date>2015-01-27T10:42:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to set spatial reference to a schematic diagram class with Arcobjects?</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-set-spatial-reference-to-a-schematic/m-p/536457#M14530</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;see IGeoDatasetSchemaEdit &lt;A href="http://resources.arcgis.com/en/help/arcobjects-net/componenthelp/index.html#//0025000003mn000000" title="http://resources.arcgis.com/en/help/arcobjects-net/componenthelp/index.html#//0025000003mn000000"&gt;ArcObjects Help for .NET developers&lt;/A&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Jan 2015 10:58:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-set-spatial-reference-to-a-schematic/m-p/536457#M14530</guid>
      <dc:creator>nicogis</dc:creator>
      <dc:date>2015-01-27T10:58:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to set spatial reference to a schematic diagram class with Arcobjects?</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-set-spatial-reference-to-a-schematic/m-p/536458#M14531</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It works casting the ISchematicDiagramClass object to this IGeoDatasetSchemaEdit, then using AlterSpatialReference, thanks.&lt;/P&gt;&lt;P&gt;Now I still have a 'missing spatial reference' error adding a diagram to a map, because the schematic element classes still don't have spatial reference. I create these object as ISchematicElementClass. What interface could I use to set their spatial reference?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Jan 2015 13:54:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-set-spatial-reference-to-a-schematic/m-p/536458#M14531</guid>
      <dc:creator>KevinLECOCQ</dc:creator>
      <dc:date>2015-01-27T13:54:25Z</dc:date>
    </item>
    <item>
      <title>Re: How to set spatial reference to a schematic diagram class with Arcobjects?</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-set-spatial-reference-to-a-schematic/m-p/536459#M14532</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can get &lt;A href="http://resources.esri.com/help/9.3/arcgisengine/ArcObjects/esriSchematic/ISchematicElementClass_SchematicDataset.htm"&gt;SchematicDataset&lt;/A&gt; and then alter spatial reference&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Jan 2015 14:28:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-set-spatial-reference-to-a-schematic/m-p/536459#M14532</guid>
      <dc:creator>nicogis</dc:creator>
      <dc:date>2015-01-27T14:28:23Z</dc:date>
    </item>
    <item>
      <title>Re: How to set spatial reference to a schematic diagram class with Arcobjects?</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-set-spatial-reference-to-a-schematic/m-p/536460#M14533</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;OK, I got the ISchematicDataset object and am looking for an interface like IGeoDatasetSchemaEdit to change the spatial reference. The available interfaces are in this list: &lt;A href="http://help.arcgis.com/en/sdk/10.0/arcobjects_net/componenthelp/index.html#/SchematicDatasetClass_Class/003s000002q8000000/" title="http://help.arcgis.com/en/sdk/10.0/arcobjects_net/componenthelp/index.html#/SchematicDatasetClass_Class/003s000002q8000000/"&gt;ArcObjects 10 .NET SDK Help&lt;/A&gt;‌&lt;/P&gt;&lt;P&gt;IGeoDatasetSchemaEdit isn't available for this object because I get a cast error.&lt;/P&gt;&lt;P&gt;Which interface could I use ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Jan 2015 14:37:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-set-spatial-reference-to-a-schematic/m-p/536460#M14533</guid>
      <dc:creator>KevinLECOCQ</dc:creator>
      <dc:date>2015-01-27T14:37:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to set spatial reference to a schematic diagram class with Arcobjects?</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-set-spatial-reference-to-a-schematic/m-p/536461#M14534</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you post part of source code ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Jan 2015 15:38:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-set-spatial-reference-to-a-schematic/m-p/536461#M14534</guid>
      <dc:creator>nicogis</dc:creator>
      <dc:date>2015-01-27T15:38:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to set spatial reference to a schematic diagram class with Arcobjects?</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-set-spatial-reference-to-a-schematic/m-p/536462#M14535</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I can't cast the SchematicDataset to IGeoDatasetSchemaEdit because I get an InvalidCastException. Here is my code:&lt;/P&gt;&lt;P&gt;I create a schematicWorkspace from a IWorkspace like this:&lt;/P&gt;&lt;P&gt;[...]&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;ISchematicWorkspaceFactory schematicWorkspaceFactory = new SchematicWorkspaceFactoryClass();
ISchematicWorkspace schematicWorkspace = schematicWorkspaceFactory.Open(workspace);&lt;/PRE&gt;&lt;P&gt;Then, I create the schematic dataset:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;schematicDataset = schematicWorkspace.CreateSchematicDataset(SCHEMATIC_DATASET_NAME);
schematicDataset.DesignMode = true;
Type objectType = Type.GetTypeFromProgID("esriSchematic.SchematicStandardBuilder");
ISchematicStandardBuilder schematicStandardBuilder = Activator.CreateInstance(objectType) as ISchematicStandardBuilder;
schematicStandardBuilder.AddConnectedNodes = true;
schematicStandardBuilder.InitializeLinksVertices = true;
schematicStandardBuilder.AutoCreateElementClasses = true;

schematicDiagramClass = schematicDataset.CreateSchematicDiagramClass(SCHEMATIC_DIAGRAM_CLASS_NAME);
schematicDiagramClass.SchematicBuilder = schematicStandardBuilder as ISchematicBuilder;
schematicDiagramClass.SchematicDataSource = schematicDataset.DefaultSchematicDataSource;
schematicDiagramClass.ExternalQueryEvaluationMode = esriSchematicExternalQueryEvaluationMode.esriSchematicNoQuery;
schematicDiagramClass.AlwaysLoadDiagrams = true;&lt;/PRE&gt;&lt;P&gt;Then, I define the spatial reference:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;ISpatialReference spatialReference = gdbDataset.getSpatialReference();
IGeoDatasetSchemaEdit geoDataset = (IGeoDatasetSchemaEdit)schematicDataset; // here I get an InvalidCastException
geoDataset.AlterSpatialReference(spatialReference);
IGeoDatasetSchemaEdit geoDiagramClass = (IGeoDatasetSchemaEdit)schematicDiagramClass;
geoDiagramClass.AlterSpatialReference(spatialReference);&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 23:17:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-set-spatial-reference-to-a-schematic/m-p/536462#M14535</guid>
      <dc:creator>KevinLECOCQ</dc:creator>
      <dc:date>2021-12-11T23:17:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to set spatial reference to a schematic diagram class with Arcobjects?</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-set-spatial-reference-to-a-schematic/m-p/536463#M14536</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Excuse me but before I have seen old help because now schematic has changed ( &lt;A href="http://resources.arcgis.com/en/help/arcobjects-net/conceptualhelp/index.html#//000100000m29000000" title="http://resources.arcgis.com/en/help/arcobjects-net/conceptualhelp/index.html#//000100000m29000000"&gt;ArcObjects Help for .NET developers&lt;/A&gt; ). See these snippets: &lt;A href="http://www.arcgis.com/home/item.html?id=a8be26357b944dfdbbd69a55818dcc88" title="http://www.arcgis.com/home/item.html?id=a8be26357b944dfdbbd69a55818dcc88"&gt;http://www.arcgis.com/home/item.html?id=a8be26357b944dfdbbd69a55818dcc88&lt;/A&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Jan 2015 18:42:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-set-spatial-reference-to-a-schematic/m-p/536463#M14536</guid>
      <dc:creator>nicogis</dc:creator>
      <dc:date>2015-01-27T18:42:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to set spatial reference to a schematic diagram class with Arcobjects?</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-set-spatial-reference-to-a-schematic/m-p/536464#M14537</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;OK, I finally found a solution in the sample called "Create A Schematic Diagram Class Entirely Based On Custom Queries From Scratch". I needed to create a shape field object (IField) to set the spatial reference of my ISchematicElementClass objects.&lt;/P&gt;&lt;P&gt;Now I get the schematic diagram spatial referenced. Problem solved, thanks a lot for the help!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Jan 2015 10:50:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-set-spatial-reference-to-a-schematic/m-p/536464#M14537</guid>
      <dc:creator>KevinLECOCQ</dc:creator>
      <dc:date>2015-01-28T10:50:07Z</dc:date>
    </item>
  </channel>
</rss>

