POST
|
As all geoprocessing tools do, I would like my Python script tool to generate automatically the workspace and base name for outputs. In ArcGIS Help online, "Understanding validation in script tools" says about internal validation that: Generate a default catalog path for output datasets. After reading carefully (maybe not enough) the "Customizing tool behavior in a Python toolbox" from ArcGIS Help, I have not been able to adapt my script . I have modified the Validation Class adding the getParameterInfo method, with the following code: def getParameterInfo(self): # Input raster param0 = arcpy.Parameter(displayName="Introduce Piezometry raster dataset:", name="piezoras", datatype="GPRasterLayer", parameterType="Required", direction="Input") # Output raster param1 = arcpy.Parameter(displayName="Define output Groundwater Flow Direction raster dataset:", name="direcras", datatype="DERasterDataset", parameterType="Required", direction="Output") param1.parameterDependencies = [param0.name] param1.schema.clone = True params = [param0, param1] return params Some doubts: The definitions for these parameters in Parameters Tab do not change, why? The code in Validation Tab is not related to Parameters Tab??? How can I related them? With the displayName property? Where is the name property in Parameters Tab? In general, How to autogenerate a workspace and base name for output parameter in Python script tool in dialog tool window? Thanks in advance
... View more
08-06-2014
04:01 AM
|
0
|
0
|
3559
|
POST
|
Thanks Russell, I passed over the validation section!!!
... View more
07-30-2014
08:29 AM
|
0
|
0
|
332
|
POST
|
Hi, I'd like to offer to final users of a python script tool the option to work with a constant value (as double) or a raster dataset. I've thought about defining 2 parameters ( double and raster dataset) but I dont know how to disable the parameter not selected by the user. Is that possible? Is there other solutions? Thanks in advance
... View more
07-29-2014
09:46 AM
|
1
|
2
|
758
|
POST
|
I have just coped with this issue. The solution is implementing ITool in your custom tool. Add this line of code after Inherits BaseTool: [INDENT] Inherits BaseTool Implements ITool Implements ICommand[/INDENT] Then, add a new method, like this: [INDENT]Public Overrides Sub OnDblClick() [INDENT][INDENT]MyBase.OnDblClick() Dim newLineGeometry As IGeometry = _lineDrawFeedback.Stop() Dim rgbColor As IRgbColor = GetRGBColor(255, 0, 0) AddGraphicToMap(m_hookHelper.ActiveView, newLineGeometry, rgbColor, rgbColor) _lineDrawFeedback = Nothing _duringLineDrawing = False[/INDENT][/INDENT] End Sub[/INDENT] Good Luck!!!
... View more
12-09-2013
06:02 AM
|
0
|
0
|
355
|
POST
|
Hello, I am developing a custom tool for a page layout control. This tool creates line graphics, but I need to interrupt the drawing to use other tools as zoom, pan... (to continue drawing more accurately) How is that possible if I am constructing the line with rubberband class??? Thanks in advance for your help!!!
... View more
12-08-2013
04:42 AM
|
0
|
0
|
354
|
POST
|
Hello, I need to release an object created from a template of ComClass in Visual Studio. I get this error: The object's type must be __ComObject or derived from __ComObject Is it not a ComObject? The real problem is that I get System Resources Excedeed, so I am trying to release memory. Thanks in advance!!!
... View more
11-04-2013
04:21 AM
|
0
|
0
|
504
|
Title | Kudos | Posted |
---|---|---|
1 | 07-29-2014 09:46 AM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|