Tag Info

Hot answers tagged

3

I'm no expert with character encoding, but I believe Python's interpreter converts your input source to ASCII which is why using triple quotes and the r string prefix aren't having any effect. What you need to do is use Python's Unicode escape characters and the hexadecimal code for mu, as described in the Unicode HOWTO page. According to the Unicode ...


2

When running something like this in a Toolbox Tool, you indeed want to use Tool Validation. For example: class ToolValidator: """Class for validating a tool's parameter values and controlling the behavior of the tool's dialog.""" def __init__(self): """Setup arcpy and the list of tool parameters.""" import arcpy self.params = ...


2

I think Hornbydd is right; instead of MakeFeatureLayer_management I think what you want to be using is CreateFeatureclass_management instead with an in_memory location. I'm not sure what further processing you want to do, but here's a quick replacement for your MakeFeatureLayer: linefc = CreateFeatureclass_management("in_memory", templines, "POLYLINE") ...


1

I think your loop at the end is the problem. You will go though your list of matched flags, and for each one select the exp then switching then for the next item you would add the matched and switch again. You may want to simply move the switch selection out of the loop, that way you will select everything in matched then switch. Alternatively you could ...



Only top voted, non community-wiki answers of a minimum length are eligible