|
POST
|
No. This is the problem: graphicElement.GetGraphic().Symbol = polygonSymbol; The CIM uses a transactional pattern. You get a local copy, not a reference, of the deserialized state that u can modify (as needed) Changes must be _applied_ back via a commit. So, get the graphic (local copy) and _hold_ a reference (to that copy). var graphic = graphicElement.GetGraphic(); Next, apply your change to the copy whose reference you are holding: graphic.Symbol = polySymbol [or polySymbol.MakeSymbolReference() if u hv a symbol] Now, commit the change(s) made to the local copy _back_ graphicElement.SetGraphic(graphic);
... View more
07-18-2024
12:31 PM
|
0
|
0
|
1231
|
|
POST
|
You are close, - almost there. Use graphicElement.SetGraphic(...) - https://pro.arcgis.com/en/pro-app/latest/sdk/api-reference/topic11077.html - to apply the changes to the graphic symbol _back_ to the element. There is a code snippet there u can use.
... View more
07-14-2024
01:20 PM
|
0
|
1
|
1281
|
|
POST
|
Change the color on the symbol, not the fill. if (symbol is CIMPolygonSymbol polygonSymbol)
polygonSymbol.SetColor(....) To change the color on a fill, use its color property. var solidFill = polygonSymbol.SymbolLayers.OfType<CIMSolidFill>().FirstOrDefault();
solidFill?.Color = .... ; "Symbol" take a symbol reference not a symbol. An unfortunate property naming. //polygonGraphic.Symbol = symbol;
polygonGraphic.Symbol = symbol.MakeSymbolReference();
... View more
07-13-2024
01:21 PM
|
0
|
0
|
1098
|
|
POST
|
CIMSymbol SetColor : https://pro.arcgis.com/en/pro-app/latest/sdk/api-reference/topic16566.html CIMPolygonSymbol SetOutlineColor : https://pro.arcgis.com/en/pro-app/latest/sdk/api-reference/topic16567.html
... View more
07-12-2024
09:41 AM
|
0
|
0
|
1143
|
|
POST
|
https://products.aspose.com/cells/net/conversion/png-to-svg/
... View more
07-05-2024
05:13 PM
|
0
|
0
|
1138
|
|
POST
|
07-05-2024
10:44 AM
|
0
|
1
|
673
|
|
POST
|
in Pro we only have addins - to include what u wld hv previously used an extension for. Addins can load early by setting the <insertModule .... autoLoad="true" ...>. It will be there when a map or layers are loaded to do the necessary.
... View more
07-01-2024
08:19 PM
|
0
|
1
|
854
|
|
POST
|
Consult https://github.com/esri/arcgis-pro-sdk/wiki/ProConcepts-Editing#enable-and-disable-editing. It might be what u r looking for
... View more
07-01-2024
06:50 PM
|
0
|
1
|
866
|
|
POST
|
mody, in addition to what Uma says below, it is also possible to split your workflow into multiple steps where each step is within the context of a QueuedTask and, in between steps, u can show a modal UI to the user. The key is to "await" each step wrapped within a QueuedTask like so: internal class Button1 : Button {
protected async override void OnClick()
{
//step 1 - await it before proceeding to step 2
var ok = await QueuedTask.Run(() => {
//do work
return true;
}
//Back on the UI
if (!ok) {
MessageBox.Show("......");
return; //exit perhaps
}
//continue on to step 2
ok = await QueuedTask.Run(() => {
....
//Back on the UI
if (!ok) {
MessageBox.Show("......");
//continue on to step 3
ok = await QueuedTask.Run(() => {
... //and so-on The only caveat here is that each time that u return to the UI, there is an opportunity for other "processes/workflows" to use the QueuedTask in-between your steps so, ideally, u want to capture any state u need upfront (such as the layer u r examining into a local variable and so on)
... View more
06-25-2024
03:47 PM
|
1
|
0
|
718
|
|
POST
|
"Regular" feature classes support schema locking and schema edits allowing (certain) changes to the schema to be made (restrictions apply - no pending edits, no edit session, etc, etc). Plugin datasources are readonly and the schema is fixed.
... View more
06-12-2024
05:36 PM
|
0
|
0
|
717
|
|
POST
|
The pattern looks something like this but I dont think it is going to give u the results you are hoping for: internal class MapTool1 : MapTool {
private DelayedInvoker _invoker = new DelayedInvoker(50);
...
protected async override void OnToolMouseMove(MapViewMouseEventArgs e){
//do something with the invoker
_invoker.InvokeTask(() => {
return QueuedTask.Run(() => {
var mpt = MapView.Active.ClientToMap(e.ClientPoint);
//Do something with the point
}); Basically, just like a "QueuedTask.Run(() => { ........... })" you can wrap whatever u want to be invoked with the delay (50ms in this case) within the "_invoker.InvokeTask" lambda. So, in this case, if I am tracking the cursor position w/ the invoker I will be "processing" its position every 50ms (or whatever delay u specify) which will be quite jittery and so on. In the Pro SDK are a number of samples where we implement logic to cut down on unnecessary mouse movement - just search for "MouseMove" and you will see them - they are all using the same, basic pattern and are updating the graphics overlay in different ways. https://github.com/search?q=repo%3AEsri%2Farcgis-pro-sdk-community-samples%20mousemove&type=code I suggest using something built around the pattern they are using rather than the delayed invoker. Another way, that I have used from time to time, is this basic pattern: internal class SelectOnMove1 : MapTool
{
private Point _lastLocation;
private int _deltaPixels = 0;
protected override Task OnToolActivateAsync(bool active) {
if (_deltaPixels == 0)
//usually 3 pixels - use whatever number u want
_deltaPixels = SelectionEnvironment.SelectionTolerance;
protected async override void OnToolMouseMove(MapViewMouseEventArgs e) {
//compare current cursor position to last (captured) position
if (_lastLocation.X >= e.ClientPoint.X - _deltaPixels &&
_lastLocation.X <= e.ClientPoint.X + _deltaPixels &&
_lastLocation.Y >= e.ClientPoint.Y - _deltaPixels &&
_lastLocation.X <= e.ClientPoint.X + _deltaPixels)
return;//within tolerance - ignore
_lastLocation = e.ClientPoint; //we'll use this one
//TODO - use the point
However, it is going to be v difficult to get truly smooth tracking and it will always be a little laggy/jittery. Your mileage will vary.
... View more
06-11-2024
10:54 AM
|
2
|
0
|
623
|
|
POST
|
the sdk will follow the behavior of the UI. Add field on a geopackage must not be supported.
... View more
06-10-2024
10:44 AM
|
0
|
0
|
794
|
|
POST
|
if u add a layer using a geopackage via the UI do u get the same behavior?
... View more
06-06-2024
07:38 AM
|
0
|
1
|
840
|
|
POST
|
On the modify dockpane those are commands ("buttons") firing, not tools - which, as i think u have found out, activate a dockpane. The only event I see that is associated with this is the ActiveWindowChangedEvent. I think it may fire multiple times depending on the context (map becoming active, dockpane inactive and vice versa). From this event, u can determine if a dockpane is being activated (in which case "Window" will be a Dockpane) but Im not sure if that gets u further along... ArcGIS.Desktop.Framework.Events.ActiveWindowChangedEvent.Subscribe(
(args) => {
if (args.Window is DockPane dockPane){
//a dockpane is being activated
var id = dockPane.ID;
var caption = dockPane.Caption;
//etc, etc
}
});
... View more
05-28-2024
04:58 PM
|
0
|
1
|
1348
|
|
POST
|
if I understand u correctly >>My requirement is in this case that already open dock pane should open.<< then call Activate() on your dockpane. DockPane pane = FrameworkApplication.DockPaneManager.Find("Acme_Dockpane1");
pane?.Activate();
... View more
05-28-2024
10:41 AM
|
1
|
1
|
1370
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 10-14-2025 05:01 PM | |
| 1 | 10-14-2025 05:06 PM | |
| 2 | 10-02-2025 03:40 PM | |
| 1 | 07-02-2025 03:50 PM | |
| 1 | 10-27-2022 10:32 PM |
| Online Status |
Offline
|
| Date Last Visited |
Monday
|