POST
|
Can someone please let me know how to apply the 'Unique' filter to a field of a FGDB feature class (with multiple identical values), used as an 'Item to Row' GTE in my layout? Thanks, Panagiotis
... View more
10-09-2015
02:44 AM
|
0
|
0
|
2667
|
POST
|
Hello everyone, I am writing a Python script tool in a custom toolbox and I want to customize its behavior. At this point I want to enable or disable two parameters of my script. When I use the following code, it runs smoothly. def updateParameters(self): """Modify the values and properties of parameters before internal validation is performed. This method is called whenever a parameter has been changed.""" # Enable/disable map's reformation date inputs if (self.params[1].value == "Partial Ratification") \ or (self.params[1].value == "Total Ratification"): self.params[7].enabled = 1 self.params[8].enabled = 1 else: self.params[7].enabled = 0 self.params[8].enabled = 0 return However, when I change the latin characters into greek characters in my conditional expression (see below), I get the following message. Warning: Encoding file "<filename>.py" using "ascii" encoding will result in information loss. Do you want to proceed? def updateParameters(self): """Modify the values and properties of parameters before internal validation is performed. This method is called whenever a parameter has been changed.""" # Enable/disable map's reformation date inputs if self.params[1].value != "αβγ": self.params[7].enabled = 1 self.params[8].enabled = 1 else: self.params[7].enabled = 0 self.params[8].enabled = 0 return Any help would be highly appreciated! Best regards, Panagiotis
... View more
08-26-2015
06:37 AM
|
0
|
0
|
2668
|
POST
|
Hello Joshua, You are right, I was thinking that the tuple of a feature's centroid X&Y coordinates could be replaced by a Point object (which stores coordinate pairs of X&Y values). And yes, the code works when I updated Line 15 to: row[0] = (306400, 4098400) However, for some funny reason, it works fine when running the script for a point feature class . Anyway, thanks a lot, it really cleared things up! Best regards, Panagiotis
... View more
05-12-2015
03:17 AM
|
0
|
0
|
282
|
POST
|
Hello Darren, I am not trying to create a line feature class, but rather shift a feature of it. Both point and line feature classes already exist. And, yes, "OBJECTID = 4" is a valid expression in both cases. Regards, Panagiotis
... View more
05-11-2015
03:11 PM
|
0
|
4
|
1321
|
POST
|
Hello everyone, I am new to Python and ArcPy. I am testing the script below which is running for a point feaure class, but not for a line feature class. import arcpy arcpy.env.workspace = r"D:\Student\PYTH\6_Geometry_objects\SanDiego.gdb" # Variables featClass = "MajorAttractions2" fields = ["SHAPE@XY"] exp = "OBJECTID = 4" pnt = arcpy.Point() pnt.X = 306400 pnt.Y = 4098400 with arcpy.da.UpdateCursor(featClass, fields, exp) as cur: for row in cur: row[0] = pnt cur.updateRow(row) print "Script completed" In the latter case, I am getting the following error message: "exceptions.SystemError: error return without exception set" for line 16. Thank you in advance, Panagiotis
... View more
05-11-2015
05:44 AM
|
0
|
11
|
7262
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:24 AM
|