<?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 Checking if ArcGIS extension has already been checked out manually using ArcPy in ArcGIS Desktop Installation Support Questions</title>
    <link>https://community.esri.com/t5/arcgis-desktop-installation-support-questions/checking-if-arcgis-extension-has-already-been/m-p/811604#M1513</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;BR /&gt;I have to map if a user uses some ArcMap extention in the day. I figured out a script that checks if the extention is working or not, by testing each one and reading the error message.&amp;nbsp;These script works fine if I run it inside arcmap, but as standalone script it isn't working.&amp;nbsp;&lt;BR /&gt;Is there anyway that I can do it as standalone script? Or any other way to checked if these extensions are checked out?&amp;nbsp;&lt;BR /&gt;Or I can schedule a script inside arcmap to run everytime users started it or close?&lt;/P&gt;&lt;P&gt;My script is bellow:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;!&lt;/P&gt;&lt;P&gt;#class to check extentions&lt;BR /&gt;class lista_ext():&lt;BR /&gt; #initialize the list&lt;BR /&gt; def __init__(self):&lt;BR /&gt; self.l=[]&lt;/P&gt;&lt;P&gt;#get list values&lt;BR /&gt; def getlist(self):&lt;BR /&gt; return self.l&lt;BR /&gt; ''' &lt;BR /&gt; Test if the extension is turned on. &lt;BR /&gt; If there error given is different from '000824', &lt;BR /&gt; this mean that the extension is on and tried to exceute&lt;BR /&gt; '''&lt;BR /&gt; def testarextension(self,e,name):&lt;BR /&gt; if str(e).find('000824') ==-1:&lt;BR /&gt; self.l.append(name)&lt;BR /&gt; return self.l&lt;/P&gt;&lt;P&gt;def testarfuncoes(self):&lt;BR /&gt; ''' &lt;BR /&gt; Test one function from each extension.&lt;BR /&gt; The function chosen it's not supposed to work and will show an error message anyway&lt;BR /&gt; '''&lt;BR /&gt; try: &lt;BR /&gt; arcpy.Idw_3d(1)&lt;BR /&gt; except Exception:&lt;BR /&gt; e = sys.exc_info()[1]&lt;BR /&gt; self.testarextension(e,'3D Analyst')&lt;BR /&gt; try: &lt;BR /&gt; arcpy.IDW_ga(1)&lt;BR /&gt; except Exception:&lt;BR /&gt; e = sys.exc_info()[1]&lt;BR /&gt; self.testarextension(e,'Geostatistical Analyst')&lt;BR /&gt; try: &lt;BR /&gt; arcpy.Solve_na(1)&lt;BR /&gt; except Exception:&lt;BR /&gt; e = sys.exc_info()[1]&lt;BR /&gt; self.testarextension(e,'Network Analyst')&lt;BR /&gt; try: &lt;BR /&gt; arcpy.UpdateDiagram_schematics(1)&lt;BR /&gt; except Exception:&lt;BR /&gt; e = sys.exc_info()[1]&lt;BR /&gt; self.testarextension(e,'Schematics')&lt;BR /&gt; try: &lt;BR /&gt; arcpy.sa.Int('1.1') &lt;BR /&gt; except Exception:&lt;BR /&gt; e = sys.exc_info()[1]&lt;BR /&gt; self.testarextension(e,'Spatial Analyst')&lt;BR /&gt; try: &lt;BR /&gt; arcpy.TrackIntervalsToFeature_ta(1)&lt;BR /&gt; except Exception:&lt;BR /&gt; e = sys.exc_info()[1]&lt;BR /&gt; self.testarextension(e,'Tracking Analyst')&lt;BR /&gt; return self.l&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 06 Nov 2020 15:28:01 GMT</pubDate>
    <dc:creator>LuizaCintra_Fernandes</dc:creator>
    <dc:date>2020-11-06T15:28:01Z</dc:date>
    <item>
      <title>Checking if ArcGIS extension has already been checked out manually using ArcPy</title>
      <link>https://community.esri.com/t5/arcgis-desktop-installation-support-questions/checking-if-arcgis-extension-has-already-been/m-p/811604#M1513</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;BR /&gt;I have to map if a user uses some ArcMap extention in the day. I figured out a script that checks if the extention is working or not, by testing each one and reading the error message.&amp;nbsp;These script works fine if I run it inside arcmap, but as standalone script it isn't working.&amp;nbsp;&lt;BR /&gt;Is there anyway that I can do it as standalone script? Or any other way to checked if these extensions are checked out?&amp;nbsp;&lt;BR /&gt;Or I can schedule a script inside arcmap to run everytime users started it or close?&lt;/P&gt;&lt;P&gt;My script is bellow:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;!&lt;/P&gt;&lt;P&gt;#class to check extentions&lt;BR /&gt;class lista_ext():&lt;BR /&gt; #initialize the list&lt;BR /&gt; def __init__(self):&lt;BR /&gt; self.l=[]&lt;/P&gt;&lt;P&gt;#get list values&lt;BR /&gt; def getlist(self):&lt;BR /&gt; return self.l&lt;BR /&gt; ''' &lt;BR /&gt; Test if the extension is turned on. &lt;BR /&gt; If there error given is different from '000824', &lt;BR /&gt; this mean that the extension is on and tried to exceute&lt;BR /&gt; '''&lt;BR /&gt; def testarextension(self,e,name):&lt;BR /&gt; if str(e).find('000824') ==-1:&lt;BR /&gt; self.l.append(name)&lt;BR /&gt; return self.l&lt;/P&gt;&lt;P&gt;def testarfuncoes(self):&lt;BR /&gt; ''' &lt;BR /&gt; Test one function from each extension.&lt;BR /&gt; The function chosen it's not supposed to work and will show an error message anyway&lt;BR /&gt; '''&lt;BR /&gt; try: &lt;BR /&gt; arcpy.Idw_3d(1)&lt;BR /&gt; except Exception:&lt;BR /&gt; e = sys.exc_info()[1]&lt;BR /&gt; self.testarextension(e,'3D Analyst')&lt;BR /&gt; try: &lt;BR /&gt; arcpy.IDW_ga(1)&lt;BR /&gt; except Exception:&lt;BR /&gt; e = sys.exc_info()[1]&lt;BR /&gt; self.testarextension(e,'Geostatistical Analyst')&lt;BR /&gt; try: &lt;BR /&gt; arcpy.Solve_na(1)&lt;BR /&gt; except Exception:&lt;BR /&gt; e = sys.exc_info()[1]&lt;BR /&gt; self.testarextension(e,'Network Analyst')&lt;BR /&gt; try: &lt;BR /&gt; arcpy.UpdateDiagram_schematics(1)&lt;BR /&gt; except Exception:&lt;BR /&gt; e = sys.exc_info()[1]&lt;BR /&gt; self.testarextension(e,'Schematics')&lt;BR /&gt; try: &lt;BR /&gt; arcpy.sa.Int('1.1') &lt;BR /&gt; except Exception:&lt;BR /&gt; e = sys.exc_info()[1]&lt;BR /&gt; self.testarextension(e,'Spatial Analyst')&lt;BR /&gt; try: &lt;BR /&gt; arcpy.TrackIntervalsToFeature_ta(1)&lt;BR /&gt; except Exception:&lt;BR /&gt; e = sys.exc_info()[1]&lt;BR /&gt; self.testarextension(e,'Tracking Analyst')&lt;BR /&gt; return self.l&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Nov 2020 15:28:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-desktop-installation-support-questions/checking-if-arcgis-extension-has-already-been/m-p/811604#M1513</guid>
      <dc:creator>LuizaCintra_Fernandes</dc:creator>
      <dc:date>2020-11-06T15:28:01Z</dc:date>
    </item>
  </channel>
</rss>

