I would like to use the GDI without user interface within my own C# .net AddIn.
I have saved settings for different WFS imports in an impx file for each import. Within my own AddIn, I have an user interface, that result in an selected impx file. After that I want to use the GDI with the selected impx file. I know of the KeyIn "gdi import file=g:\import1.impx", but would like to use the gdi class instead of if possible.
Someone who knows how to do this?
Hi sha,
There is no documented public API to do this. Is there any reason your application cannot issue the key-in?
Thanks,
Todd.
So sorry I didn't respond earlier.
@Jan - thanks, I found the code snippets. The code snippets didn't cover WFS import directly, but was a help in understanding the Geospatial Data Interchange API.
@Todd - the program requirements changed several times, so for a while I have used the key-in.
Right now the status on the user interface is:
1) to avoid the window "WFS connect". Our users don't know anything about URL, username or password. The window appears both on using the key-in and by using the GDI API.
2) to avoid long wait, by trying to split "opening the import file" and "performing the import"
I have the following code:
using BGDI = Bentley.Geospatial.DataInterchange;
...
BGDI.GDIExplorerImportsNode importsNode = BGDI.GDIExplorerAddIn.Instance.ImportsNode;
BGDI.GDIExplorerImportNode importNode = importsNode.OpenImportFile(_impxFile);
importNode.Import(true);
where the method .OpenImportFile(_impxFile) opens the window "WFS connet" (I have tried the overload method, with the additionaly arguments for username and password - looked like the arguments was ignored. The impx-files contains a "Username"-parameter)
Does anyone have the solution to 1) avoid the "WFS connect" windows?
(and I might not be able to solve 2) by making background work on the single instance of the GDIExplorerAddIn ;-) - but I will try)