|
POST
|
I see a basic flaw in your model. Golden rule is EVERYTHING runs as many times as the iterator loops. EVERYTHING means stuff feeding into the iterator and unconnected parts of your model with or without preconditions. So knowing that fact, what do you think your create file geodatabase tool is doing? It's creating the database X number of times... The solution is to embed models within models. Have a master model with your create file geodatabase tool acting as a precondition to a sub-model. The sub-model containing the iterator and connecting logic. You then run the master model. Create geodatabase runs ONCE then logic feeds into sub-model with it's iterator. Refer to help file on topic of embedding models. You'll need to take this approach if you also want loops within loops.
... View more
09-26-2023
04:25 AM
|
0
|
1
|
2990
|
|
POST
|
Hard to say, you reference software that was made obsolete more than 20 years ago! So shapefiles are more than 20 years old. How ArcPro reconciles precision may be quite different to software that was built 20 years ago, especially as data formats have matured, such as the file geodatabase. I would always recommend using shapefiles as a last resort and use file geodatabases as they are superior in their functionality and storage capacity. I would imagine the article is still relevant to shapefiles, a format that is now over 20 years old.
... View more
09-26-2023
04:15 AM
|
2
|
1
|
6169
|
|
POST
|
I'm really surprised that you can have a featureclass inside a featuredataset with the same name as the featuredataset. As a first test try renaming the DT featureclass to something else then run your code, what do you get then?
... View more
09-26-2023
03:58 AM
|
0
|
3
|
1881
|
|
POST
|
The help page I pointed you to in your cross post explains the adding of a table to layout is a one-time step and you can't update it. Table Frames are much improved in ArcPro,
... View more
09-26-2023
03:51 AM
|
0
|
0
|
1228
|
|
POST
|
I recently discovered some software called scalene that is supposed to examine the efficiency of your python code. I managed to get it to work with a simple "stand alone" python script which I show below: from scalene import scalene_profiler
scalene_profiler.start()
for i in [1,2,3,4,5,6,7,8,9]:
print(i*10)
scalene_profiler.stop() You get scalene to work by running it from command line, this I show below: C:\Users\hornb\AppData\Local\ESRI\conda\envs\arcgispro-py3_Spyder>python.exe -m scalene C:\Scratch\testscalene.py I'm developing some rather meaty python tools that are embedded in an atbx toolbox which require the user to run the tools from within ArcPro as they need to choose layers from a map. I've not used a profiler before and can't see a way to use it if the python code is embedded in a toolbox and you some how need to call scalene from a command line prompt. I was wondering if any ArcPro python developers out there have tried to use such software and got any advice\pointers\pearls of wisdom?
... View more
09-25-2023
09:14 AM
|
0
|
3
|
4202
|
|
POST
|
I've been exploring this problem and it appears to be an issue with the number of unique values. I need to symbolise 13,000 values and this could easily be more. The GUI handles it but when I set it to be an UniqueValueRenderer in arcpy it blows up with a misleading error message. The property sampleSize does not appear when accessing the renderer properties (that sees like a cosmetic bug to me) as I can set it, but it has no affect. I wondered about going down the CIM route but because the object model is not clear and there appears to be zero examples anywhere on the internet of setting the symbology of a layer to be unique values using CIM in arcpy it is impossible for me to test my code as EVERYTIME I try something ArcPro crashes throwing me out into Windows... It would be good if esri released some code samples of using CIM to create an UniqueValueRenderer in arcpy. All I have seen on the internet are c# solutions. Quite frustrating.
... View more
09-11-2023
11:47 AM
|
0
|
1
|
4545
|
|
POST
|
Your script logic looks sound but its how you are reference the inline variable that is the issue. Your calculate value tool - don't name its output with 1) a database reserved word and 2) with %% around it. Call it something like myDate. If you had renamed the output to %bob% then you would need to reference it as %%bob%%.
... View more
09-07-2023
06:33 AM
|
0
|
0
|
1178
|
|
POST
|
I would try running the model up to the copy feature tool then attempt to add the new dataset manually in Arcpro to a map, may be that will give you some insight into why the clip tool cannot open it? For example may be you have copied nothing...?
... View more
09-07-2023
06:27 AM
|
0
|
0
|
3234
|
|
POST
|
You say the Clip tool is unable to open the output of the Copy Features tool? What is the error message? What is the output path? The fact the model has coloured up suggests this input to clip tool is valid.
... View more
09-07-2023
04:52 AM
|
0
|
1
|
3297
|
|
POST
|
Your image seems to be showing census areas, these polygons will exist already, suggest you search the relevant city authority. As its USA data have you looked at the Living Atlas? I've not done much feature extraction but you have roads, labels, coloured dots in the mix and I would imagine extraction in some automated way would be messy?
... View more
09-07-2023
04:03 AM
|
0
|
0
|
1757
|
|
POST
|
This sounds like a Nuance Power PDF issue, have you tried contacting their support page?
... View more
09-07-2023
03:57 AM
|
0
|
0
|
1357
|
|
POST
|
Unless the change detection wizard requires your data to be projected you can probably leave your data in a WGS84 coordinated system and use it without projecting. 30m at the equator is 0.000269 in decimal degrees, you can have a play using this web page. If you are attempting to report change in m2 then you are best projecting your raster into a coordinate system where the units are in metres and not decimal degrees. Summary lengths /area will make more sense. You'll need to do a little research for what's best for mapping area in the region of Moreton Bay, Queensland.
... View more
09-07-2023
03:50 AM
|
1
|
0
|
1936
|
|
POST
|
Hi, Did you find a solution to this? I'm developing some code in Arcpro 3.1.3 and I too get the same vague error. I've tried running it in the python command line window as well as notebook. I've also saved the project, re-opened it with the layer in it and tried running the code below. The layer exists, so its not a broken layer,there is sensible data in it and SubNetID field exists. If I go to the Symbology panel in ArcPro and set it to unique value, subnetid, then it all uniquely colours so I know the dataset is OK. Dare I say it that ESRI have somehow broken this with an update? My code is simply: aprx = arcpy.mp.ArcGISProject("Current")
aprxMap = aprx.listMaps("Map")[0]
layer = aprxMap.listLayers('Sub1000_3')[0] # This layer was initially loaded into the map as a single symbol
aSymbology = layer.symbology
aSymbology.updateRenderer('UniqueValueRenderer')
aSymbology.renderer.fields = ["SubNetID"]
p = arcpy.mp.ArcGISProject("CURRENT")
cr = p.listColorRamps("Basic Random")[0]
aSymbology.colorRamp = cr
layer.symbology = aSymbology It fails on line 6 with NameError: The attribute 'fields' is not supported on this instance of UniqueValueRenderer. Trying to think out of the box, you could argue the renderer has not been given any values to render but it seems to be a chicken and egg situation, how can I give it values when the first step is to say which field you want to render on, but its that line it fails on! I've tagged a few of python gurus into this to see if they can identify the issue: @DanPatterson_Retired , @curtvprice , @XanderBakker , @jcarlson , @JoshuaBixby
... View more
09-05-2023
04:59 PM
|
0
|
0
|
4576
|
|
POST
|
Unless I've missed some point, seems like overkill the way you are doing it, why not simply call the power tool directly, see python code sample here.
... View more
08-31-2023
07:56 AM
|
0
|
0
|
2428
|
|
IDEA
|
Some tools when added to modelbuilder have 2 or more outputs, a good example is the Select Layer By Attribute, you have the layer with the selection and a count of the number of selected. Often I do not need to use the count and I find it clutters up the model. It would be nice to be able to right click on it and hide it. This is opposite to right clicking on a tool and exposing a parameter, within the model. So at the moment we can expose parameters but we cannot hide derived outputs when not needed.
... View more
08-31-2023
04:25 AM
|
3
|
1
|
1370
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 07-03-2026 07:31 AM | |
| 3 | 06-29-2026 05:17 AM | |
| 1 | 02-15-2023 05:45 AM | |
| 1 | 06-16-2026 02:37 AM | |
| 1 | 06-15-2026 08:29 AM |
| Online Status |
Offline
|
| Date Last Visited |
4 weeks ago
|