|
POST
|
Steve, Try awaiting the ActivateDefaultToolAsync method. This means that the code following that line won't execute until the ActivateDefaultToolAsync method has completed. something similar to this await QueuedTask.Run(async () =>
{
// get editing templates
featureTemplate = editingTemplates.FirstOrDefault(my lambda here));
if (featureTemplate != null)
{
if (featureTemplate.Inspector == null)
{
await featureTemplate.ActivateDefaultToolAsync();
}
if (featureTemplate.Inspector != null)
{
SetAttributeValues(feature, featureTemplate.Inspector, assetType.Code);
}
}
});
... View more
05-04-2021
02:55 PM
|
0
|
0
|
1996
|
|
POST
|
Hi Steve, For performance reasons, the Inspector object belonging to a template is only initialized when that template is made the active template (this is achieved by activating a tool on that template), Have you noticed if it is the same template that is causing problems or does it appear to be random? Can you also post a sample of the code that you're using. Thanks Narelle
... View more
05-04-2021
09:47 AM
|
0
|
2
|
2006
|
|
POST
|
Try modifying the row using the row[fieldName] pattern. private void OnRowChanged(RowChangedEventArgs args)
{
var row = args.Row;
var oid = row.GetObjectID();
if (args.EditType == EditType.Change)
{
row["Notes"] = "123";
}
} Let me know if this doesn't work for you. Narelle
... View more
05-04-2021
09:35 AM
|
1
|
1
|
2187
|
|
POST
|
Hi, If the GP tool is run within an edit session then the row events should fire. A GP tool will run in an edit session if there are existing pending edits or if you enable the 'Undo' in the gp tool pane. This is true for the Calculate Field or Delete Rows tools. but not for Copy, copy Rows, Copy Features etc which do not have the 'Enable undo' checkbox on the tool UI. What type of data are you using - shapefile, file geodatabase, enterprise, feature service? Narelle
... View more
05-03-2021
03:00 PM
|
1
|
3
|
2200
|
|
POST
|
Hi Christian, Unfortunately I don't think there is a better way of accomplishing what you're attempting to do right now. I'll add an issue to include an overload for UpdateOverlay on the MapTool and the MapView objects to include the reference scale parameter. These will be in the next release of ArcGIS Pro. Since 2.8 is very close to being released, these methods will be added at the 2.9 release. Thanks Narelle
... View more
04-20-2021
09:17 AM
|
1
|
1
|
2778
|
|
POST
|
Hello, Have you tried the GeometryEngine.Instance.SplitAtPoint function? https://pro.arcgis.com/en/pro-app/latest/sdk/api-reference/#topic27292.html In your scenario the projectOnto and createPart parameters should be false. Narelle
... View more
04-15-2021
09:14 AM
|
0
|
1
|
2772
|
|
POST
|
Hi James, The expected format of a JSON string that supports Zs would have the "hasZ" attribute included. Here's an example of JSON string for a polyline that supports Zs. {"hasZ":true,"paths":[[[100,200,3],[201,300,4],[301,400,5],[401,500,6]]],"spatialReference":{"wkid":102100,"latestWkid":3857}} If that attribute is included, then the geometry resulting from the ImportFromJSON will have .HasZ = true Hope this helps. Narelle
... View more
03-18-2021
05:12 PM
|
0
|
1
|
1319
|
|
POST
|
Hi, You can use the GeometryEngine.Instance.IsSimpleAsFeature method to determine whether the feature is "simple". (ie does not have self-intersections). If the feature is not simple then you would call GeometryEngine.Instance.SimplifyAsFeature to simplify it. https://pro.arcgis.com/en/pro-app/latest/sdk/api-reference/#topic15566.html The Geometry Concepts page has a section describing these two methods https://github.com/Esri/arcgis-pro-sdk/wiki/ProConcepts-Geometry#simplifyasfeature-and-issimpleasfeature Thanks Narelle
... View more
03-16-2021
09:34 AM
|
0
|
0
|
3952
|
|
POST
|
Hi Thomas, If you remove the MaxHeight property of the tableControl do you see the scroll bars correctly? I have the following xaml declaration (I tried to copy yours closely) <Grid x:Name="GeneralGrid">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<ToolBar Grid.Row="0" ToolBarTray.IsLocked="True">
</ToolBar>
<GroupBox Header=" Kontrol" Grid.Row="1">
<Grid x:Name="ControlGrid" ShowGridLines="true">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Grid Grid.Row="0">
<TextBlock Text="Some controls here"/>
</Grid>
<StackPanel Grid.Row="1" Orientation="Horizontal" HorizontalAlignment="Center" Margin="9,5">
<TextBlock Text="Hello world stackpanel"/>
</StackPanel>
<editing:TableControl Grid.Row="2" TableContent="{Binding TableContent}">
</editing:TableControl>
<Button Grid.Row="3" Content="Send" Command="{Binding LoadTableCmd}" Style="{DynamicResource Esri_Button}"/>
</Grid>
</GroupBox>
</Grid>
</UserControl> The table control gets the entire height of grid.Row = 2; which when defined as * means that it takes up the remainder of the dialog after the textblocks and buttons have taken their space. This gives me the following UI (1st - table has no data; 2nd - table has content) If this doesn't seem to be what you're looking for, then consider the ScrollViewer control. In some instances we use a ScrollViewer control to wrap other controls to help with vertical and horizontal scrollbars. <ScrollViewer Grid.Row="0" ScrollViewer.CanContentScroll="True" ScrollViewer.VerticalScrollBarVisibility="Auto" ScrollViewer.HorizontalScrollBarVisibility="Auto">
<Grid Margin="10,10,10,10" >
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<!-- some other controls here that we want to be able to scroll -->
</Grid>
</ScrollViewer> Narelle
... View more
02-25-2021
03:18 PM
|
0
|
0
|
2258
|
|
POST
|
Matthew, I am not seeing any problems in 2.6 with the code you supplied. This is what I have in my tool activation CIMSymbolReference _lineSymbolReference = null;
protected override async Task OnToolActivateAsync(bool active)
{
await base.OnToolActivateAsync(active);
if (_lineSymbolReference == null)
{
_lineSymbolReference = await QueuedTask.Run(() => {
CIMColor lineColor = CIMColor.CreateRGBColor(237, 28, 36);
CIMLineSymbol lineSymbol = SymbolFactory.Instance.ConstructLineSymbol(lineColor, 1.5, SimpleLineStyle.Solid);
return lineSymbol.MakeSymbolReference();
});
}
SketchSymbol = _lineSymbolReference;
}
and this is what I see when I activate the tool and sketch for the first time. Are you perhaps not wanting / expecting to see the green/red sketch vertices and the dotted sketch line that overlays your line? Thanks Narelle
... View more
02-05-2021
01:21 PM
|
0
|
4
|
3563
|
|
POST
|
Hello, The problem here is your data. Annotation data from ArcMap needs to be upgraded in order to be editable and completely recognized within ArcGIS Pro. Use the "Upgrade Dataset" GP tool to accomplish this. You can currently view the ArcMap annotation data in ArcGIS Pro, but if you jump to the "List by Editing" tab of the Contents pane you will see an exclamation point with a tooltip indicating the data is not editable. Once the tool is run, ArcGIS Pro will recognize your data as annotation features.and your code will cast to AnnotationFeatures successfully. But an important note. The Upgrade dataset GP tool will upgrade the feature class "in place". A copy is not made. Once the tool is run, the data can no longer be edited in ArcMap. So if having the data in ArcMap format is important to you then you should make a copy of it first and run the GP tool on the copy. It is not possible to have annotation data editable in both ArcMap and Pro at the same time. In addition, here's some helpful information on working with annotations in the ArcGIS Pro API. https://github.com/Esri/arcgis-pro-sdk/wiki/ProConcepts-Editing-Annotation Hope this helps Narelle
... View more
01-13-2021
09:06 AM
|
1
|
0
|
2197
|
|
POST
|
So now... as the compiler error says you will need to override the LoadFromToolOptions method. This method is used to populate your option value from the internal tool Options structure. The BuffereredLineToolOptionsViewModel in the ConstructionToolWithOptions community sample has an example of this function. protected override Task LoadFromToolOptions()
{
double? buffer = GetToolOption<double?>(nameof(BufferOptionName), DefaultBuffer, null);
_buffer = buffer.Value;
return Task.CompletedTask;
}
... View more
01-07-2021
05:04 PM
|
0
|
1
|
5043
|
|
POST
|
Jeffry, Change your class definition of your viewModel to the following internal class CreatePoints_UIViewModel : ToolOptionsEmbeddableControl, IEditingCreateToolControl The ToolOptionsEmbeddableControl inherits from EmbeddableControl but also implements the methods of IEditingCreateToolControl. This should fix your problem. Looking back at the DevSummit presentation we mentioned adding an EmbeddableControl, but missed mentioning having to change to the ToolOptionsEmbeddableControl. let me know if you still have problems after making this change. Narelle
... View more
01-07-2021
02:14 PM
|
0
|
3
|
5046
|
|
POST
|
Hi Jeffrey, If you could answer the following questions that would help me in trying to work out the problem First... I see from the config.daml desktopVersion attribute that you're using 2.7 with Pro and the Pro SDK. Can you confirm this please. You said that the IEditingCreateToolControl has a red squiggle underline in visual studio. What does the tooltip say if you hover over the squiggle. Also are you able to compile (choose a rebuild rather than just build)? I wouldn't expect you to be able to compile if there is a red squiggle in the code, so if you're able to run Pro with the add-in installed it might be running a version that is not up to date and in synch with your code. Thanks Narelle Thanks Narelle
... View more
01-07-2021
01:39 PM
|
0
|
5
|
5049
|
|
POST
|
Hi Rob, The three tools - Move, Rotate and Scale have a custom UI that links them together that is part of the internal Editing code. Unfortunately it is not something that is customizable via the daml of an add-in. Regards Narelle
... View more
11-24-2020
03:53 PM
|
0
|
0
|
675
|
| 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
|