|
POST
|
With the release of ArcGIS Pro 2.6, the FeatureLayer.GetPath method is now available.
... View more
07-29-2020
01:07 PM
|
1
|
0
|
2908
|
|
POST
|
The AuthenticationMode property should now be returning the correct value in Pro 2.6.
... View more
07-29-2020
01:05 PM
|
0
|
2
|
3475
|
|
POST
|
As promised, the Pro 2.6 release adds an InsertCursor class, accessible via Table.CreateInsertCursor.
... View more
07-29-2020
01:05 PM
|
1
|
1
|
4719
|
|
POST
|
In Pro 2.6, GetPath() is now available on tables and other datasets.
... View more
07-29-2020
01:03 PM
|
0
|
0
|
3662
|
|
POST
|
The ability to change the owner of a version was added to Pro 2.6. This functionality is only available with branch versioning.
... View more
07-29-2020
01:01 PM
|
0
|
0
|
1719
|
|
POST
|
Hi Ryan, Unfortunately, I'm still not able to reproduce this in CoreHost. My stripped down test code (which does nothing interesting with the results) is attached. You could change out the service name and table name and see if it works on your system. Let me know how it turns out, --Rich using ArcGIS.Core.Hosting;
using System;
using System.Collections.Generic;
using System.Linq;
using ArcGIS.Core.Data;
using Version = ArcGIS.Core.Data.Version;
namespace CoreHostSandbox
{
class Program
{
//[STAThread] must be present on the Application entry point
[STAThread]
static void Main(string[] args)
{
//Call Host.Initialize before constructing any objects from ArcGIS.Core
Host.Initialize();
Sandbox mySandbox = new Sandbox();
mySandbox.Do();
}
}
class Sandbox
{
const string FeatureServiceName = @"https://richruh.esri.com/server/rest/services/TableTestBranchVersioning/FeatureServer";
const string EditVersionName = "VersionDifferencesTestSuiteVersion";
const string CityTableName = "L0Cities";
const DifferenceType DifferenceTypeToCheck = DifferenceType.Insert;
private Version _defaultVersion = null;
private Geodatabase _defaultGeodatabase = null;
private FeatureClass _defaultCitiesFeatureClass = null;
private Version _editVersion = null;
private Geodatabase _editGeodatabase = null;
private FeatureClass _editCitiesFeatureClass = null;
public void Do()
{
ServiceConnectionProperties serviceConnectionProperties = new ServiceConnectionProperties(new Uri(FeatureServiceName));
using (Geodatabase geodatabase = new Geodatabase(serviceConnectionProperties))
{
TestSuiteSetup(geodatabase);
try
{
// Fetch all of the ObjectIDs found in the cursor
List<long> differences = new List<long>();
using (DifferenceCursor differenceCursor = _editCitiesFeatureClass.Differences(_defaultCitiesFeatureClass, DifferenceTypeToCheck))
{
while (differenceCursor.MoveNext())
{
differences.Add(differenceCursor.ObjectID);
if (DifferenceTypeToCheck != DifferenceType.DeleteNoChange)
{
differenceCursor.Current.Dispose();
}
}
}
Console.WriteLine("Differences= " + differences.ToString());
}
catch (Exception e)
{
Console.WriteLine("FAIL: Exception thrown: " + e.Message + "\n");
}
TestSuiteTeardown();
}
}
//TestSuiteSetup
private void TestSuiteSetup(Geodatabase geodatabase)
{
using (VersionManager versionManager = geodatabase.GetVersionManager())
using (Version currentVersion = versionManager.GetCurrentVersion())
{
// Connect to the default version
_defaultVersion = GetDefaultVersion(currentVersion);
_defaultGeodatabase = _defaultVersion.Connect();
_defaultCitiesFeatureClass = _defaultGeodatabase.OpenDataset<FeatureClass>(CityTableName);
// Connect to the edit version
_editVersion = versionManager.GetVersions().First(v => v.GetName().Contains(EditVersionName));
_editGeodatabase = _editVersion.Connect();
_editCitiesFeatureClass = _editGeodatabase.OpenDataset<FeatureClass>(CityTableName);
}
}
//TestSuiteTeardown - clean up the stuff we created in TestSuiteSetup
private void TestSuiteTeardown()
{
_defaultVersion.Dispose();
_defaultGeodatabase.Dispose();
_defaultCitiesFeatureClass.Dispose();
_editCitiesFeatureClass.Dispose();
_editGeodatabase.Dispose();
_editVersion.Dispose();
}
private Version GetDefaultVersion(Version version)
{
Version parentVersion = version.GetParent();
if (parentVersion == null)
{
return version;
}
else
{
return parentVersion;
}
}
}
}
... View more
07-27-2020
03:41 PM
|
2
|
3
|
4617
|
|
POST
|
Helen, The code you have listed, using the SqlConnection and SqlCommand classes, comes from a Microsoft library, not from ArcObjects. You can continue to use it just fine. --Rich
... View more
07-23-2020
09:13 AM
|
0
|
1
|
2677
|
|
POST
|
The Pro SDK doesn't allow you to edit non-geodatabase tables. You could either add that SQL table to a geodatabase, or edit it using non-ArcGIS routines. The easiest solution would be to register the table with a geodatabase? Is there a reason you cannot do this? --Rich p.s. Technically, you can also edit a non-geodatabasea table if it is published as part of a feature service, but that seems like using a sledgehammer to hang a picture frame.
... View more
07-22-2020
04:32 PM
|
0
|
3
|
2677
|
|
POST
|
Oh. That is a very interesting development. While it certainly should work in CoreHost, my tests in this case also run in an add-in. Let me try it in CoreHost and get back to you. --Rich
... View more
07-22-2020
01:00 PM
|
1
|
0
|
4617
|
|
POST
|
Hi Helen, Just to clarify, when you say "stand alone sql table base" are you referring to a table in a database and not a geodatabase? That is, a database that has not been registered as a geodatabase? --Rich
... View more
07-21-2020
04:09 PM
|
0
|
5
|
2677
|
|
POST
|
Hi Ryan, I don't see any problems with your code. I set up some similar code and stepped through it with a debugger and Fiddler. On my machine, calling versionManager.GetVersions() is calling startReading on every version on the service. Do you have fiddler installed, and, if so, could you tell me what output is created by that call on your machine? Some other general questions: 1. What version of Pro are you running? 2. Are all of the version names/tables names, etc. correct? (i.e., you don't have any unexpected null pointers in your code) 3. Can you do a version differences with this version in the Pro user interface? Thanks, --Rich
... View more
07-21-2020
03:56 PM
|
2
|
7
|
4617
|
|
POST
|
Well, depending on your workflow, you can always call the Append geoprocessing tool from the Pro SDK. --Rich
... View more
07-20-2020
09:25 AM
|
1
|
0
|
4719
|
|
POST
|
Hi Kieren, In the upcoming Pro 2.6 release, we're adding an InsertCursor class, that you can obtain by calling Table.CreateInsertCursor(). This might help you. For many feature classes, this will be several times faster. There are exceptions though, and relationships with messaging are one of those exceptions. This occurs if you're using anno, attachments, or composite relationships. In these cases, the performance won't be worse, but it won't be better either. I would definitely try this in 2.6 when it becomes available. Since you mentioned branch versioning and utility networks, are you trying to insert these records into default or a version? --Rich
... View more
07-17-2020
08:48 AM
|
0
|
12
|
4719
|
|
POST
|
That's correct. What I meant was that you could create a method called "SetFoo(xxx)" (or whatever) and then another add-in (button, pane, or external process) could pass data in that way. Actually, the "SetFoo(xxx)" method would probably need to go on another object in the same dll, and these objects would have to talk to one another. For all of this- there's no ArcGIS mechanism to pass data down to your plugin, but there are ways you could do it. --Rich
... View more
07-15-2020
04:50 PM
|
1
|
0
|
1212
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 12-13-2024 11:22 AM | |
| 2 | 01-29-2026 09:34 AM | |
| 2 | 01-28-2026 08:20 AM | |
| 1 | 12-10-2025 09:15 AM | |
| 2 | 11-30-2025 12:23 PM |
| Online Status |
Offline
|
| Date Last Visited |
a week ago
|