Skip to main content
added 174 characters in body
Source Link

(I would rather answer you on Gis.se, but I'll answer here it's not illogical regarding the end user side you need to enhance)

I suggest you have a look at Python Toolboxes making for Arcgis, or in the case you are using QGIS, Writing new Processing algorithms as python scripts. You will see the parameters of your script can also be issued from gui interfaces you can generate from within your code. You will then be able to use lists of values or check-boxes for example. Those check boxes would help passing variables into your script instead of putting them hard in the code.

If you have any problems with the way to make scripts, please read this related documents and dig the subject following this lead, try things in your software then post again (maybe rather in GIS.SE as it's arcpy related) for your precise question on the subject.

For a more general answer that fits this SE area, the important thing is that you need to find a way to create a GUI (Graphical User Interface) with external tools or build-in tools and pass on the parameter inside your code, depending on what the user has choosen.

Your script will then have more then one parameter, for example :

def addressParser(inString, returnType): 

After that, you will be able to use your "if ....then :" type condition check to know which value was chosen by the user prior to running the code.

(I would rather answer you on Gis.se, but I'll answer here it's not illogical regarding the end user side you need to enhance)

I suggest you have a look at Python Toolboxes making for Arcgis, or in the case you are using QGIS, Writing new Processing algorithms as python scripts. You will see the parameters of your script can also be issued from gui interfaces you can generate from within your code. You will then be able to use lists of values or check-boxes for example. Those check boxes would help passing variables into your script instead of putting them hard in the code.

If you have any problems with the way to make scripts, please read this related documents and dig the subject following this lead, try things in your software then post again (maybe rather in GIS.SE as it's arcpy related) for your precise question on the subject.

For a more general answer that fits this SE area, the important thing is that you need to find a way to create a GUI (Graphical User Interface) with external tools or build-in tools and pass on the parameter inside your code, depending on what the user has choosen.

Your script will then have more then one parameter, for example :

def addressParser(inString, returnType): 

After that, you will be able to use your "if ....then :" type condition check to know which value was chosen by the user prior to running the code.

(I would rather answer you on Gis.se, but I'll answer here it's not illogical regarding the end user side you need to enhance)

I suggest you have a look at Python Toolboxes making for Arcgis, or in the case you are using QGIS, Writing new Processing algorithms as python scripts. You will see the parameters of your script can also be issued from gui interfaces you can generate from within your code. You will then be able to use lists of values or check-boxes for example. Those check boxes would help passing variables into your script instead of putting them hard in the code.

If you have any problems with the way to make scripts, please read this related documents and dig the subject following this lead, try things in your software then post again (maybe rather in GIS.SE as it's arcpy related) for your precise question on the subject.

For a more general answer that fits this SE area, the important thing is that you need to find a way to create a GUI (Graphical User Interface) with external tools or build-in tools and pass on the parameter inside your code, depending on what the user has choosen.

Your script will then have more then one parameter, for example :

def addressParser(inString, returnType): 

After that, you will be able to use your "if ....then :" type condition check to know which value was chosen by the user prior to running the code.

added 145 characters in body
Source Link

(I would rather answer you on Gis.se, but I'll answer here it's not illogical regarding the end user side you need to enhance)

I suggest you have a look at Python Toolboxes making for Arcgis, or in the case you are using QGIS, Writing new Processing algorithms as python scripts. You will see the parameters of your script can also be issued from gui interfaces you can generate from within your code. You will then be able to use lists of values or check-boxes for example. Those check boxes would help passing variables into your script instead of putting them hard in the code.

If you have any problems with the way to make scripts, please read this related documents and dig the subject following this lead, try things in your software then post again (maybe rather in GIS.SE as it's arcpy related) for your precise question on the subject.

For a more general answer that fits this SE area, the important thing is that you need to find a way to create a GUI (Graphical User Interface) with external tools or build-in tools and pass on the parameter inside your code, depending on what the user has choosen.

Your script will then have more then one parameter, for example :

def addressParser(inString, returnType): 

After that, you will be able to use your "if ....then :" type condition check to know which value was chosen by the user prior to running the code.

(I would rather answer you on Gis.se, but I'll answer here it's not illogical regarding the end user side you need to enhance)

I suggest you have a look at Python Toolboxes making for Arcgis, or in the case you are using QGIS, Writing new Processing algorithms as python scripts. You will see the parameters of your script can also be issued from gui interfaces you can generate from within your code. You will then be able to use lists of values or check-boxes for example. Those check boxes would help passing variables into your script instead of putting them hard in the code.

If you have any problems with the way to make scripts, please read this related documents and dig the subject following this lead, try things in your software then post again (maybe rather in GIS.SE as it's arcpy related) for your precise question on the subject.

For a more general answer, you need to find a way to create a GUI (Graphical User Interface) with external tools or build-in tools and pass on the parameter inside your code, depending on what the user has choosen.

Your script will then have more then one parameter, for example :

def addressParser(inString, returnType): 

(I would rather answer you on Gis.se, but I'll answer here it's not illogical regarding the end user side you need to enhance)

I suggest you have a look at Python Toolboxes making for Arcgis, or in the case you are using QGIS, Writing new Processing algorithms as python scripts. You will see the parameters of your script can also be issued from gui interfaces you can generate from within your code. You will then be able to use lists of values or check-boxes for example. Those check boxes would help passing variables into your script instead of putting them hard in the code.

If you have any problems with the way to make scripts, please read this related documents and dig the subject following this lead, try things in your software then post again (maybe rather in GIS.SE as it's arcpy related) for your precise question on the subject.

For a more general answer that fits this SE area, the important thing is that you need to find a way to create a GUI (Graphical User Interface) with external tools or build-in tools and pass on the parameter inside your code, depending on what the user has choosen.

Your script will then have more then one parameter, for example :

def addressParser(inString, returnType): 

After that, you will be able to use your "if ....then :" type condition check to know which value was chosen by the user prior to running the code.

Source Link

(I would rather answer you on Gis.se, but I'll answer here it's not illogical regarding the end user side you need to enhance)

I suggest you have a look at Python Toolboxes making for Arcgis, or in the case you are using QGIS, Writing new Processing algorithms as python scripts. You will see the parameters of your script can also be issued from gui interfaces you can generate from within your code. You will then be able to use lists of values or check-boxes for example. Those check boxes would help passing variables into your script instead of putting them hard in the code.

If you have any problems with the way to make scripts, please read this related documents and dig the subject following this lead, try things in your software then post again (maybe rather in GIS.SE as it's arcpy related) for your precise question on the subject.

For a more general answer, you need to find a way to create a GUI (Graphical User Interface) with external tools or build-in tools and pass on the parameter inside your code, depending on what the user has choosen.

Your script will then have more then one parameter, for example :

def addressParser(inString, returnType):