Skip to main content

Good Afternoon,

Is it possible to utilize FMEObjectsDotNet4 with ArcGIS Pro SDK?

I am trying to develop a button using ArcPros SDK, that when a feature is selected in ArcPro and the button is clicked, an FME workbench runs. I currently have the feature selection completed, but when I try to utilize the "GetPublishedParamNames" method, I receive an "System.AccessViolationException: 'Attempted to read or write protected memory" error message.

I'm fairly new to SDKs, so I may be utilizing things incorrectly. Any help would be greatly appreciated.

Thanks!

As an alternative idea, instead of using the FME SDK, create the FME workspace to process a feature. Create a parameter for the OBJECTID field in that workspace.

Themn, in your ArcGIS PRO button, after selecting the feature you get its OBJECTID and then run the FME workspace passing that value as the parameter.

Something similar to this:

string strCmdText = "{path_workspace]" + " --{user_parameter_name} " + {user_parameter_value};
Process process = new Process();
process.StartInfo.FileName = {path_to_fme.exe};
process.StartInfo.Arguments = strCmdText;
process.StartInfo.UseShellExecute = false;
process.StartInfo.RedirectStandardOutput = true;
process.StartInfo.RedirectStandardError = true;
process.Start();
string output = process.StandardOutput.ReadToEnd();
string err = process.StandardError.ReadToEnd();
process.WaitForExit();

 


Reply