|
POST
|
I'm so sorry, Karen. I skipped over the geoprocessing call and didn't really pay attention to which tool you were trying to use. I also specified "in_memory" which is incorrect. It's possible that this did work, but "in_memory" feature classes cannot be displayed on a map, and if you attempt to do so, Pro copies the feature class to a file geodatabase. (More information here) Try using "memory" instead of "in_memory". If this doesn't work, I'll bring in a geoprocessing expert. --Rich
... View more
01-26-2022
01:11 PM
|
0
|
3
|
5802
|
|
POST
|
Hi Karen, Geoprocessing only knows how to work with a single memory geodatabase- the one called "memory". You can execute your copy like this: var parameters = Geoprocessing.MakeValueArray(@"C:\Users\kbmeinstein\Desktop\DeformTest\50Ma_Pro_Deftest_model_save.gdb\DefMotion_50Ma", @"in_memory\test"); IGPResult result = await Geoprocessing.ExecuteToolAsync("FeatureClassToFeatureClass_conversion", parameters, null, null, null, GPExecuteToolFlags.AddOutputsToMap); If you later need to access this new table using the Pro SDK, you can do so with the following code: MemoryConnectionProperties memoryConnectionProperties = new MemoryConnectionProperties(); Geodatabase geodatabase = SchemaBuilder.CreateGeodatabase(memoryConnectionProperties); FeatureClass testFeatureClass = geodatabase.OpenDataset<FeatureClass>("test"); (In this instance, the CreateGeodatabase call doesn't really create a new geodatabase, but rather returns a connection to the existing memory geodatabase.) I hope this helps, --Rich
... View more
01-26-2022
12:06 PM
|
0
|
1
|
5809
|
|
POST
|
@KenBuja Yes. You can now use the Pro SDK to create a geodatabase in memory, and then create tables and feature classes within that geodatabase. Details are here. You can create a layer from a memory feature class like any other. Just note that the memory feature class goes away when the Pro session ends- so if you save those layers into a APRX file, they will show as disconnected when reloading the project.
... View more
01-21-2022
10:56 AM
|
1
|
0
|
1963
|
|
POST
|
Now let's talk about this line... if (featureLayer.Name.Contains("ASSEMBLY")) When you define your utility network schema, you can set the association deletion semantics for a container or structure type. You can see these in the Network Properties dialog that you can get by right-clicking on the utility network layer. There are three values for this setting: None. When you delete the container, the association is automatically deleted. The content features are left behind (no longer part of the container) Cascade. When you delete the container, the content features are automatically deleted with it (and the containment associations between them, naturally). Restrict. You are unable to delete the container without first deleting the content. This is the scenario you are dealing with above. Now the reason this setting exists is to prevent users from accidentally deleting a container that contains a large number of features- like a large switching cabinet or even a substation. I would consider two things. 1. Instead of looking for the name "Assembly", ask the feature if it is a container and, if so, what is the association deletion semantics. You can do this as follows: bool needToDeleteAssociations = false; Element element = un.CreateElement(tempFeat); AssetType assetType = element.AssetType; if (assetType.AssociationRoleType == AssociationRoleType.Container) { if (assetType.AssociationDeletionSemantics == AssociationDeleteType.Restricted) { needToDeleteAssociations = true; } } (Structures can have association deletion semantics too) 2. The second thing to consider is... should you be doing this? The schema was defined to restrict deletion of these containers. Was it intentional? If so, your code is... well... subverting that setting. If it wasn't intentional, maybe the right solution isn't to write any code at all but to change the schema to not have this setting... I can't answer the question for you, but I would encourage you to ask it if you haven't already. --Rich
... View more
01-20-2022
04:18 PM
|
1
|
1
|
4695
|
|
POST
|
Hi Jimmy, You create an `AssociationDescription` object, and pass that to the `EditOperation.Delete` overload that takes one. The association description object describes an association to delete (or create, in other workflows) For your code above: AssociationDescription associationToDelete = new AssociationDescription(a.Type, new RowHandle(a.FromElement, un), new RowHandle(a.ToElement, un); ediOp.Delete(associationToDelete); --Rich
... View more
01-20-2022
03:44 PM
|
1
|
0
|
4708
|
|
POST
|
Hi William, NUMBER(38) is large enough to represent a 64-bit integer. We changed our code to present this as a Double as a stop-gap until we can fully represent 64-bit integer types in ArcGIS. The values should not show as 0; you should log that as an issue with technical support so that we can reproduce and fix it. Thanks, --Rich
... View more
01-20-2022
11:41 AM
|
0
|
1
|
1484
|
|
POST
|
Hi Jimmy, You can find associated features from a given feature by using the UtilityNetwork.GetAssociations. method It takes as input an Element, which you can create using UtilityNetwork.CreateElement. If you don't have a UtilityNetwork object, this snippet shows how to obtain one from a Table. I hope this helps, --Rich
... View more
01-20-2022
10:49 AM
|
1
|
1
|
4730
|
|
POST
|
Try using an insert cursor API reference Code snippet I hope this helps, --Rich
... View more
12-28-2021
08:45 AM
|
1
|
0
|
1447
|
|
POST
|
I think the single biggest thing you could do is use the Pro SDK to create your feature class. There is a snippet showing how to do this here. You will need to create a feature layer for this feature class after filling it. Assuming you don't need to have undo/redo work with this data, then I would forego the EditOperation as @GKmieliauskas suggests. The order would be: 1. Create the feature class in the in-memory geodatabase 2. Fill it in with InsertCursor 3. Create a feature layer and add it to the map I hope this helps, --Rich
... View more
12-13-2021
10:12 AM
|
0
|
0
|
763
|
|
POST
|
Jack, Would you mind posting some code snippets so that we can see what (if anything) you are doing wrong? --Rich
... View more
12-09-2021
02:45 PM
|
0
|
4
|
4037
|
|
POST
|
Jack, If you just want to stick with geoprocessing, here is a link for using geoprocessing with in-memory geodatabases (you don't even have to create it first). --Rich
... View more
12-08-2021
08:40 AM
|
0
|
1
|
4049
|
|
POST
|
If this custom file format is something you use frequently, you might want to consider writing a PlugIn datasource (Conceptual Doc, Guide). This would allow you to read and display the data in the map without needing to copy it into another format. If you want to stick with the current copying idea, shapefiles are good, but an in-memory database is probably better. Instructions for creating an in-memory database are here. Once the database is created, you can create a feature class, and then copy data into it. If you go the route of using an in-memory database, keep in mind that they are destroyed when closing ArcGIS Pro. So if you create a layer from an in-memory database, that layer will come in broken if you save it in a map and restart Pro. I hope this helps, --Rich
... View more
12-01-2021
09:10 AM
|
0
|
0
|
4094
|
|
POST
|
The calls to the SchemaBuilder and the OpenDataset call should also be inside QueuedTask.Run()
... View more
11-10-2021
12:16 PM
|
0
|
0
|
3582
|
|
POST
|
I'm sorry, I forgot that step. After calling schemaBuilder.Build() you can get a FeatureClass pointer using Geodatabase.OpenDataset<FeatureClass>("SourcePackageFootprint").
... View more
11-10-2021
11:33 AM
|
0
|
1
|
3584
|
|
POST
|
I'm not sure why the URI isn't accepted, but have you tried just creating the layer from the feature class itself? --Rich
... View more
11-10-2021
08:19 AM
|
0
|
1
|
3597
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 12-13-2024 11:22 AM | |
| 2 | 01-29-2026 09:34 AM | |
| 2 | 01-28-2026 08:20 AM | |
| 1 | 12-10-2025 09:15 AM | |
| 2 | 11-30-2025 12:23 PM |
| Online Status |
Online
|
| Date Last Visited |
56m ago
|