POST
|
Hi, I put this together quickly using Pro but I'm pretty sure it should run from the Python window in ArcMap too: fishnet = "" #layer name goes here fieldname = "" #name of field storing new value (1, 2) fields = [ "SHAPE@Y" ] . append ( fieldname ) ys = [ row [ 0 ] for row in arcpy . da . SearchCursor ( fishnet , "SHAPE@Y" ) ] ysDict = { } uniqueys = sorted ( list ( set ( ys ) ) ) for y in luniqueys : if luniqueys . index ( y ) % 2 == 0 : ysDict [ y ] = 1 else : ysDict [ y ] = 2 with arcpy . da . UpdateCursor ( fish , [ "SHAPE@Y" , "val" ] ) as ucur : for row in ucur : row [ 1 ] = valueDict [ row [ 0 ] ] ucur . updateRow ( row ) Just enter in the name of the layer and the field name that stores the values (1 or 2) in there. Also make sure that field is an integer field. Basically this script finds all the features unique y values, lays them out in order and assigns them a 1 or 2 depending on if its index is odd or even, then adds that value back to the feature.
... View more
09-23-2020
02:20 AM
|
3
|
1
|
187
|
POST
|
Hi, I think this could work by putting the two login methods in a try-except statement. Something like this: try : # first attempt to login using notebook specific home gis = GIS ( "home" ) except : # otherwise login using active portal in pro gis = GIS ( "pro" ) I'm pretty sure running GIS("home") outside of ArcGIS Notebooks will throw up an error, allowing this switch to work.
... View more
09-14-2020
03:16 AM
|
1
|
1
|
125
|
POST
|
Glad that worked out Hailey! If you're happy with the answer mark this question as solved to close it off
... View more
09-10-2020
12:53 AM
|
0
|
0
|
131
|
POST
|
Hi Max, Isn't the layer you've added in this recent screenshot also from a feature dataset? I don't see exactly how this is different to the original screenshot, as it's also using Feature Class to Shapefile (Multiple). Try copying one of those feature classes up a level so it's not within a feature dataset, just within the geodatabase, and see whether the Feature Class to Shapefile (Multiple) tool works on it?
... View more
09-09-2020
01:39 AM
|
0
|
1
|
128
|
POST
|
Hi Max, Might the issue be that the feature classes are within feature datasets?
... View more
09-08-2020
02:11 PM
|
1
|
0
|
128
|
POST
|
Hi Hailey, Overlay tools (Union, Intersect etc.) can be run with a single input to find self-overlaps, which may very well help out with what you're trying to do! How Intersect works—ArcGIS Pro | Documentation How Union works—ArcGIS Pro | Documentation I imagine in this case you would want to use Intersect! Worth running it and seeing what the output looks like.
... View more
09-08-2020
02:07 PM
|
1
|
0
|
131
|
POST
|
Hi, I can't explain exactly why it's giving different results, but in your arcade expression you're returning the full value instead of the rounded value. In your IIF statement if you replace the second $feature.Contour (after the "0,") with round( $feature.Contour, 1) it might do what you're wanting.
... View more
09-03-2020
03:20 AM
|
1
|
1
|
139
|
POST
|
Hi Mark, You should be able to do this by using Python CIM access Python CIM access—ArcGIS Pro | Documentation . You can get the layout definition using layout.getDefinition() (see here: Layout—ArcGIS Pro | Documentation), make your tweaks and then update the layout definition with layout.setDefinition(newdefinition). Extent indicators are associated with CIMMapFrame elements in "extendIndicators", and have an "isVisible" attribute that you can switch from "true" to "false" to turn them off.
... View more
08-21-2020
07:35 AM
|
0
|
1
|
89
|
POST
|
I also noticed that for the first time today, that CTRL-F isn't case sensitive! Glad I could help out though mate.
... View more
08-20-2020
12:25 PM
|
0
|
0
|
593
|
POST
|
Seems like the easiest way to find out what it's doing is to just print out the results of soup . find_all ( string = re . compile ( "COVID-19" ) ) right? Seems that the function returns a list of all matches, so you could just do something like the following: matches = soup . find_all ( string = re . compile ( "COVID-19" ) ) for match in matches : print ( match ) Also I had a bit of a peek at that webpage, and I think in some places it references "Covid-19" and in others "COVID-19", which with your regular expression would only return the latter.
... View more
08-20-2020
08:13 AM
|
1
|
2
|
593
|
Online Status |
Offline
|
Date Last Visited |
12-20-2020
08:40 AM
|