|
POST
|
If you create a layout with a map that only contains that feature service layer you still get the error? If so can you attach the json?
... View more
01-07-2021
01:18 PM
|
0
|
0
|
1231
|
|
POST
|
As far as Newton.JSON see this Pro SDK requirement: third-party-assemblies ... the Nuget has 800 million downloads, so it's commonly used (including by ArcGIS Pro). As far as multiple polygon rings, you can see that your coordinates are stored in a multi dimensional array so it should handle any number of parts. The length of the first dimension holds your number of rings.
... View more
01-07-2021
11:57 AM
|
1
|
0
|
11040
|
|
POST
|
This is how i usually do it: Copy your [valid] JSON string to the Clipboard In Visual Studio: Create a new cs class file in your project Delete the create class stub in the new class file and use Edit -> Paste Special -> Paste as JSON Classes This will create the classes you need to deserialize the JSON. See below for the classes that i got from your post above. You need to add the Newton.JSON nuget to your project (VS will suggest that to you once you add the code below) Now you can use this code to deserialize the JSON string var json = /// this is your json string
var parsedJson = JsonConvert.DeserializeObject<Rootobject>(json);
MessageBox.Show($@"parsed json: features {parsedJson.features.Length}"); Here is the auto generated class model that represents your JSON: public class Rootobject
{
public string type { get; set; }
public Crs crs { get; set; }
public Feature[] features { get; set; }
}
public class Crs
{
public string type { get; set; }
public Properties properties { get; set; }
}
public class Properties
{
public string name { get; set; }
}
public class Feature
{
public string type { get; set; }
public Geometry geometry { get; set; }
public Properties1 properties { get; set; }
}
public class Geometry
{
public string type { get; set; }
public float[][][][] coordinates { get; set; }
}
public class Properties1
{
public object SRVNAME { get; set; }
} Also because of the unfortunate naming used in your JSON you will get some naming conflicts like for example for 'Geometry', 'Feature' etc. which also exist in the Pro SDK namespace. To get an Pro Geometry you have loop through the coordinates to get your 'rings', and for each 'ring' the coordinate collection: public float[][][][] coordinates Use Polygon Builder to create you polygon and add each 'ring' as a Part: https://pro.arcgis.com/en/pro-app/latest/sdk/api-reference/#topic8490.html ... use a List<Coordinate2D> to add each 'ring' as a part to your polygon.
... View more
01-07-2021
10:39 AM
|
3
|
6
|
11048
|
|
POST
|
Ok, i understand now. I don't think that CoreHost is what you looking for. CoreHost requires a valid Pro license and making it run on Linux is not as easy as one might think because CoreHost only represents the client-side for an underlying service infrastructure that actually performs all the work. So the whole stack client/services would have to be ported to run on Linux. As for using a SQLite mobile Geodatabase, i would not really consider this to be an 'open' platform because only the physical access to data is 'open' (meaning that access is available on Windows, Linux, etc), on the logical access level the internal data and metadata formats of a GeoDatabase are not a published as an open standard (like for example the shape file format). Depending on your use case you could consider the Pro Plugin Datasource this would allow you to access features and rows in any kind of format from within ArcGIS Pro. Pro Plugins allow access to spatial and non-spatial data stored in files or databases, but Pro Plugins can only read and display the data (no writes) in Pro. By using a Pro Plugin you could use a SQLite database that is authored on Linux, write your spatial and non-spatial data into table (using any format) and then use a Pro Plugin Datasource to allow 'seamless' read-only access to that data. If your use case requires the data to be authored on ArcGIS Pro and 'read' or 'written' on Linux i would consider to use shape files.
... View more
01-06-2021
10:15 AM
|
0
|
0
|
5084
|
|
POST
|
I am using ArcGIS Pro 2.7, created a Mobile SQLite database (using the GP Tool), and copied some point data into a SQLite feature class. I was able to read/write data to/from that SQLite database by just accessing it via the Geodatabase API. I haven't tried to access the data via a CoreHost app yet, but i think that should work as well, so i am not sure why you need to hold off until it is supported. Can you explain your use case that requires you to read the data via Microsoft.Data.Sqlite? Below is a screenshot of 2.7 showing Points from a SQLite database.
... View more
01-06-2021
08:37 AM
|
0
|
3
|
5088
|
|
POST
|
I will make the developer of this control aware of this issue. However, there is a solution to get the selected row for a TableControl by using the ActiveRowIndex attribute of the TableControl. In order to illustrate this i update this sample: Map-Exploration - TableControlsDockpane sample I updated the XAML in Map-Exploration\TableControlsDockpane\AttributeTable.xaml by adding the ActiveRowIndex attribute to my TableControl: <TabControl.ContentTemplate>
<DataTemplate>
<editing:TableControl TableContent="{Binding TableContent}"
RowContextMenu="{Binding RowContextMenu}"
ActiveRowIndex="{Binding ActiveRowIdx, Mode=TwoWay}"
SelectedRowContextMenu="{Binding RowContextMenu}" />
</DataTemplate>
</TabControl.ContentTemplate> And then i added the following code snippet to Map-Exploration\TableControlsDockpane\TabItemViewModel.cs: private int _lastRowIdx = -1;
private int _ActiveRowIdx;
public int ActiveRowIdx
{
get { return _ActiveRowIdx; }
set
{
_ActiveRowIdx = value;
NotifyPropertyChanged(nameof(ActiveRowIdx));
var tableControl = VisualTreeRoot.GetChildOfType<TableControl>();
if (tableControl != null)
{
var rowIdx = tableControl.ActiveRowIndex;
if (rowIdx == _lastRowIdx) return;
_lastRowIdx = rowIdx;
System.Diagnostics.Debug.WriteLine($@"row: {rowIdx}");
_ = GetObjectIdAsync(tableControl, rowIdx);
}
}
}
public async Task<long> GetObjectIdAsync (TableControl tableControl, int rowIdx)
{
var oid = await tableControl.GetObjectIdAsync(rowIdx);
ArcGIS.Desktop.Framework.Dialogs.MessageBox.Show ($@"rowIdx: {rowIdx} has OID: {oid}");
return oid;
} The trick is to add "Mode=TwoWay" to the ActiveRowIndex attribute in XAML and that ActiveRowIndex is also set when the row is unselected. Running the code is get this:
... View more
01-05-2021
09:06 AM
|
1
|
1
|
2349
|
|
POST
|
I don't have a sample to read the blob data from a Mobile Geodatabase but I have a snippet that reads the blob data from a Personal Geodatabase. It's been a while since i worked with Mobile data and i am not sure if the format is the same, But if you try this you will need the blob buffer and the spatial reference to get the Geometry back: private static Geometry GetGeometryFromBuffer(byte[] geomBuffer, SpatialReference sr)
{
var geomType = GetGeometryType(geomBuffer);
switch (geomType)
{
case GeometryType.Point:
{
var mp = MapPointBuilder.FromEsriShape(geomBuffer, sr);
//System.Diagnostics.Debug.WriteLine($@"x: {x} = {mp.X} y: {y} = {mp.Y}");
return mp;
}
case GeometryType.Polyline:
{
var line = PolylineBuilder.FromEsriShape(geomBuffer, sr);
return line;
}
case GeometryType.Polygon:
{
var poly = PolygonBuilder.FromEsriShape(geomBuffer, sr);
return poly;
}
}
return null;
}
private static GeometryType GetGeometryType(byte[] buffer, int offset = 0)
{
// read the shape type
int typeInt = BitConverter.ToInt32(buffer, offset);
int type = (int)(typeInt & (int)0x000000FF);
switch (type)
{
case 0:
return GeometryType.Unknown;
case 1:
// A point consists of a pair of double-precision coordinates.
case 21:
// A PointM consists of a pair of double-precision coordinates
// in the order X, Y, plus a measure M.
case 11:
// A PointZM consists of a triplet of double-precision coordinates plus a measure.
case 9:
// A PointZ consists of a triplet of double-precision coordinates in the order X, Y, Z
// where Z usually represents height.
return GeometryType.Point;
case 3:
// PolyLine is an ordered set of vertices that consists of one or more parts.
// A part is a connected sequence of two or more points. Parts may or may not
// be connected to one another. Parts may or may not intersect one another.
case 23:
// A shapefile PolyLineM consists of one or more parts. A part is a connected
// sequence of two or more points. Parts may or may not be connected to one
// another. Parts may or may not intersect one another.
case 13:
// A shapefile PolyLineZM consists of one or more parts. A part is a
// connected sequence of two or more points. Parts may or may not be connected
// to one another. Parts may or may not intersect one another.
case 10:
// A PolyLineZ consists of one or more parts. A part is a connected
// sequence of two or more points. Parts may or may not be connected
// to one another. Parts may or may not intersect one another.
return GeometryType.Polyline;
case 5:
// A polygon consists of one or more rings. A ring is a connected sequence
// of four or more points that form a closed, non-self-intersecting loop.
// A polygon may contain multiple outer rings. The order of vertices or
// orientation for a ring indicates which side of the ring is the interior of
// the polygon. The neighborhood to the right of an observer walking along
// the ring in vertex order is the neighborhood inside the polygon. Vertices
// of rings defining holes in polygons are in a counterclockwise direction.
// Vertices for a single, ringed polygon are, therefore, always in clockwise
// order. The rings of a polygon are referred to as its parts.
case 25:
// A PolygonM consists of a number of rings. A ring is a closed, non-self-intersecting loop.
case 15:
// A PolygonZM consists of a number of rings. A ring is a closed, non-self-intersecting loop.
case 19:
// A PolygonZ consists of a number of rings. A ring is a closed, non-self-intersecting loop.
// A PolygonZ may contain multiple outer rings. The rings of a PolygonZ are referred to as
// its parts.
return GeometryType.Polygon;
case 50:
// GeneralPolyline
return GeometryType.Polyline;
case 51:
// GeneralPolygon
return GeometryType.Polygon;
case 52:
// GeneralPoint
return GeometryType.Point;
// not supported: 31: MultiPatchM
// not supported: 32: MultiPatch
// not supported: 53: GeneralMultiPoint
// not supported: 54: GeneralMultiPatch
default:
throw new Exception($@"Unknown shape type {type}");
}
}
... View more
01-04-2021
05:07 PM
|
1
|
7
|
5100
|
|
POST
|
It appears that viewing the TableControl in the XAML designer is throwing an exception when the TableControl is opened in Design mode. This issue should only have an effect on your add-in in XAML Designer, the TableControl should work properly in runtime mode. I will report the issue to the developer of the control. Thanks for reporting this.
... View more
01-04-2021
11:46 AM
|
1
|
0
|
1223
|
|
POST
|
Yes you can pass parameters. If you search for CommandParameter in the XAML for this sample: ProWindow MVVM you can find an example of RelayCommand parameters.
... View more
12-16-2020
10:50 AM
|
0
|
1
|
5079
|
|
POST
|
Under the Pro UI Framework the data context is set using the className attribute of the dockpane tag from the config.daml. In the config.daml snippet below, the DataContext is set to FlightDataViewModel for the FlightDataView view class. This is done when the Dockpane is activated for the first time. <dockPane id="xxxx" caption="..." className="FlightDataViewModel" dock="bottom">
<content className="FlightDataView" />
</dockPane> In order to show/hide a dockpane you can use this code: string _dockPaneID = "xxxx"; // DockPane ID from config.daml above
DockPane pane = FrameworkApplication.DockPaneManager.Find(_dockPaneID);
// pane not found
if (pane == null) return null;
// pane is already displaying
if (pane.IsVisible) return pane;
// activate (show) the pane, Activate method has optional focus parameter
pane.Activate();
// or hide the pane
pane.Hide();
... View more
12-15-2020
02:58 PM
|
0
|
1
|
5091
|
|
POST
|
Sorry about the delay but we started with the 2.7 Pro & Pro SDK release, so we were very busy for the last few days. Regarding your UI design, I would definitely go with a Dockpane. Dockpanes are singletons and can be docked or can be floating, they will also open automatically if Pro was closed with a dockpane open, making it the better choice. As for the ProWindow, there is a MVVM samples available here: arcgis-pro-sdk-community-samples/Framework/ProWindowMVVM at master · Esri/arcgis-pro-sdk-community-samples (github.com) Regarding the approach you took with the solution you attached, you cannot use any ArcGIS Pro components (like ProWindow, Dockpane) unless the component is part of either an 'Add-in Module' or a 'Managed Configuration'. Both (add-ins and configurations) are run from within ArcGIS Pro as extensions and they cannot be run from standalone WPF applications. Pro SDK UI components require the UI Framework that is built into ArcGIS Pro. You can look through our samples to get an idea of what is possible with the Pro SDK UI. Most samples have a few screen shots attached to the documentations, like for example here (scroll to the bottom of the page to get the description on how to use the app): arcgis-pro-sdk-community-samples/Map-Exploration/BingStreetside at master · Esri/arcgis-pro-sdk-community-samples (github.com) I hope this helps.
... View more
12-15-2020
01:40 PM
|
0
|
1
|
5095
|
|
POST
|
Sorry about this, but the answers on both items are no. There is no support for Java currently or planned with the Pro SDK.
... View more
12-10-2020
02:08 PM
|
1
|
0
|
2001
|
|
POST
|
Can you attach a sample solution (a simple add-in with your ProWindow) that includes your issue? Our ProWindow item template doesn't support MVVM out of box.
... View more
12-10-2020
02:01 PM
|
0
|
2
|
5257
|
|
POST
|
Hi Douglas, The upcoming 2.7 release has a symbol picker control as part of the SDK. The symbol picker displays a 'preview' image of the symbol in a listbox (just like Pro does). Regarding your question: you have a CIMSymbol and want to either display a 'preview image' for that symbol or extract the JSON to display the JSON string? We have a sample here: arcgis-pro-sdk-community-samples/Map-Authoring/CustomSymbolPicker at master · Esri/arcgis-pro-sdk-community-samples (github.com) that might provide some inside, but if you can describe your desired workflow in more detail i can probably guide you in the right direction.
... View more
12-09-2020
04:48 PM
|
1
|
1
|
2457
|
|
POST
|
Hi Brian, I have to correct my previous reply as this statement was wrong: The version tag in the config daml is actually only used to prevent an add-in from being loaded and run on an older version of Pro. The desktopVersion tag (see below) is actually used to prevent an add-in from being loaded and run on an older version of Pro. The version tag (1.25 in the sample snippet below) dictates which add-in (with the same "AddinInfo id") will be loaded by ArcGIS Pro as Pro will always load the add-in with highest version value. So for example you publish version=1.01 on your network share where everybody's Pro can use that add-in, you can then increment the version to version=1.02 on your development machine and now your machine will always load the 1.02 version. <AddInInfo id="{ba4449fa-76b4-4d5a-9d07-0e0162aeeb3a}" version="1.25" desktopVersion="2.5.0">
...
</AddInInfo>
... View more
12-09-2020
02:52 PM
|
1
|
0
|
2777
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 10-29-2025 10:48 AM | |
| 1 | 05-24-2021 09:04 AM | |
| 1 | 12-03-2020 08:44 AM | |
| 1 | 10-07-2025 07:27 AM | |
| 2 | 12-29-2025 10:03 AM |
| Online Status |
Offline
|
| Date Last Visited |
05-21-2026
01:59 PM
|