POST
|
Hi Jamal. Yes, I've looked through your post. We aren't trying to set the clip shape, but retrieve what was set through the UI. I was hoping the API would just give me the shape.
... View more
03-12-2020
10:33 AM
|
0
|
1
|
951
|
POST
|
Greetings. I am a colleague of Hannah, and I believe we have found a solution. The case we are concerned with is when CIMMap.ClippingMode = CustomShape, which occurs when through the UI you go to map properties, Clip Layers, and use one of the custom clipping modes. When in this mode, the CIMMap.CustomClippingShapeURI returns a string of the form: “CIMPATH=ClipShape/61ef717a9e874218e6fcf85c78f9497e.dat” We found this file residing under %TEMP%. Is there an API call that will assist in constructing the absolute path to this file, or can we simply rely on finding it in a consistent location under %TEMP%? Our objective is to retrieve the custom clipping shape, and through experimentation we discovered that the contents of the file is the geometry in EsriShape binary format. The code below retrieves the geometry from the URI. Do you see any potential problems with what we're doing here? Thanks! string path = "C:\\Temp\\61ef717a9e874218e6fcf85c78f9497e.dat"; byte[] buffer = File.ReadAllBytes(path); EsriShapeImportFlags importFlags = EsriShapeImportFlags.esriShapeImportDefaults; Polygon clip_poly = GeometryEngine.Instance.ImportFromEsriShape(importFlags, buffer, SpatialReferences.WGS84) as Polygon;
... View more
03-12-2020
01:23 AM
|
3
|
3
|
951
|
POST
|
Hi Rich, It certainly did help. Thanks for the quick reply! Mike
... View more
03-10-2020
12:29 PM
|
0
|
0
|
980
|
POST
|
Greetings. I'm performing a join query against 2 feature classes. The QueryDef.SubFields property includes only 1 geometry field. I then use GeoDatabase.OpenQueryTable() to get the table. I'm trying to retrieve the field values from the rows of the result set. Calling row.GetOriginalValue(index) throws an exception that states "The method or operation is not implemented." Attaching source code. I've also tried an alternate approach calling GeoDatabase.Evaluate(query_def) to get the RowCursor. That approach does not throw an exception, but the call to row.GetOriginalValue(index) always returns null. What is the correct way to retrieve field values from the results of a query with join?
... View more
03-10-2020
11:41 AM
|
2
|
2
|
1083
|
POST
|
Hello, I have downloaded the ArcGIS Pro 2.4 beta and accompanying SDK API documentation. So far, my evaluation has been limited to the API documentation. I see that the Multipatch class has added many "Get" methods to access texture material data. I don't see any "Set" methods in either the Multipatch or MultipatchBuilder classes. If a multipatch feature isn't already textured, how does one add texture images to it via the API? Any sample code on this? Thanks, Mike
... View more
05-16-2019
02:06 PM
|
1
|
1
|
504
|
POST
|
Greetings. I am trying to get notification when the active edit template changes. There doesn't seem to be an event available to handle this, so I am listening for PropertyChanged events on all the edit templates and checking for the "IsActive" property name (see code below). The problem I am encountering is that the handler is getting called multiple times on the same template for the "IsActive" property name, but the property is not changing. I don't see the IsActive property change to "true" except when the active tool doesn't change. So, if my current layer is polygon and I change to a different layer that is also polygon, the IsActive property does change to "true" on the new template. Also, if the current layer has subtypes and I'm just changing to a different subtype within the same layer, then the property value changes as expected. However, changing between layers of different geometry types (which triggers a change in the active tool) results in the property changed handler never getting notified of the active template. The calls are being made, but the value for IsActive is always false. My question is, what is the most efficient way to get notification of active edit template changes? Thank you. public bool Register() { var layers = MapView.Active.Map.GetLayersAsFlattenedList().OfType<FeatureLayer>(); QueuedTask.Run(() => { foreach (var fl in layers) { foreach (var template in MappingExtensions.GetTemplates(fl)) { template.PropertyChanged += new PropertyChangedEventHandler(TemplatePropertyChanged); } } }); } private void TemplatePropertyChanged(Object sender, PropertyChangedEventArgs args) { if (args.PropertyName == "IsActive") { EditingFeatureTemplate template = sender as EditingFeatureTemplate; // Do something } }
... View more
12-16-2018
12:01 AM
|
2
|
0
|
425
|
POST
|
When working with a Polygon or Polyline implemented as a Curve, I need to densify the shape to generate the points that go between the start/end points. Does the ArcGIS Pro SDK have the equivalent of the ICurve interface that exists in ArcObjects? Thanks.
... View more
11-26-2018
02:15 PM
|
1
|
4
|
601
|
POST
|
When working with multipatch features, in addition to the part vertices, I need access to the normal values, texture coordinates, and texture images. Does the ArcGIS Pro SDK have the equivalent of the IGeneralMultiPatchInfo and IGeneralMultiPatchCreator interfaces that exists in ArcObjects? Thanks.
... View more
11-25-2018
07:41 PM
|
1
|
3
|
755
|
POST
|
I'm using a CIMUniqueValueRenderer on a feature layer, and when iterating over the features for the layer, I need to retrieve the symbol that applies to a given feature. Is there a way to retrieve the applicable symbol without having to iterate over the renderer's fields, groups, and values and looking for a match? Basically, I'm looking for the equivalent of the ILookupSymbol interface that exists in ArcObjects where you pass in the feature and get back the symbol. Thanks.
... View more
10-13-2018
11:51 PM
|
1
|
2
|
532
|
POST
|
Taking your instruction further, in addition to setting autoLoad="true" for the module, I also set loadOnClck="false" on each button. That seems to do the trick. Thanks!
... View more
10-11-2018
01:55 PM
|
0
|
0
|
271
|
POST
|
Thank you, Charles, for the quick reply. I failed to mention it in the initial post, but I am setting autoLoad="true" in Config.daml. This does not seem affect the behavior.
... View more
10-11-2018
01:27 PM
|
0
|
0
|
271
|
POST
|
In my add-in I'm using Delegate Commands to control button sensitivity, but it does not seem to affect the initial button state. I am not specifying any condition in the DAML, but all buttons appear enabled at startup instead of just the one desired. Here are the corresponding methods and properties. internal static void OnConnectButtonClick() { _connected = true; } internal static bool CanOnConnectButtonClick { get { return !_connected; } } internal static void OnDisconnectButtonClick() { _connected = false; } internal static bool CanOnDisconnectButtonClick { get { return _connected; } } What am I missing here? It seems the only way I'm able to achieve the desired effect is to create a configuration with custom conditions and set the condition/state in the OnApplicationReady() method. Is there a way to accomplish this with just an add-in?
... View more
10-11-2018
12:05 PM
|
1
|
3
|
355
|
Title | Kudos | Posted |
---|---|---|
3 | 03-12-2020 01:23 AM | |
2 | 03-10-2020 11:41 AM | |
2 | 12-16-2018 12:01 AM | |
1 | 05-16-2019 02:06 PM | |
1 | 10-11-2018 12:05 PM |
Online Status |
Offline
|
Date Last Visited |
12-08-2020
10:53 PM
|