|
POST
|
If I run the tool in Pro, then right click on the job in the History pane and "Copy Python Command" I came up with this, that seems to work in script. arcpy.management.CalculateGeometryAttributes(
in_features=out_data_py,
geometry_property="area AREA",
length_unit="",
area_unit="ACRES",
coordinate_system='PROJCS["NAD_1983_StatePlane_Kansas_North_FIPS_1501_Feet",GEOGCS["GCS_North_American_1983",DATUM["D_North_American_1983",SPHEROID["GRS_1980",6378137.0,298.257222101]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Lambert_Conformal_Conic"],PARAMETER["False_Easting",1312333.333333333],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",-98.0],PARAMETER["Standard_Parallel_1",38.71666666666667],PARAMETER["Standard_Parallel_2",39.78333333333333],PARAMETER["Latitude_Of_Origin",38.33333333333334],UNIT["Foot_US",0.3048006096012192]]',
coordinate_format="SAME_AS_INPUT"
) Does this work for you? R_
... View more
01-10-2024
01:41 PM
|
0
|
1
|
5266
|
|
POST
|
Sorry, didn't catch that you are adding from endpoint in your original post. If you are adding the service end point, it should have the symbology originally published with Pro as modifying in the visualization tab doesn't change the service/endpoint, rather saves that information in the item itself. If you modify the HFS in the visualization tab and want to see the 'new' symbology in the map, you need to add the 'item' to the map, not the service URL. Here is a map adding the REST URL (I have already created a new item from it and modified the symbology in the visualization tab, but the URL with have the original symbology): Then, if I load the 'item' that I modified the symbology in the visualization tab: R_
... View more
01-05-2024
01:54 PM
|
1
|
0
|
3948
|
|
POST
|
After changing the symbology in the visualization tab, did you "Save" the changes? R_
... View more
01-05-2024
01:04 PM
|
1
|
0
|
3962
|
|
POST
|
If you want to send as feature class, you just zip the File Geodatabase (General Parks Maps.gdb (which actually looks like a folder in Windows Explorer)). This will let you send the entire FGDB, including ALL the feature classes, tables, etc. that are in it. Or, r-click, new FGDB, copy/paste the desired feature class(s) into it, zip and send. R_
... View more
01-05-2024
09:43 AM
|
1
|
0
|
32143
|
|
POST
|
In my case, we don't have portal as of yet. Our 10.6.1 and 10.8.1 server, will not allow you to edit feature service without opening up to the world (and don't want public to be able to truncate/alter our data). we are using Window authentication, and ESRI tech support still can't figure out how to secure a feature service on our system. Another big reason is for display/interaction with the data. At this point, it I want to have my images (attachments) show in the popup in web app/ex, either need to have Portal or AGOL, as they have limited the popup config with MapServices to only allow list view. Users are used to seeing the image(s) in the popup itself without having to scroll down, click a link, open image in separate window. Among other things, but these two (mainly the first one) are work stoppers. R_
... View more
12-28-2023
01:01 PM
|
0
|
0
|
932
|
|
POST
|
Is the server separate from your desktop? If so, do yo have Pro (and thus python 3.x) installed on the server computer as well? R_
... View more
12-28-2023
12:46 PM
|
0
|
1
|
2817
|
|
POST
|
Yes, at least with python 3, if you set the maintain attachments and preserve global id's environment variable, then the attachments will be appended with the features (as long as they are enabled on the fc also) and will retain the existing Global ID's. I use this all the time. I published my SDE data to AGOL as hosted feature layer, have lots of editing on the AGOL version, run a script that looks at the Global ID's in my SDE data, and the AGOL data. Anything that is in the HFS, but not the SDE gets appended to the SDE so that I have a backup copy of the data, attachments and all (and, of course, one that responds much faster than any AGOL data). This, does NOT, however, work the other way. Seems there is no 'simple' way to copy data from SDE to AGOL with the attachments. R_
... View more
12-28-2023
12:43 PM
|
1
|
2
|
938
|
|
POST
|
Have not tried with tables, but for my HFS's, I make a list of the GLOBAL ID's in the HFS, and another list of the GLOBAL ID's in my SDE data. Then, if the GID is in the HFS, but NOT in the SDE data, add that to a separate list that I can iterate through later.(AddPostList). I then iterate through that list and append the data from the HFS to my SDE FC making sure to use the preserveGlobalIDs=True. L1Post = r"https://services3.arcgis.com/onlinesource/FeatureServer/1"
Post = r'Database Connections\SignDatabase.sde\SignsDatabase.DBO.Posts'
with arcpy.EnvManager(preserveGlobalIds=True, scratchWorkspace=r"\\pathto\scratch.gdb", workspace=r"\\pathto\Default.gdb"):
Post = arcpy.management.Append(inputs=[L1Post], target=Post, schema_type="TEST", field_mapping="", subtype="", expression="GlobalID IN ('" + '\',\''.join(AddPostList) + "')")[0] This will keep the GLOBALID and the attachments as it copies them into the SDE data. R_
... View more
12-27-2023
03:17 PM
|
0
|
0
|
1021
|
|
POST
|
You can also limit execution based on the edit type. if ($editcontext.editType == 'UPDATE') {
if(!IsEmpty($feature.ID)) {
return $feature.ID
}
} Will only fire if you are Updating an existing feature, can use "INSERT" to have it fire on new features. R_
... View more
12-27-2023
02:55 PM
|
1
|
1
|
3160
|
|
POST
|
I have had issues in the past trying to create offline areas with blank datasets. If by blank, you mean empty, try adding at least one 'dummy' feature to each featureclass, and save before trying to create offline areas. R_
... View more
12-27-2023
02:18 PM
|
0
|
0
|
2088
|
|
POST
|
Here is an attribute rule that I use for that: if(isempty($feature.ID) && $feature.Layer == "ST-DYCL"){
var vals = FeatureSetByName($datastore,"PW_Pro.DBO.Striping",['ID','LENGTH_FT'],false)
var DYCLvals = Filter(vals, "ID LIKE 'DYCL%'")
var numarray = []
for (var n in DYCLvals){
var nn = Number(Replace(n.ID, 'DYCL',''))
Push(numarray, nn)
}
var maxnum = Max(numarray)
var maxtext = Concatenate('DYCL',(Text(maxnum + 1, '00000')))
return maxtext
} My ID field for this data starts with "DYCL", so this filters for all values that start with that, strips(Replace) the DYCL from it and converts to a number, finds the max value, concatenates that back with the DYCL with incremented number and returns it. R_
... View more
12-27-2023
01:59 PM
|
1
|
1
|
2036
|
|
POST
|
I see that if I try to connect to a newer SDE version with older version of ArcMap. R_
... View more
11-01-2023
02:38 PM
|
0
|
0
|
1065
|
|
POST
|
Not sure if it meets your needs, but the post here by @JohannesLindner are working for me with attribute rules. R_
... View more
10-31-2023
10:32 AM
|
0
|
0
|
4071
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 05-14-2026 04:00 PM | |
| 1 | 09-14-2022 07:53 AM | |
| 1 | 09-14-2022 08:23 AM | |
| 1 | 05-21-2026 08:53 AM | |
| 1 | 05-14-2026 04:28 PM |
| Online Status |
Online
|
| Date Last Visited |
Wednesday
|