|
POST
|
Hi Mike, Typically with items on a context menus you would use the FrameworkApplication.ContextMenuDataContext property (https://pro.arcgis.com/en/pro-app/latest/sdk/api-reference/#topic10164.html) and then cast this to an appropriate public API class to retrieve the context object. Unfortunately in this case there is no public API class in the Editing module that corresponds to an item in the Attributes tree view. We can look at adding something to a future release to facilitate your scenario., Thanks Narelle
... View more
09-27-2021
11:26 AM
|
0
|
4
|
2741
|
|
POST
|
Hi Thomas, Is there anything else you can tell me about the queryLayer that you have. Are you displaying the entire data from the Oracle feature class or does the query layer have a where clause so that only a subset of data is displayed. Do you happen to know what version of Oracle is being used? I have connected to an Oracle database and loaded a querylayer with a point feature class. I have tested on a 2.8.1 build of ArcGIS Pro and am not seeing any problems with the TableControl or it's properties. In your original post you mention "Until recently the whole setup worked fine, and for whatever reason does the addin not work any more correct." Did you perform any software upgrades in the timeframe that you noticed it stopped working. Or made additional changes to the add-in? Finally, would you be able to share your entire visual studio project with me. That might help me find the problem. Narelle
... View more
09-22-2021
04:43 PM
|
0
|
1
|
1541
|
|
POST
|
Hi Thomas, Can you tell me what version of ArcGIS and the Pro SDK you are using? Also what type of data you are displaying in the table. Is it file gdb, SDE data, feature service data? The xaml error that you are getting "TableControl" does not exist in the namespace "clr-namespace:ArcGIS.Desktop.Editing;assembly=ArcGIS.Desktop.Editing". is something that you can ignore. As you are aware you can compile and run your project despite this error message. The messages are coming from the 'XAML Designer' and if you close all XAML windows and rebuild you shouldn't get any messages. In 2.8 all Pro assemblies were switched from mixed (x86 and x64) to 64 bit only. Unfortunately the XAML designer loader cannot load x64 bit assemblies. Hopefully the upcoming release of Visual Studio 2022 will fix this issue. With regards to the other problems, I am not seeing any issues with the GetSelectedRowIndexes or GetSeletedObjectIds methods in my test (I am using file gdb data), Knowing which release and what type of data you are using will allow me to help track it down further. Also when checking the properties of the tableControl is your breakpoint on the UI thread or the background thread? Thanks Narelle
... View more
09-21-2021
10:12 AM
|
0
|
3
|
1552
|
|
POST
|
Hello, It is not possible to add your custom button to the Attribute pane toolbar. However, you can add a custom button to the table context menu as you discovered by modifying the daml definition for that menu. Within your button you can look at the ITablePane object - there is a few properties on this interface although it is limited. For example you should be able to do the following within your button to obtain the field value of the currently selected row protected override async void OnClick()
{
var pane = FrameworkApplication.ActiveWindow as Pane;
if (pane is ITablePane tablePane)
{
var column = tablePane.ActiveColumn;
var oid = tablePane.ActiveObjectID;
var mm = tablePane.MapMember;
if ((column != null) && (mm != null) && oid.HasValue)
{
await QueuedTask.Run(() =>
{
var insp = new Inspector(false);
insp.Load(mm, oid.Value);
var shape = insp.Shape;
var attribute = insp[column.Name].ToString();
//var attribute = insp["fieldName"].ToString();
});
}
}
} Hope this helps. Narelle
... View more
08-31-2021
10:41 AM
|
1
|
1
|
1931
|
|
POST
|
Hello, The GeometryEngine.QueryPoint method should meet your needs. See the following API documentation which contains a snippet. https://pro.arcgis.com/en/pro-app/latest/sdk/api-reference/#topic20262.html Narelle
... View more
08-25-2021
01:41 PM
|
1
|
0
|
784
|
|
POST
|
Karen, The following code should create you a polygon without Z. Because geometries are immutable, you need to use a geometry builder object, manipulate the Z flag and then obtain a new geometry. Polygon polygonNoZ = null;
// needs to run on MCT
using (var builder = new PolygonBuilder(polygon))
{
builder.HasZ = false;
polygonNoZ = builder.ToGeometry();
}
However I would also recommend trying to determine which line of code turned your non Z-enabled source data into Z-enabled polygons. Narelle
... View more
08-11-2021
10:17 AM
|
0
|
1
|
1431
|
|
POST
|
Hi Karen, Sorry if this is obvious again, but can you confirm that your geometry itself is not Z enabled prior to the EditOperation.Callback function - https://pro.arcgis.com/en/pro-app/latest/sdk/api-reference/#topic8174.html Even though your feature classes are not Z-enabled, and your source data from the feature classes are not Z-anabled, some geometry routines may add the Z flag to your geometry if you are doing certain manipulations between retrieving the geometry from the feature class and then storing it in the second feature class. Thanks Narelle
... View more
08-11-2021
09:57 AM
|
0
|
3
|
1436
|
|
POST
|
Hi Karen, Can you perhaps answer a few questions about your scenario to help us track this problem down. I am currently unable to reproduce on 2.8 final, 2.8.1 or even our current build. - Are you using file geodatabase or enterprise data? If enterprise, what database platform (Oracle, SQL etc) - What overload of EditOperation.Modify are you using? Are you modifying geometry or attributes or geometry and attributes. I tested using this overload passing only the layer, oid and geometry (No attributes). public void Modify(Layer layer, long oid, Geometry geometry, Dictionary<string, object> attributes = null); - Is there anything special about your data; ie does it participate in a topology, utility network etc? I was just using a polygon layer inserted via Map Notes. - I was using France as my region ensuring that the decimal separator was the comma. Can you duplicate the problem with many different regions that use the comma as the decimal separator? - Finally, maybe this is obvious, but have you verified via the debugger that the new geometry shape is a non empty geometry before passing it to EditOperation.Modify? (https://pro.arcgis.com/en/pro-app/latest/sdk/api-reference/#topic8175.html) Thanks for any answers you can provide. Narelle
... View more
08-05-2021
04:09 PM
|
0
|
6
|
3014
|
|
POST
|
Eloy, Please review this documentation regarding Pane impersonation. In order for the TOC / contents pane to still show active map content, your pane needs to "impersonate" the mapView. https://github.com/Esri/arcgis-pro-sdk/wiki/ProGuide-Map-Pane-Impersonation And an associated sample https://github.com/Esri/arcgis-pro-sdk-community-samples/tree/master/Map-Exploration/ImpersonateMapPane Hope this helps Narelle
... View more
08-04-2021
09:17 AM
|
0
|
1
|
1859
|
|
POST
|
Hi Marvis, I had a look at the existing conditions that live in the ADGeodatabase.daml file (which can be found in (installPath\bin\Extensions\Catalog). And it doesn't appear that there is anything that will help you in what you're trying to achieve. However this may be a workaround for you. Subscribe to the ArcGIS.Desktop.Core.Events.ProjectWindowSelectedItemsChangedEvent. In your delegate, examine the TypeID of the selected item and activate or deactivate your own states. Then in your daml file, create your own condition based on your state. Here's a bit of a snippet to get you started protected override void OnClick()
{
if (subscribed)
ProjectWindowSelectedItemsChangedEvent.Unsubscribe(OnProjectWindowSelectedItem);
else
ProjectWindowSelectedItemsChangedEvent.Subscribe(OnProjectWindowSelectedItem);
subscribed = !subscribed;
}
private async void OnProjectWindowSelectedItem(ProjectWindowSelectedItemsChangedEventArgs args)
{
if (args.IProjectWindow.SelectionCount > 0)
{
// get the first selected item
var selectedItem = args.IProjectWindow.SelectedItems.First();
string typeID = selectedItem.TypeID;
// TypeID for file gdb is "database_fgdb"
// TypeID for file gdb items are "fgdb_table", "fgdb_relationship", "fgdb_fc_point", "fgdb_fc_polygon" etc
if (IsFGDBItem(typeID))
FrameworkApplication.State.Activate("FGDBItemSelected");
else
FrameworkApplication.State.Deactivate("FGDBItemSelected");
// TypeID for enterprise gdb is "database_egdb"
// TypeID for enterprise gdb items are "egdb_table", "egdb_relationship", "egdb_fc_point", "egdb_fc_polygon" etc
if (IsEGDBItem(typeID))
FrameworkApplication.State.Activate("EGDBItemSelected");
else
FrameworkApplication.State.Deactivate("EGDBItemSelected");
}
}
private bool IsFGDBItem(string typeID)
{
if (typeID.StartsWith("fgdb_"))
return true;
return false;
}
private bool IsEGDBItem(string typeID)
{
if (typeID.StartsWith("egdb_"))
return true;
return false;
} And the daml <insertCondition id="myCondition" caption="">
<or>
<state id="FGDBItemSelected"/>
<state id="EGDBItemSelected"/>
</or>
</insertCondition> You can of course make the IsFGDBItem and IsEGDBItem routines more restrictive if you're only looking for feature classes or tables and not other data items like relationships, topologies etc. Search the ADGeodatabase.daml file for specific TypeID strings for specific dataset types. Hope this helps. Narelle
... View more
07-21-2021
10:39 AM
|
0
|
1
|
1785
|
|
POST
|
A followup, map.RemoveElevationSurface will throw an InvalidOperationException if you try to remove the ground surface. The following code should be used to remove the elevation sources from the ground surface. var ges = map.GetGroundElevationSurface();
ges.BaseSources = null;
map.SetElevationSurface(ges);
... View more
06-16-2021
09:22 AM
|
0
|
0
|
1682
|
|
POST
|
Hello again, Unfortunately I don't think it is currently possible to accomplish what you trying to attempt. When I added a button to my embeddable control and activated the rectangle selection tool on the button click, it deactivated my custom Sketch tool and closed the embedded control; reverting the Modify Features pane to the initial state displaying the complete list of sketch tools. This is not the behavior that is wanted. As an alternative, are you aware of the UseSelection property within the MapTool class. When true, it allows your tool to toggle between sketch and selection mode via the SHIFT key. This is documented here - https://github.com/Esri/arcgis-pro-sdk/wiki/ProConcepts-Editing#useselection Is this behavior enough for your purposes? As per the documentation you can also use the ActivateSelectAsync method to explicitly toggle the tool between sketch and selection mode rather than the default SHIFT key. You could perhaps tie this a button on the UI. The following sample illustrates the concepts of UseSelection and ActivateSelectAsync. https://github.com/Esri/arcgis-pro-sdk-community-samples/tree/master/Editing/DemoUseSelection Regards Narelle
... View more
06-02-2021
02:21 PM
|
0
|
0
|
2271
|
|
POST
|
Hello, Unfortunately we don't have any public controls or templates that provide the UI and behavior that you see within the Editing tools such as Split with regards to the selection tool dropdown and TreeView showing the selected features. You can however certainly add any of the selection tools (rectangle, lasso, etc) into the UI yourself by attaching it to a UI wpf element such as a button. I will try and work up a simple example and post here. Regards Narelle
... View more
06-02-2021
09:51 AM
|
0
|
1
|
2274
|
|
POST
|
Hello Attached is code for a button that creates a multipatch sphere and adds it as a feature to a multipatch layer (rename the attached file to MultipatchSphere.cs). it uses the MultipatchBuilderEx builder object constructing patches of type TriangleStrip. Let me know if you have any questions about the code. As a result of your question, we have added additional constructors to the MultipatchBuilderEx object (and the related convenience methods) to support the creation of some basic 3d shapes. These will include cubes, tetrahedrons, diamonds, hexagons, cylinders, spheres, sphere frames and cones and will be available in the 2.9 ArcGIS Pro release.. Regards Narelle
... View more
05-26-2021
05:33 PM
|
0
|
0
|
1680
|
|
POST
|
Hello, No, there is no current API support for the grid. Although we do have an issue in our backlog to add this in a future release. Thanks Narelle
... View more
05-07-2021
03:32 PM
|
1
|
0
|
1077
|
| Title | Kudos | Posted |
|---|---|---|
| 2 | 07-27-2025 06:04 PM | |
| 1 | 03-24-2025 06:53 PM | |
| 1 | 08-08-2024 09:44 PM | |
| 1 | 07-18-2024 04:46 PM | |
| 1 | 06-04-2024 07:18 PM |
| Online Status |
Offline
|
| Date Last Visited |
11-02-2025
02:15 PM
|