result1 = arcpy.GetCount_management("TempSelection") affectedFeatures = int(result1.GetOutput(0))
So far, I have also needed to change the path to any toolboxes I've loaded. For example... from:gp.AddToolbox("C:/Program Files/ArcGIS/ArcToolbox/Toolboxes/Data Management Tools.tbx")to:gp.AddToolbox("C:\Program Files\ArcGIS\Desktop10.0\ArcToolbox\Toolboxes\Data Management Tools.tbx")Am I doing something I don't need to? This was originally a script back at 9.1 or 9.2 that imported win32com.client. Do we no longer need to call out a specific toolbox?Thanks, Gavin
Hmm. Odd. I assume that must have come out of model builder at some point as that is how we originally started our scripting. I've always assumed it was needed. I'll test without thanks.G
...code before sub_folder = "ArcToolbox/Toolboxes/" install_dir = arcpy.GetInstallInfo()['InstallDir'].replace("\\","/") tbx_home = os.path.join(install_dir, sub_folder) ...code after
I don't think that is entirely true. There have been lots of my models and scripts that seem to have trouble.
Aangemelde leden kunnen berichten plaatsen, updates volgen en meer. Nieuw hier? Registreer een gratis account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.