POST
|
@DanPatterson Define Projection might also be used if the dataset has a incorrect coordinate system defined Define Projection. At this point in the add-in, there's no data in the dataset or the featureclasses, so the Project tool is not of any use. One workaround as I see it might be to create a new geodatabase and import the correct xml-schema for the coordinatesystem.
... View more
09-03-2025
11:40 PM
|
0
|
1
|
450
|
POST
|
I have a filegeodatabase containinig a dataset and some featureclasses. The dataset is originally created with the spatial reference ETRS 1989 UTM Zone 32N. One of the features in the add-in is to change the spatial reference of this dataset based on some values from a list. The code runs the "Define Projection" tool and the dataset is being updated with the new spatial reference. ETRS 1989 UTM Zone 32N to ETRS 1989 UTRM Zone 33N (or 35N). When I try to get the spatial reference of one of the featureclasses through ArcGIS Pro SDK: await QueuedTask.Run(() =>
{
using (Geodatabase geodatabase = new Geodatabase(new FileGeodatabaseConnectionPath(uri)))
using (FeatureClass featureClass = geodatabase.OpenDataset<FeatureClass>("JSRGrensepunkt"))
{
var featureclassDefinition = featureClass.GetDefinition();
var sr = featureclassDefinition.GetSpatialReference();
/* more code ...*/
}); GetSpatialReference() returns the original spatial reference (32N) and not the current one (33N): If I look at the same featureclass in ArcGIS Pro, I can see that the featureclass indeed is in 33N: What might be wrong here?
... View more
09-03-2025
04:08 AM
|
0
|
3
|
517
|
POST
|
I figured it out myself. The problem actually had to do with one of our ArcGIS Pro Addins. The addin was overriding the event ProjectOpenedAsync for checking some map-names in the project. When I changed the code to using the event ProjectOpened, it works perfectly.
... View more
05-27-2025
05:20 AM
|
0
|
0
|
257
|
POST
|
My organization is about to deploy ArcGIS Pro as Citrix Published Application. I've done some testing of our workflows and the main workflows works fine. However I came across a problem when using project templates for some of our test users. When creating a new project (Project A) from a project template from ArcGIS Online in the ArcGIS Pro start screen, some of the testusers got this errormessage After that message, ArcGIS Pro was unable to open any other project until it's restarted. When ArcGIS Pro is restarted, the project created (Project A) is opened correctly. When trying to create a new project from a project template (with a existing project opened), the project is created and opened correctly. After some testing, it appears that the Documents-folder is being redirected to the user's OneDrive. After stopping the redirect, the project templates works fine. When using a project template, the template is unpacked in a given folder shown in ArcGIS Pro -> Options -> Share and Download. The default is xyz\ArcGIS\Packages. Before we stopped the redirect, I tried to change the unpacking folders to a folder not connected to OneDrive. The same shown above error occurs, even when the unpacking folders are not related to OneDrive, the project template is loaded from a folder not related to OneDrive, and the project is created on a folder not related to OneDrive. So what's going on? I would assume that the project should be created and opened correctly when none of the latter folders are connected to OneDrive, but it doesn't. What might be the cause of this? Are there other folders that's being used?
... View more
05-14-2025
01:46 AM
|
0
|
1
|
359
|
POST
|
I have developed an ArcGIS Pro Add-in that allows users to insert several preconfigured elements into the layout. These elements are constructed using the ArcGIS Pro SDK. I need the font size of the text elements to adjust based on the layout page size. To achieve this, I created a class called "Ark" (Norwegian for "Page") which contains functions to determine the page type (A0, A1, etc.) based on the layout page's height and width, and return the correct font size. This works fine when the user selects a page size from the Layout -> Size dropdown. However, if the user selects "Page from printer," the height and width values are incorrect. For example, if the user selects ISO A4 portrait, the height should be 297 mm and the width 210 mm. But when using "Page from printer," the values returned from Layout.GetPage() are 286 mm (height) and 202 mm (width), even though the page chosen in the printer preference is ISO A4. Why do I get these differences?
... View more
01-31-2025
05:53 AM
|
0
|
0
|
291
|
POST
|
@Luke_Pinner, you're absolutely right! I compressed the actual folder and not the contents within that folder. Thank you! 🙂
... View more
11-04-2024
11:58 PM
|
0
|
0
|
719
|
POST
|
I've been trying to use the workaround for BUG-000158615 which envolves extracting a the project template, make changes and recompress it. However, I get an error using the updated version of the project template. This is the workaround I've tried: 1.rename the aptx to zip 2. extract the zip file using 7zip 3. make changes 4. compress it to zip using 7zip 5. Rename the zip to aptx. When I try to use the edited project template, I get an error saying that the project file does not exist. Has anyone succeeded using a "recompressed" aptx file?
... View more
11-04-2024
01:01 AM
|
0
|
3
|
793
|
POST
|
Hi. I'm struggeling with an attribute rule (Calculation) in ArcGIS Pro. I have a two featureclasses in a filegeodatabase (Vegteig - polygon, Tilknytningspunkt - point). The polygonclass has an ID (Teig_ID) which is used as a foreign key in the point class. When I delete a polygon, I want the corresponding point to be deleted as well. I've created an attribute rule on the polygonclass which triggers on delete and have turned on "exclude from application evaluation". // henter teig_id fra tilknytningspunkt som slettes
var teig_id = $feature.Teig_ID
var fs_tilknytningspunkter = FeatureSetByName($datastore, "Tilknytningspunkter", ["GlobalID", "TEIG_ID"])
var tilknytningspunkt = First(Filter(fs_tilknytningspunkter, "TEIG_ID=@teig_id"))
Console(tilknytningspunkt)
var deleteList = []
if(tilknytningspunkt == null){
return
}
else{
var delete = {'globalId': tilknytningspunkt.GlobalID}
Push(deleteList, delete)
}
Console(deleteList)
return
{
'edit': [{
'className': 'Tilknytningspunkter',
'deletes': deleteList
}]
} This code seems to be working fine, as it's verified ok and I can see that point is being selected in the output to console. The problem is that the delete it self is not executed. The polygon is deleted, but the poit still remains. Can anyone see what's wrong?
... View more
10-04-2024
05:17 AM
|
0
|
3
|
1068
|
POST
|
@DavidSolari @MatthewDriscoll I've done some more testing on this issue, and I found a workaround. In ArcGIS Pro 3.3 we need to use ordinary concatination and not f-string, even though f-formating worked ok in ArcGIS Pro 3.2. I was using a f-string in a where_clause for SelectLayerByAttribute, and in my first test I tried changing this into a new variable with f-string. When running the tool, the variable str_punktid was ok but the clause was wrong (see the picture) When changing to ordinary string concatination, it works fine:
... View more
08-27-2024
01:11 AM
|
0
|
0
|
1001
|
POST
|
Thanks for the reply. I think the issue is related to the tool "Consolidate Toolbox" which is run when publishing both web tool and projecttemplates, since I get the same error running that tool. The issue started after upgrading to 3.3, and it works fine with 3.2 and f-formating. With 3.2, none of these variables are replaced by g_ESRI_variables. I've also tried the other kind of formating, with the same result.
... View more
08-26-2024
01:49 AM
|
0
|
0
|
1038
|
POST
|
Hi. I have created a toolbox (.atbx) which contains several pythonscripts, which I'm using in a project template. The projects created from the project template has been working fine, and all the tools runs ok. But this week I did some refactoring in a script and created a new project template. The script is tested and runs ok. But it doesn't work in projects based on the new project template. In my script I have this code def beregnKortesteVeg(self, punktid, startpunktid, tilknytningspunkter, traceLayer):
fl_tilknytningslinje = r"memory/Tilknytningslinje"
fl_points = "points"
tmp_featurelayer = "tmp_featurelayer"
str_punktid = f"({punktid},{startpunktid})"
arcpy.SelectLayerByAttribute_management(in_layer_or_view=tilknytningspunkter,
selection_type="NEW_SELECTION",
where_clause=f'"OBJECTID" IN {str_punktid}') When looking at the script after the packaging of the project, str_punktid and the where_clause has changed. The code has been subsituted with several ESRI_variables: g_ESRI_variable_4 = '('
g_ESRI_variable_5 = '"OBJECTID" IN '
def beregnKortesteVeg(self, punktid, startpunktid, tilknytningspunkter, traceLayer):
fl_tilknytningslinje = r"memory/Tilknytningslinje"
fl_points = g_ESRI_variable_2
tmp_featurelayer = g_ESRI_variable_3
str_punktid = g_ESRI_variable_4punktid},{startpunktid})"
arcpy.SelectLayerByAttribute_management(in_layer_or_view=tilknytningspunkter,
selection_type="NEW_SELECTION",
where_clause=g_ESRI_variable_5str_punktid}') These variables (str_punktid and the where_clause) has been the same in all versions of the script and has not changed. Last time I created a working project templated was with ArcGIS Pro 3.2.x, and now I've upgraded to 3.3. In the last version (3.2) these variables was not replaced with ESRI_variables. Are there any changes to this in 3.3? Has anyone any resources on what the packaging does and why some variables are replaced with ESRI_variables?
... View more
08-23-2024
05:01 AM
|
1
|
4
|
1130
|
POST
|
In one of my projects I have a point featureclass containing points which should be used for tracing a Trace Network. The trace network has simple edge. When looking at the documentation of the Trace-tool Trace (Trace Network) the parameter starting points needs to be a feature layer. I've also created a pythonscript which does the tracing. Steps in the pythonscript: 1. Selects two point features from the point featurelayer (featureclass) 2. Creates a FeatureLayer based on these to points 3. Runs the trace with the Trace tool When running this script I get this error: ERROR 002512: Shortest path requires two starting points. There are indeed selected two points and each point is snapped to the roads (edges). When adding an additional step to the script, that creates a featureclass containing the two points and creating the featurelayer based on this featureclass, it works. Do I actually need to have a featureclass for the points in the shortest path analysis and not only a featurelayer based on a selection?
... View more
04-10-2024
02:00 AM
|
0
|
0
|
755
|
POST
|
I've added an idea for this functionality: Folder structure in project template - Esri Community
... View more
03-08-2024
04:46 AM
|
0
|
0
|
1157
|
IDEA
|
@NaicongLi Are there any updates on this idea from ESRI?
... View more
03-08-2024
04:08 AM
|
0
|
0
|
1421
|
Title | Kudos | Posted |
---|---|---|
1 | 01-17-2023 03:13 AM | |
1 | 01-17-2023 11:45 PM | |
1 | 03-30-2023 08:09 AM | |
1 | 08-23-2024 05:01 AM | |
8 | 03-08-2024 03:49 AM |
Online Status |
Offline
|
Date Last Visited |
Friday
|