<?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 ArcGIS Desktop/Engine 9.3.1 windows application using .NET SDK in 3D Questions</title>
    <link>https://community.esri.com/t5/3d-questions/arcgis-desktop-engine-9-3-1-windows-application/m-p/1440#M13</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Dear All,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Background: ArcGIS Engine 9.3.1 windows application using .NET SDK.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I am opening a windows form on click of custom command present in ArcMap. I have a scenecontrol in this form. On form load, I am loading .sxd and then I am executng a small query and then selecting the features. After tat, I have to zoom to selected features during form load itself.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I am trying below piece of code to zoom to envelope of selected features (envv, below, is envelope of selected features, got by Union of all envelopes)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;axSceneControl1.Scene.SceneGraph.ActiveViewer.Camera.ZoomToRect(envv);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;axSceneControl1.Scene.SceneGraph.ActiveViewer.Redraw(true);&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Interestingly, the "ZoomToRect" method above expects screen envelope of type IEnvelope. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;How can I convert envelope to screen envelope?.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I have below piece of code to convert into screen, but it requires 'IActiveView' object.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;ESRI.ArcGIS.Display.IScreenDisplay screenDisplay = activeView.ScreenDisplay;ESRI.ArcGIS.Display.IDisplayTransformation displayTransformation = screenDisplay.DisplayTransformation;displayTransformation.FromMapPoint(mapPoint, out x, out y);&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I tried getting activeView object by casting axSceneControl into IBasicMap and then casting the result into IActiveView.But it is returning wrong values.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Since I have the scenecontrol in the windows form, do i need to implement IApplication interface to access activeview?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;If this method is incorrect, then how to achieve zoom to selected features in scene form?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;With Regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Muzammil.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 04 Oct 2010 18:18:39 GMT</pubDate>
    <dc:creator>MuzammilAK</dc:creator>
    <dc:date>2010-10-04T18:18:39Z</dc:date>
    <item>
      <title>ArcGIS Desktop/Engine 9.3.1 windows application using .NET SDK</title>
      <link>https://community.esri.com/t5/3d-questions/arcgis-desktop-engine-9-3-1-windows-application/m-p/1440#M13</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Dear All,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Background: ArcGIS Engine 9.3.1 windows application using .NET SDK.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I am opening a windows form on click of custom command present in ArcMap. I have a scenecontrol in this form. On form load, I am loading .sxd and then I am executng a small query and then selecting the features. After tat, I have to zoom to selected features during form load itself.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I am trying below piece of code to zoom to envelope of selected features (envv, below, is envelope of selected features, got by Union of all envelopes)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;axSceneControl1.Scene.SceneGraph.ActiveViewer.Camera.ZoomToRect(envv);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;axSceneControl1.Scene.SceneGraph.ActiveViewer.Redraw(true);&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Interestingly, the "ZoomToRect" method above expects screen envelope of type IEnvelope. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;How can I convert envelope to screen envelope?.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I have below piece of code to convert into screen, but it requires 'IActiveView' object.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;ESRI.ArcGIS.Display.IScreenDisplay screenDisplay = activeView.ScreenDisplay;ESRI.ArcGIS.Display.IDisplayTransformation displayTransformation = screenDisplay.DisplayTransformation;displayTransformation.FromMapPoint(mapPoint, out x, out y);&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I tried getting activeView object by casting axSceneControl into IBasicMap and then casting the result into IActiveView.But it is returning wrong values.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Since I have the scenecontrol in the windows form, do i need to implement IApplication interface to access activeview?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;If this method is incorrect, then how to achieve zoom to selected features in scene form?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;With Regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Muzammil.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Oct 2010 18:18:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/3d-questions/arcgis-desktop-engine-9-3-1-windows-application/m-p/1440#M13</guid>
      <dc:creator>MuzammilAK</dc:creator>
      <dc:date>2010-10-04T18:18:39Z</dc:date>
    </item>
  </channel>
</rss>

