POST
|
The documentation here is incorrect. The example SetupStoreByTable function in the ArcPY script at the bottom reads: arcpy.SetupStoreByTable_ba(Input, Locator, FldCol, StoreName, "USE_EXISTING", StoreId, OutFC) It should read according to the documentation DIRECTLY ABOVE it and python reflection: arcpy.SetupStoreByTable_ba(Input, Locator, FldCol, StoreName, StoreId, OutFC, "USE_EXISTING") If you run it the way it is an exception is thrown with the message "Cannot set input into parameter WayToSpecifyStoreIDField." Tyler
... View more
10-03-2011
11:21 AM
|
0
|
0
|
2226
|
POST
|
Tyler - I believe this has to do with the Business Analyst extension. First question - have you purchased BA? If not, then you would not be able to access the python components for BA. If you have a BA license, then you can access extensions via Python. Please refer to the following webhelp: http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//002z0000000z000000 Hope this helps. Robert LeClair Esri-Denver Hi Robert, Thanks for the response and yes I have purchased the BA extension. I'm less concerned with how to load/checkout the extension and more interested in looking at the actual source code. Many of the arcpy modules are, by default, located at %ARC_ROOT%/ArcGIS/Desktop10.0/arcpy/arcpy/ In that directory I'm able to view the actual source code. I keep running into issues with Arcpy regarding parameter order, and Index Out Of Bounds exceptions being raised from inside the arcpy library. Generally all I'm trying to do is run examples so it's unclear why things don't work. I had hoped to view the module source so I could debug the issues without having to file a service request. The question is do I have access to the ArcPY module for business analyst, if so where is it? I'm assuming it's named ba.py. Tyler
... View more
10-03-2011
09:15 AM
|
0
|
0
|
268
|
POST
|
I've managed to solve the problem simple by opening ArcMap. I hadn't tried to use the software since a re-install and opening ArcMap must have initialized some global state because the method signatures were found the next time I called them. However, I have moved onto another issue. First: http://help.arcgis.com/de/arcgisdesktop/10.0/help/index.html#//00mm0000001p000000.htm The parameter list in the example and the syntax list do NOT match, which is extremely misleading. Second: Neither of those seem to be exactly as it's listed in Arcpy using reflection
IDLE 2.6.5
>>> import arcview;
>>> import arcpy
>>> arcpy.ImportToolbox("d:\ArcGIS\Desktop10.0\ArcToolbox\Toolboxes\Business Analyst Tools.tbx")
<module 'ba' (built-in)>
>>> import inspect
>>> print(inspect.getargspec(arcpy.ba.LocatorReport))
ArgSpec(args=['InputFeatureLayer', 'IDField', 'NameFldName', 'BusinessLayer', 'FieldsToAppear', 'IsLandscape', 'All_Or_Single_Or_Selected', 'ByID_Or_ByName', 'Single_Site', 'WayToSelectBusiness', 'RadiusToSelectBusinesses', 'NumberOfBusinessesToSelect', 'DistanceCalculateMethod', 'AddDistanceToBusiness', 'WayToDefineDistanceField', 'DesireLinesDistanceField', 'NeedReportOutput', 'ReportTitle', 'ReportDir', 'NeedFeatureclassOutput', 'OutputFeatureClass', 'BarrierFeatureClasses', 'ReportFormats'], varargs=None, keywords=None, defaults=(None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None))
... View more
10-03-2011
08:57 AM
|
0
|
0
|
363
|
POST
|
I've been trying to track down the solution to this. I was hoping to take a look at the module definition for business analyst. Many of the arcpy definitions are in "/Desktop10.0/arcpy/arcpy/". In this directory there is a ba.py, but it contains only two method definitions. I'm thinking this might be my problem, unless there is another copy of ba.py getting loaded somewhere. Thanks, Tyler
... View more
09-28-2011
08:55 AM
|
0
|
2
|
1478
|
POST
|
I was attempting to run Setup_Customers_Using_Tabular_Data , I modified the paths to fit my environment but when I run the program I receive SetupCustomersByTable() takes no arguments (6 given) *note* I had to modify the exception clause to output this A little investigation in IDLE showed this:
IDLE 2.6.5
>>> import arcview
>>> import arcpy
>>> print hasattr(arcpy.ba, 'SetupCustomersByTable')
Traceback (most recent call last):
File "<pyshell#2>", line 1, in <module>
print hasattr(arcpy.ba, 'SetupCustomersByTable')
AttributeError: 'module' object has no attribute 'ba'
>>> print hasattr(arcpy, 'ba')
False
>>> arcpy.ImportToolbox("C:\Program Files (x86)\ArcGIS\Desktop10.0\ArcToolbox\Toolboxes\Business Analyst Tools.tbx")
<module 'ba' (built-in)>
>>> print hasattr(arcpy, 'ba')
True
>>> print hasattr(arcpy.ba, 'SetupCustomersByTable')
True
>>> import inspect
>>> print(inspect.getargspec(arcpy.ba.SetupCustomersByTable))
ArgSpec(args=[], varargs=None, keywords=None, defaults=None) This is not the only function this happens with, but all of them in the BA package. I've never gotten any full arcpy tutorial to work from the website, am I missing something obvious setup wise? Tyler
... View more
09-27-2011
11:05 AM
|
0
|
2
|
3593
|
POST
|
Tyler, If you were the one that installed Business Analyst 10 there is an option to basically perform a data-less install. I would initially recommend running the install for Business Analyst 10 and make sure that 'Typical' option is used which should install the data on the local drive. I would double check and make sure how much hard drive space your primary drive has this will be installing a good 15+ GBs of data. Regards, Jason Thanks Jason, I was able to go back to the installation package and extract the necessary files. Tyler
... View more
09-27-2011
10:21 AM
|
0
|
0
|
182
|
POST
|
Hello, I'm extremely new to Arcpy and GIS in general but not to programming. I'm trying to walk through this example: Create Store with Address Data However, I cannot find "C:/Program Files/ArcGIS/Desktop10.0/Business Analyst/Data/USA Geocoding Service/USA Geocoding Service" in my installation. My BA installation differs at the Data/ folder, I do not have it, instead I have a folder called /Datasets and nothing resembling the rest of the path. Did I forget to install something or is this example out of date? Thanks, Tyler
... View more
09-22-2011
06:33 AM
|
0
|
0
|
2073
|
POST
|
Hello, I'm extremely new to Arcpy and GIS in general but not to programming. I'm trying to walk through this example: Create Store with Address Data However, I cannot find "C:/Program Files/ArcGIS/Desktop10.0/Business Analyst/Data/USA Geocoding Service/USA Geocoding Service" in my installation. My BA installation path looks like C:/Program Files/ArcGIS/Desktop10.0/Business Analyst/Datasets, not /Data. Did I forget to install something or is this example out of date? Thanks, Tyler
... View more
09-22-2011
06:30 AM
|
0
|
2
|
2680
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:24 AM
|