|
POST
|
Hi Max, You can use UpdateModule definition in config.daml file like this: <updateModule refID="Updated_Module"> <tabs> <updateTab refID="updated_tab"> <insertGroup refID="xxx_Group" insert="after" placeWith="yyy_Group" /> </updateTab> </tabs> </updateModule>
... View more
07-01-2019
12:08 AM
|
0
|
3
|
2114
|
|
POST
|
Hi Brian, I have had refreshing problems with symbolizing when using more complicated symbolization (symbol rotation, few different fields and etc.) Have you tried refresh unsuccessful symbolized layers from layer property in TOC? 1. In opened layer properties select Cache page. 2. In Cache page press "Clear Cache". 3. After that choose "Don't cache any data locally". Press OK. If it helps then you need to change your way and do not use ApplySymbologyFromLayer_management. 1. Remove existing layer 2. Create layer from lyr file 3. Update data source to removed layer path. 4.Clear cache It sounds strange but I use that workaround from the beginning. More info here: https://community.esri.com/thread/198403-pro-20-bug-apply-symbology-from-layer-geoprocessing-tool
... View more
06-20-2019
07:05 AM
|
0
|
4
|
4055
|
|
POST
|
Hi Brian, Have you tried to set GPExecuteToolFlags flags = GPExecuteToolFlags.GPThread; More info here: https://community.esri.com/thread/198403-pro-20-bug-apply-symbology-from-layer-geoprocessing-tool
... View more
06-19-2019
10:46 PM
|
2
|
6
|
4055
|
|
POST
|
Hi John, I think the better way is to create new object with two members (string and bool) and make binding in xaml. It is not good way to add code to both classes view and viewmodel. Look at this link: https://stackoverflow.com/questions/13611113/how-to-bind-listboxitem-isselected-to-boolean-data-property
... View more
06-09-2019
11:47 PM
|
0
|
0
|
1793
|
|
POST
|
We have IGraphicsContainer on ArcObjects SDK and we use it for some temporary information storing. As I understand for the same purpose I could use map notes templates (for example Line note template). How can I add Line template layer to map I have some plans (using template id activate tool), but how to check which layer was added? By layer name or other properties? What will be if customer will change layer properties? I would like to add and delete features depending on my workflow.
... View more
06-04-2019
07:41 AM
|
0
|
2
|
1266
|
|
POST
|
Hi John, If you do not use MVVM then you could add event to your xaml file like this: <ComboBox x:Name="cbLayer" Margin="10" Width="150" SelectionChanged="Layer_SelectionChanged"> In xaml.cs you need to add method for SelectionChanged: private void Layer_SelectionChanged(object sender, SelectionChangedEventArgs e) In MVVM you do not need OnSelectionChange. You need to create property for SelectedItem or SelectedValue in your model view file and make binding in xaml <ComboBox ItemsSource="{Binding Layers}" SelectedItem="{Binding SelectedLayer}"/>
... View more
06-03-2019
11:23 PM
|
1
|
1
|
1989
|
|
POST
|
Hi, Sorry. I have combined code in notepad. Instead of featureClass you need to use firstLayer. I send you update peace of code: var firstLayer = MapView.Active.Map.GetLayersAsFlattenedList().OfType<FeatureLayer>().FirstOrDefault(); var selectionfromMap = firstLayer.GetSelection(); ArcGIS.Core.Data.QueryFilter filter = new ArcGIS.Core.Data.QueryFilter { ObjectIDs = selectionfromMap.GetObjectIDs() }; // get the row using (ArcGIS.Core.Data.RowCursor rowCursor = firstLayer.Search(filter)) { while (rowCursor.MoveNext()) { long oid = rowCursor.Current.GetObjectID(); // get the shape from the row ArcGIS.Core.Data.Feature feature = rowCursor.Current as ArcGIS.Core.Data.Feature; Polygon polygon = feature.GetShape() as Polygon; // do something here }
... View more
05-29-2019
11:48 PM
|
3
|
1
|
3908
|
|
POST
|
Hi Jaewon, This is code combined from few ArcGIS Pro snippets: var firstLayer = MapView.Active.Map.GetLayersAsFlattenedList().OfType<FeatureLayer>().FirstOrDefault(); var selectionfromMap = firstLayer.GetSelection(); ArcGIS.Core.Data.QueryFilter filter = new ArcGIS.Core.Data.QueryFilter { ObjectIDs= selectionfromMap.GetObjectIDs(); }; // get the row using (ArcGIS.Core.Data.RowCursor rowCursor = featureClass.Search(filter, false)) { while (rowCursor.MoveNext()) { long oid = rowCursor.Current.GetObjectID(); // get the shape from the row ArcGIS.Core.Data.Feature feature = rowCursor.Current as ArcGIS.Core.Data.Feature; Polygon polygon = feature.GetShape() as Polygon; // get the attribute from the row (assume it's a double field) double value = (double)rowCursor.Current.GetOriginalValue(fldIndex); // do something here } }
... View more
05-29-2019
11:24 PM
|
2
|
3
|
3908
|
|
POST
|
Hi Dylan, Sorry. I have replied from the mail and some part of my answer missed. I wanted to write what Dictionary is better than List in your case. For example if you need few fields from one layer, you can build dictionary like this: Dictionary<string, List<string>>, where first is layer name, second one is list of field names. So you will need less stuff to get the same results. I would code in different way case than one layer has few fields. I would read all values in one RowCursor. It will be faster. My GetAttributeValues procedure would have List<string> fieldNames parameter instead of string fieldName and return type will be List<string> for each of attribute fields. Then I don't need to check fields number, have 2 branches in my code and etc.
... View more
05-15-2019
10:43 PM
|
0
|
1
|
14273
|
|
POST
|
Hi Dharma, If you mean GeoProcessor using, then before calling Execute method you can set environment variables using SetEnvironmentValue method. Sample here: https://idea.isnew.info/how-to-use-the-geoprocessor-using-arcobjects.html
... View more
05-15-2019
02:34 AM
|
0
|
1
|
1493
|
|
POST
|
Hi Dylan, At first instead of List kvp in features) { string fieldName; if(list.TryGetValue(kvp.Key.Name, out fieldName)) { long fCnt = kvp.Value.Count; total = total + fCnt; sb.AppendLine($@"{fCnt} {(fCnt == 1 ? "record" : "records")} selected for {kvp.Key.Name}"); QueryFilter queryFilter = new QueryFilter { ObjectIDs = kvp.Value }; using (RowCursor rowCursor = kvp.Key.Search(queryFilter)) { while (rowCursor.MoveNext()) { using (Row row = rowCursor.Current) { string attributeValue = Convert.ToString(row[fieldName]); // Do something with attribute value } } } } }
... View more
05-15-2019
02:16 AM
|
1
|
1
|
14273
|
|
POST
|
Hi Nirbhay, Look at the content of link: https://github.com/esri/arcgis-pro-sdk/wiki/ProConcepts-Configurations
... View more
05-14-2019
06:28 AM
|
0
|
0
|
654
|
|
POST
|
Hi Khamille, Try to look at this link: https://community.esri.com/thread/210462-programmatically-start-the-edit-annotation-tool-in-modify-features
... View more
05-13-2019
10:42 PM
|
0
|
0
|
1640
|
|
POST
|
Hi Tim, You can use Inspector (for one by one feature) // for each feature foreach (var oid in featOids) { // load the inspector with the feature var insp = new Inspector(); insp.Load(faetLayer, oid); .... } or use query like this: QueryFilter queryFilter = new QueryFilter { ObjectIDs = oids }; using (RowCursor rowCursor = featLayer.Search(queryFilter)) { while (rowCursor.MoveNext()) { using (Row row = rowCursor.Current) { Feature feat = row as Feature; .... } } }
... View more
05-12-2019
10:54 PM
|
3
|
0
|
14273
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 2 weeks ago | |
| 1 | 2 weeks ago | |
| 1 | 06-30-2026 10:14 PM | |
| 1 | 06-30-2026 01:43 PM | |
| 2 | 04-24-2026 08:33 AM |
| Online Status |
Offline
|
| Date Last Visited |
Tuesday
|