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-defined-using-the-getparameterastext-function-is-it-possible-to-use-f5-to-run-the-script-successfully
And Mapping Charting is probably not the place to get many responses dealing with toolboxes and/or code
Python would be best
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?
I still find this confusing. Would I set my current workspace as this?: arcpy.env.workspace = arcpy.GetParameterAsText(0)
See: GetParameterAsText—ArcPy Functions | ArcGIS Desktop
Signed in members can post, follow updates, and more. New here? Register a free account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.