Tag Info

New answers tagged

0

Samy, I use sys.argv[n] but GetParameterAsText is the same thing, but be aware that argv[0] is the script, argv[1] is the first parameter as opposed to GetParameterAsText(0) being the first parameter. On each iteration (after the clip) you need to clear the selection or remake the layers "lyr" and "pochoirlyr" otherwise it will only work on the first ...


0

Unfortunately I do not have a 50 reputation yet to comment on posts so I had to post this here. category="" <-- will place your command or tool under the Misc. category under Customize>Commands. I do not know how to fully hide a custom tool like you are wanting to do.


1

Have a look on the documentation here : http://docs.qgis.org/2.6/en/docs/user_manual/print_composer/print_composer.html#atlas-generation and the example in http://nathanw.net/2014/09/23/qgis-atlas-on-non-geometry-tables/


0

You need to use the arcpy.GetParameterAsText(0) method: See examples from: Understanding script tool parameters


1

Change the updateParameters as follows: def updateParameters(self, parameters): """Modify the values and properties of parameters before internal validation is performed. This method is called whenever a parameter has been changed.""" if parameters[0].value: if not parameters[1].altered: fields = [f for f in ...


5

You can do this using 2 os.path functions (splitext and basename): import os os.path.splitext(os.path.basename(r'C:\user\shapefiles\polygon.shp'))[0] # returns 'polygon'



Top 50 recent answers are included