|
POST
|
I was able to get a list of the folders using the below code. You'd need to convert it to VB.net.
... View more
07-10-2015
09:17 AM
|
1
|
1
|
1120
|
|
POST
|
I believe that this can be done in ArcObjects via IAoInitialize, but it isn't possible out-of-the box with Python or ModelBuilder. From ModelBuilder within the UI the license is derived from the ArcGIS application used to open the model (i.e. if you open the model in ArcMap with a Basic license the model will use a Basic license). Within python there was a method in the 9.2 days called SetProduct, which could be used to set the license, but it appears that function has been deprecated by the arcpy site package. With arcpy you'd need to set the license prior to importing the arcpy site package, so it wouldn't allow you to change licenses in the middle of the tool. This is just a guess, but you may be able to get what you need to work in python if you run the various parts of your workflow on separate processes. When the new process starts you'd begin by importing the license level needed (i.e. arcinfo, arceditor, arcview, arcserver, arcenginegeodb, or arcengine) and execute your needed logic. Once the process ends and returns the license you'd begin the next process with the next needed license. This of course would be assuming that you had a concurrent use license that has the different license levels available. Accessing licenses and extensions in Python http://desktop.arcgis.com/en/desktop/latest/analyze/python/access-to-licensing-and-extensions.htm
... View more
07-09-2015
04:28 PM
|
3
|
2
|
1287
|
|
POST
|
Could you upload a zip of your sample and geodatabase so that I can take a quick look at it?
... View more
07-08-2015
09:27 AM
|
0
|
4
|
3799
|
|
POST
|
Could you upload the logic for your dependencies. I would think that because you're creating new tables you would just assign the tables within the execution logic of your tool so that the new tables are returned to their needed parameter.
... View more
07-07-2015
12:49 PM
|
0
|
0
|
879
|
|
POST
|
The only thing that I could add to Melinda's suggestion is that you could automate this workflow with python or modelbuilder. What I'd do is create points for where the park boundaries intersect the edges of the network dataset. This could be done using something as simple as converting your polygons to lines and processing them against the intersect tool to create points or more advanced like using the geometry objects in python to determine to intersecting points. Once you have the intersecting points you could use them as facilities to build your service area. At the end you'd need to merge all of the service areas together to display the result as if you were using the polygon, but you'd also need to handle the overlap between each of the larger impedance values.
... View more
07-03-2015
11:28 PM
|
1
|
1
|
5133
|
|
POST
|
I believe that your problem is a logical error. You're check to see if the value of the parameter is equal to a list instead of a value within the list (i.e. value=["PNR"] vs value = "PNR"). Maybe I can suggest an easier way to execute this. I was able to get it to work with the below logic. You'll see that I'm using a dictionary to host the list of values for each province. import arcpy
class ToolValidator(object):
"""Class for validating a tool's parameter values and controlling
the behavior of the tool's dialog."""
def __init__(self):
"""Setup arcpy and the list of tool parameters."""
self.params = arcpy.GetParameterInfo()
def initializeParameters(self):
"""Refine the properties of a tool's parameters. This method is
called when the tool is opened."""
return
def updateParameters(self):
"""Modify the values and properties of parameters before internal
validation is performed. This method is called whenever a parameter
has been changed."""
caDict = {'ATL':['NB', 'NL', 'NS'], 'ON':['ON'], 'PNR':['AB', 'MB', 'NT']}
self.params[0].filter.list = sorted(caDict.keys())
if not self.params[0].hasBeenValidated:
if caDict.has_key(self.params[0].valueAsText):
self.params[1].filter.list = caDict[self.params[0].valueAsText]
return
def updateMessages(self):
"""Modify the messages created by internal validation for each tool
parameter. This method is called after internal validation."""
return
... View more
07-02-2015
12:07 PM
|
1
|
2
|
1881
|
|
POST
|
Hi Yogi, I looked into this issue and I have been able to replicate it. This issue appears to be a bug because I'm able to create fields in a file geodatabase with 64 characters, as per the documentation, but the Alter Field management tool appears to be restricted to 31 characters. Defining fields in tables http://desktop.arcgis.com/en/desktop/latest/manage-data/geodatabases/design-defining-fields-in-tables.htm If you have an active support account could you send me a private message with your account information so that can attach your information to the bug I'll log for this issue? Workaround At the moment the only workaround I can see for this issue is to use the Add Field tool. Unlike the Alter Field tool, this tool will modify the order of your fields. If field order is important to you I would suggest either using python to create a new template feature class with your updated field and loading your data into this new dataset prior to overwrite the original class or create a fieldmappings object against your data, updating the information for the needed field, and then using the Feature Class to Feature Class to create a new clone of your data prior to overwriting it.
... View more
07-02-2015
11:46 AM
|
1
|
1
|
5516
|
|
POST
|
The basemap is covering your layer because of the drawing order. You should render the basemap prior to your layer. What exactly is the error that you're getting? If you're getting and error loading your sqlite geodatabase can you upload it?
... View more
06-30-2015
01:04 PM
|
1
|
6
|
3799
|
|
POST
|
With python this would involve post processing (i.e. after you add features you'd need to run a script to update these values). If you wanted to execute this as you create features you would need either an editor extension (Python or ArcObjects) or a feature class extension (ArcObjects). In the editor extension you would need to listen for the on create event. An easier option may be to use the Attribute Assistant to automate this task. You could leverage the Dynamic Table functionality within it that could automate populating your fields with the needed values. Dynamic Value Table http://resources.arcgis.com/en/help/localgovernment/10.2/index.html#/Dynamic_Value_table/028s0000008z000000/
... View more
06-30-2015
09:30 AM
|
2
|
1
|
1048
|
|
POST
|
If you want to use a model I'd suggest looking at the following page. Using If-Then-Else logic for branching http://desktop.arcgis.com/en/desktop/latest/analyze/modelbuilder/using-if-then-else-logic-for-branching.htm If you're running the tool from a GUI or Console outside of the geoprocessing framework then you could follow Dan's suggestion to utilize the raw_input or input function in python to prompt the user. If you want to utilize your tool within the GP framework this would become problematic as it would violate the intended interaction experience for our GP framework (i.e. all inputs are specified prior to clicking OK and the tool is not paused to wait for user interaction). If you wanted to leverage your tool within the GP Framework you'd want to expose your choice as a parameter within your tool and use a tool validator class to handle the logic of the user's selection. For example, below is an image of how this tool would look. Within the logic behind the tool I could listen for the user to change the first parameter, which determines what task they'll need to accomplish. Once the user selects a task I could disable the unrelated tasks so that they cannot specify values for these parameters and input empty strings to satisfy the required condition.
... View more
06-29-2015
02:41 PM
|
0
|
0
|
1144
|
|
POST
|
What version of the Java Runtime SDK are you using? According to the documentation the current version of the SDK (10.2.4) no longer supports JDK 6.
... View more
06-26-2015
09:44 AM
|
2
|
0
|
945
|
|
POST
|
Hi Brian, As Xander stated these commands should be searchable within our 10.3 documentation. The only thing I want to note is that you're leveraging a "Model Only" tool and exporting the model to a python script. These "Model Only" tools are intended for use in ModelBuilder only, so you will need to leverage the functions available in the python to incorporate your conditional or loop logic. For example, a replacement for the GetFieldValue tool could to utilize a cursor to parse the value from the dataset. Search Cursor http://desktop.arcgis.com/en/desktop/latest/analyze/arcpy-data-access/searchcursor-class.htm
... View more
06-26-2015
09:37 AM
|
2
|
0
|
1211
|
|
POST
|
The package map tool isn't supported for offline use in Runtime. You would only be able to utilize it in a connected environment from runtime. Could you describe the workflow you're needing to accomplish in more detail?
... View more
06-26-2015
09:11 AM
|
0
|
1
|
1885
|
|
POST
|
What you're wanting to accomplish would not be possible with the ArcGIS for Runtime SDK. This is a separate product from the ArcGIS Desktop series and would resemble what you've probably run into trying to use GUIs built in python outside of an ArcMap process. To build Add-In components you would have to utilize the ArcObjects .NET or Java SDKs, which would be available on your MyEsri account. If you were to use Runtime you'd need to run a separate application outside of ArcMap as somewhat of a viewer. It wouldn't be able to communicate directly with ArcMap, but you could in theory use an ArcObjects Addin to launch an Runtime application that connects to a service with your data and allows the user to interact with it. If you were to build this tool as an ArcMap addin you'd be able to both read the data directly and access information within the map without have to create a lot of "hacks" to communicate between two separate products.
... View more
06-25-2015
04:26 PM
|
0
|
0
|
1391
|
|
POST
|
Did you have anything in addition to the above code? The code you're posted so far appears to show how to get the hook into the ArcMap Editor. Are you wanting to wire into it's events so that you can review when features are created, updated, or deleted?
... View more
06-25-2015
03:55 PM
|
0
|
0
|
541
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 01-19-2016 04:45 AM | |
| 1 | 09-24-2015 06:45 AM | |
| 1 | 09-15-2015 10:49 AM | |
| 1 | 10-12-2015 03:07 PM | |
| 1 | 11-25-2015 09:10 AM |
| Online Status |
Offline
|
| Date Last Visited |
11-11-2020
02:23 AM
|