Hi, this is day 3 of my Python experience and what I have so far works but results in a disorganized, cluttered mess in my map document. I need to clean it up before I go any further and get things any more complicated. I suspect I will shove a lot of questions into one blog post so I will number them as I go to make responding easy.
I have been reading about the os package and arcpy.mapping and arcpy.env and workspaces and default GDBs and things.
Solved! Go to Solution.
1. Yes that is for getting input for a script tool.
2. You can set your workspace using arcpy.env.workspace here is a link for all environment controls ArcGIS Help 10.1
3. Not familiar enough with the os module to help unfortunately. I believe it can take a full file path
4. You can set a scratch workspace using the environment settings (See #2) as far as the rhyme or reason for a file going to scratch workspace vs default workspace, someone smarter can get to that.
5. You can set if outputs get added to map with environment settings (See #2) look for arcpy.env.addOutputsToMap
6. From what I know, no there is not.
7. Use arcpy.mapping.AddLayerToGroup to add a layer to a group layer
1. Yes that is for getting input for a script tool.
2. You can set your workspace using arcpy.env.workspace here is a link for all environment controls ArcGIS Help 10.1
3. Not familiar enough with the os module to help unfortunately. I believe it can take a full file path
4. You can set a scratch workspace using the environment settings (See #2) as far as the rhyme or reason for a file going to scratch workspace vs default workspace, someone smarter can get to that.
5. You can set if outputs get added to map with environment settings (See #2) look for arcpy.env.addOutputsToMap
6. From what I know, no there is not.
7. Use arcpy.mapping.AddLayerToGroup to add a layer to a group layer
2. The workspace is different from the default GDB though. If I save a raster output, it goes into the workspace. If I don't, it stays in the default GDB.
Thanks for your help!
1. You can try using raw_input()
3. Use os.path to construct and deconstruct file paths.