<?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: Accessing ArcMap 9.3 elements in python in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/accessing-arcmap-9-3-elements-in-python/m-p/609744#M47609</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Hi There,&lt;BR /&gt;Am trying to access elements (layers, display information, symbology) in an arcmap 9.3 document&amp;nbsp; through the geoprocessor object in python. setting the mxd as a workspace isnt working&lt;BR /&gt;&lt;BR /&gt;gp = arcgisscripting.create()&lt;BR /&gt;gp.Workspace = "C:/MXD/tourmap"&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;A workspace is a location that stores data, not an MXD. The only way is access MXD information in 9.3 with Python is through the ArcObjects library via the Python module &lt;/SPAN&gt;&lt;A href="http://sourceforge.net/projects/comtypes/files/comtypes/0.6.2/"&gt;comtypes&lt;/A&gt;&lt;SPAN&gt;. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;There's a good powerpoint presentation about Python and ArcObjects here:&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://www.pierssen.com/arcgis/misc.htm"&gt;http://www.pierssen.com/arcgis/misc.htm&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;and a couple of recent posts here:&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://gis.stackexchange.com/questions/80/how-do-i-access-arcobjects-from-python"&gt;http://gis.stackexchange.com/questions/80/how-do-i-access-arcobjects-from-python&lt;/A&gt;&lt;BR /&gt;&lt;A href="http://forums.arcgis.com/threads/21348-How-do-you-refresh-view-in-ArcMap-from-Python"&gt;http://forums.arcgis.com/threads/21348-How-do-you-refresh-view-in-ArcMap-from-Python&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If you're familiar with ArcObjects and its object module then you can likely pick it up fairly easily. If you're new to ArcObjects you're best off practicing with it in VBA first - it takes awhile to understand it and VBA makes it a bit easier. There's plenty of examples in these forums to do what you want with ArcObjects in VBA.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;As Luke mentions, the ArcPy module in ArcGIS 10 makes it easier to access most MXD information. However..... I'm still waiting for 10 but in the meantime I've been going over the documentation and I still don't see any way to access and manipulate layer symbology.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 03 Feb 2011 13:09:06 GMT</pubDate>
    <dc:creator>BradPosthumus</dc:creator>
    <dc:date>2011-02-03T13:09:06Z</dc:date>
    <item>
      <title>Accessing ArcMap 9.3 elements in python</title>
      <link>https://community.esri.com/t5/python-questions/accessing-arcmap-9-3-elements-in-python/m-p/609742#M47607</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi There,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Am trying to access elements (layers, display information, symbology) in an arcmap 9.3 document&amp;nbsp; through the geoprocessor object in python. setting the mxd as a workspace isnt working&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;gp = arcgisscripting.create()&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;gp.Workspace = "C:/MXD/tourmap"&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Feb 2011 10:50:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/accessing-arcmap-9-3-elements-in-python/m-p/609742#M47607</guid>
      <dc:creator>AllanLumte</dc:creator>
      <dc:date>2011-02-03T10:50:32Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing ArcMap 9.3 elements in python</title>
      <link>https://community.esri.com/t5/python-questions/accessing-arcmap-9-3-elements-in-python/m-p/609743#M47608</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;As I understand it you can't at 9.3.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Have a look at the below link for the fly-over:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://webhelp.esri.com/arcgisdesktop/9.3/index.cfm?id=905&amp;amp;pid=904&amp;amp;topicname=About_getting_started_with_writing_geoprocessing_scripts"&gt;http://webhelp.esri.com/arcgisdesktop/9.3/index.cfm?id=905&amp;amp;pid=904&amp;amp;topicname=About_getting_started_with_writing_geoprocessing_scripts&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Best I have been able to do is when you set your UI up for your script within ArcMap/ or ArcCatalog set your input parameters to be of the Feature Layer type as opposed to being of either shapefile or feature class.&amp;nbsp; This will allow the tool validator class to reach over and grab from either the TOC or the catalog tree view with a drag/drop operation.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm told (got to see the demo for it at the dev summit last year) that you can manipulate all of that @10 with the ArcPy libraries, but I haven't had a chance to play with it yet.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Best of Luck&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Feb 2011 11:14:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/accessing-arcmap-9-3-elements-in-python/m-p/609743#M47608</guid>
      <dc:creator>LukeBadgerow</dc:creator>
      <dc:date>2011-02-03T11:14:08Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing ArcMap 9.3 elements in python</title>
      <link>https://community.esri.com/t5/python-questions/accessing-arcmap-9-3-elements-in-python/m-p/609744#M47609</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Hi There,&lt;BR /&gt;Am trying to access elements (layers, display information, symbology) in an arcmap 9.3 document&amp;nbsp; through the geoprocessor object in python. setting the mxd as a workspace isnt working&lt;BR /&gt;&lt;BR /&gt;gp = arcgisscripting.create()&lt;BR /&gt;gp.Workspace = "C:/MXD/tourmap"&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;A workspace is a location that stores data, not an MXD. The only way is access MXD information in 9.3 with Python is through the ArcObjects library via the Python module &lt;/SPAN&gt;&lt;A href="http://sourceforge.net/projects/comtypes/files/comtypes/0.6.2/"&gt;comtypes&lt;/A&gt;&lt;SPAN&gt;. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;There's a good powerpoint presentation about Python and ArcObjects here:&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://www.pierssen.com/arcgis/misc.htm"&gt;http://www.pierssen.com/arcgis/misc.htm&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;and a couple of recent posts here:&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://gis.stackexchange.com/questions/80/how-do-i-access-arcobjects-from-python"&gt;http://gis.stackexchange.com/questions/80/how-do-i-access-arcobjects-from-python&lt;/A&gt;&lt;BR /&gt;&lt;A href="http://forums.arcgis.com/threads/21348-How-do-you-refresh-view-in-ArcMap-from-Python"&gt;http://forums.arcgis.com/threads/21348-How-do-you-refresh-view-in-ArcMap-from-Python&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If you're familiar with ArcObjects and its object module then you can likely pick it up fairly easily. If you're new to ArcObjects you're best off practicing with it in VBA first - it takes awhile to understand it and VBA makes it a bit easier. There's plenty of examples in these forums to do what you want with ArcObjects in VBA.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;As Luke mentions, the ArcPy module in ArcGIS 10 makes it easier to access most MXD information. However..... I'm still waiting for 10 but in the meantime I've been going over the documentation and I still don't see any way to access and manipulate layer symbology.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Feb 2011 13:09:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/accessing-arcmap-9-3-elements-in-python/m-p/609744#M47609</guid>
      <dc:creator>BradPosthumus</dc:creator>
      <dc:date>2011-02-03T13:09:06Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing ArcMap 9.3 elements in python</title>
      <link>https://community.esri.com/t5/python-questions/accessing-arcmap-9-3-elements-in-python/m-p/609745#M47610</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Alright, i ditched 9.3 for arcgis 10 evaluation edition which will last for the duration of my project.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Arcpy library in 10 is really helpful for accessing mxd dataframe and layer elements. Thanks for the suggestions!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Feb 2011 05:46:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/accessing-arcmap-9-3-elements-in-python/m-p/609745#M47610</guid>
      <dc:creator>AllanLumte</dc:creator>
      <dc:date>2011-02-16T05:46:06Z</dc:date>
    </item>
  </channel>
</rss>

