Tag Info

New answers tagged

3

You are collecting the extents for each polygon correctly, but need to zoom to them within the loop, or a later loop depending on what you want to do. For example to zoom in the same loop as the search cursor e.g. with arcpy.da.SearchCursor(SelLayer,"SHAPE@") as SCur: for feat in SCur: # I'm going to assume polygon/polyline ...


2

Unfortunately, it is not possible to "reload" the Python add-in while having the ArcMap session open. This is because the add-in is loaded into the program cache. So, the only way to see the changes done is to close ArcMap, install a new add-in and then start ArcMap (as you approach it now). You should spend most of your time debugging and developing the ...


0

Here is a Python toolbox to create an assortment of perpendicular lines at various places along the line including starts and end points: ftp://lnnr.lummi-nsn.gov/GIS_Scripts/createperpendicularlines.zip


1

Thank you everyone for the responses. so much better than geonet. I was able to look like a maniac with the below code. class ComboBoxClass1(object): """Implementation for addin2_addin.combobox (ComboBox)""" def __init__(self): self.editable = True self.enabled = True self.dropdownWidth = 'W' * 16 self.width = 'W' * ...


0

To get at the value from your ComboboxClass1 value, you need to look in the config.xml for that class and whatever is after the period is what you need to reference. Since you have more than one combobox I think you would want to make sure these classes have unique names after to period when you set up the Add-In. EDIT: That being said, you do not want ...


4

You can try Feature Vertices To Points tool to extract start and end points of a polyline then apply this tool Station Lines Arc10.0, to generate perpendicular line along these points.


1

The following code produces a tab delimited txt file: #Create python list createopts=["SEPARATOR=TAB"] #Use list in QgsVectorFileWriter QgsVectorFileWriter.writeAsVectorFormat(inputLayer, "D:/dstest/my_csv", "CP1250", None, "CSV", True, "", "", createopts) Thanks to @underdark for helping with this. Ian



Top 50 recent answers are included