I am rewriting ArcObjects .NET Console Application using the Pro SDK. I want to dynamically create / delete shape file in my console application using Pro SDK but i am not finding any documentation for Pro SDK for such requirements.
Can you please provide any code sample for same ?
You will need to use geoprocessing tools probably.
I personally use python to do these types of task. If I want a gui aspect to it I will just put the python script in the solution and run it from there.
public async Task<IGPResult> ExecuteModel()
var progDlg = new ProgressDialog("Running Geoprocessing Tool", "Cancel");
var progSrc = new CancelableProgressorSource(progDlg);
var pathPython = System.IO.Path.GetDirectoryName((new
pathPython = Uri.UnescapeDataString(pathPython);
var tool_path = System.IO.Path.Combine(pathPython, @"PytonToolbox.pyt\Tool");
var parameters = Geoprocessing.MakeValueArray();
IGPResult gp_result = await Geoprocessing.ExecuteToolAsync(tool_path,
parameters, null, new CancelableProgressorSource(progDlg).Progressor);
gp_result.IsFailed ? GPMessageBoxStyle.Error : GPMessageBoxStyle.Default);
Matt is correct. The Pro SDK does not yet support Data Definition Language (DDL) operations directly. If you are writing a Pro Add-in, you need to use the geoprocessing API. In a stand-alone CoreHost application, you need to shell out to a Python script.
The Pro SDK is implemented in terms of ArcObjects. While I've never tried it personally, I expect the two APIs would interfere with each other. It's definitely not supported.