How would I set my current workspace as a user-definable parameter?

856
4
07-20-2018 02:19 PM
__17
by
New Contributor II
0 Kudos
4 Replies
DarrenWiens2
MVP Honored Contributor
__17
by
New Contributor II

I still find this confusing. Would I set my current workspace as this?: arcpy.env.workspace = arcpy.GetParameterAsText(0

0 Kudos
DarrenWiens2
MVP Honored Contributor

Probably I'm confused what you're looking for. Are you making a tool that takes a parameter, entered by the user, and sets the workspace environment? If so, then yes, arcpy.env.workspace = arcpy.GetParameterAsText(0) would make the workspace equal to the value entered in the first parameter slot. If not, what exactly are you trying to do?

0 Kudos
DanPatterson_Retired
MVP Emeritus

I'm with Darren on the confused bit... but I presume that this is related to

https://community.esri.com/thread/218315-if-one-of-the-tool-parameters-is-based-on-user-input-define... 

And Mapping Charting is probably not the place to get many responses dealing with toolboxes and/or code

Python‌ would be best

0 Kudos