Term
What are ways of getting error messages in arcpy |
|
Definition
arcpy,AddMessage arcpy.AddWarning arcpy.AddError |
|
|
Term
What are ways of error checking |
|
Definition
Specific Nonspecific License checking |
|
|
Term
What does GetMessage do? arcpy.GetMessage(0) |
|
Definition
|
|
Term
What does GetMessage do? arcpy.GetMessage(1) |
|
Definition
|
|
Term
What does GetMessage do? arcpy.GetMessage(2) |
|
Definition
|
|
Term
What does GetMessage do? arcpy.GetMessage() |
|
Definition
gets messages, warnings and errors |
|
|
Term
What do these commands do? arcpy.CheckExtension |
|
Definition
checks if the license is available to be checked out |
|
|
Term
What do these commands do? arcpy.CheckOutExtension |
|
Definition
retrieve and lock an extension from the license manager |
|
|
Term
What do these commands do? arcpy.CheckInExtention |
|
Definition
returns a license to the license manager |
|
|
Term
|
Definition
Returns a string of all messages from the last geoprocessing tool executed |
|
|
Term
|
Definition
Filters based on error severity |
|
|
Term
|
Definition
|
|
Term
|
Definition
|
|
Term
|
Definition
|
|
Term
|
Definition
returns all messages, warnings, and errors |
|
|
Term
|
Definition
to see if a license is available to be checked out |
|
|
Term
arcpy.CheckOutExtension() |
|
Definition
to retrieve, and lock, a license from the license manager |
|
|
Term
|
Definition
to return a license to the license manager |
|
|
Term
|
Definition
A flexible object that can be used as input for a multivalue parameter |
|
|
Term
What are methods used for? |
|
Definition
add/remove rows get/set values |
|
|
Term
what does: from arcpy.sa import* |
|
Definition
|
|
Term
|
Definition
A method is a function within a class |
|
|
Term
How do you return a value for a function? |
|
Definition
def test_value ( number ): if number == 1 : outputs = ' Value is 1 ' return outputs else: outputs = ' Value is not 1 ' return outputs |
|
|
Term
How do you create an instance of a Class? |
|
Definition
By assigning a variable name to it. x = MyClass() |
|
|
Term
What can you do with the arcpy.mapping module? |
|
Definition
Allows you to open and manipulate ArcMap map documents (.mxd) and layer files (.lyr). You can open map documents and layers; query and alter the contents; and print, export, or save a modified document. manipulate maps, layouts, and layers through Python scripting |
|
|
Term
How can you get a list of dataframes for selection? |
|
Definition
dfList = arcpy.mapping.ListDataFrames(mxd) dfList = arcpy.mapping.ListDataFrames(mxd, "*") |
|
|
Term
Code example from exam review: import arcpy mxd = arcpy.mapping.MapDocument(“ïnput.mxd”) df = arcpy.mapping.ListDataFrames(mxd) df.scale = 24000 df.rotation = 2.7 for lyr in arcpy.mapping.ListLayers(mxd): if lyr.name == “landuse”: lyr.visible = True lyr.showLabels = True lyr.saveACopy(“output.lyr”) mxd.save() del mxd
What is the name of the mxd? |
|
Definition
|
|
Term
Code example from exam review: import arcpy mxd = arcpy.mapping.MapDocument(“ïnput.mxd”) df = arcpy.mapping.ListDataFrames(mxd) df.scale = 24000 df.rotation = 2.7 for lyr in arcpy.mapping.ListLayers(mxd): if lyr.name == “landuse”: lyr.visible = True lyr.showLabels = True lyr.saveACopy(“output.lyr”) mxd.save() del mxd
what does the for loop do? |
|
Definition
iterates through a list. “Checks for layer called landuse then turns on labels and visibility then saves a copy to output.lyr” |
|
|
Term
|
Definition
Releases memory stoarge of .mxd |
|
|
Term
When can you use “CURRENT” in arcpy.mapping? |
|
Definition
“when you are working with ArcMap session only” |
|
|
Term
When you update some Map Frame parameters in arcpy, will the changes appear automatically? |
|
Definition
“No, you need to update/refresh the screen: arcpy.RefreshActiveView() arcpy.RefreshContents() |
|
|
Term
With respect to dataframes What is the purpose of [0]? |
|
Definition
to get the first list element from the list generated by ListDataFrames: df = arcpy.mapping.ListDataFrames(MXD)[0] |
|
|
Term
|
Definition
-always the first function / method -is a constructor, it runs to create an instance of a class |
|
|
Term
What is a widget in Tkinter? |
|
Definition
The generic term for any of the building blocks that make up a GUI application. These include things like windows, buttons, menus, menu items, drop-down lists, scroll bars |
|
|
Term
What is an event handler in Tkinter? |
|
Definition
Routine that does the work of the GUI... or a callback routine that handles input received in a script
- code executed when an event occurs - binding associates this event handler with a widget.
events include:
etc. |
|
|
Term
What is the purpose of packing? |
|
Definition
To orientate button placement. The default is to "pack" buttons (widgets) one above the other Packing options are LEFT, RIGHT, TOP, and BOTTOM
To orientate button placement. The default is to "pack" buttons (widgets) one above the other Packing options are LEFT, RIGHT, TOP, and BOTTOm To orientate button placement. The default is to "pack" buttons (widgets) one above the other Packing options are LEFT, RIGHT, TOP, and BOTTOM Also, to tell tTkinter that we want to display the widget onscreen |
|
|
Term
|
Definition
a widget, a variable name that references to an instace or a tkinter Button Class |
|
|
Term
|
Definition
A Tkinter class used to create button widgets. |
|
|
Term
How do you define a global variable |
|
Definition
use the folling syntax: global variable_name |
|
|
Term
|
Definition
This is a widget is a standard Tkinter widget used to display a list. can only contain text items, and all items must have the same font and colour. |
|
|
Term
What are some parameters of a listbox? SINGLE |
|
Definition
(just a single choice. Default mode.) |
|
|
Term
What are some parameters of a listbox? BROWSE |
|
Definition
(same as SINGLE, but the selection can be moved using the mouse) |
|
|
Term
What are some parameters of a listbox? MULTIPLE |
|
Definition
(multiple items can be chosen, by clicking on them one at a time) |
|
|
Term
What are some parameters of a listbox? EXTENDED |
|
Definition
(multiple ranges of items can be chosen, using the Shift + Control keys) |
|
|
Term
How does a scrollbar work? |
|
Definition
When the widget view is modified, the widget notifies the scrollbar by calling the set method. And when the user manipulates the scrollbar, the widget’s yview method is called with the appropriate arguments |
|
|
Term
|
Definition
Used to enter text strings User can only enter one line of text, to enter multiple lines you would have to use the Text widget |
|
|
Term
How do you apply symbology to a feature class? |
|
Definition
ApplySymbologyFromLayer_management (in_layer, in_symbology_layer) |
|
|
Term
|
Definition
Simple, Intuitive, respects common conventions, visually organized, native look
SIRCCVON |
|
|
Term
|
Definition
Treats a frame as a table |
|
|
Term
What are some grid parameters? |
|
Definition
column, columnspan, ipadx, ipady, padx, pady, row, rowspan, sticky |
|
|
Term
What are sticky parameters? |
|
Definition
Cardinal Directions (i.e. N, S, E, W, NE, etc) |
|
|
Term
How do sticky parameters work? |
|
Definition
Can combine directions i.e. N + S → stretches widget out vertically across the cell i.e. E + W → stretches widget out horizontally across the cell |
|
|
Term
How do you assign a title to a Tkinter menu? |
|
Definition
define your title in your local variables:
then below where you make an instance of your root: |
|
|
Term
What kind of layout elements can you select? |
|
Definition
GraphicElement: groups of elements, inserted tables, graphs LegendElement: MapsurroundElement: North Arrow, scale text, and scale bar TextElement: inserted text, callouts, rectangle text, titles etc PictureElement: a raster or image that has been inserted into a page layout (logo) |
|
|
Term
What kind of changes can you apply to layout elements? |
|
Definition
- change elem position X/Y (note units are set as inches... so divide by 2.54 for cm) - can change string values of text elements - can add or remove items in the legend (partially through layer management) |
|
|