Hi,
Greetings of the day,
I m new to the microststion v8i programing.Previously we are using bentley map selectseries1. Now upgraded to selectseries3. In new version i m unable to find the definition for "GDIExplorerAddIn.instance.oraclenode" and "treeform". But in the previous version those are available. while using latest version i got the following error.
Error 460 'Bentley.Geospatial.DataInterchange.GDIExplorerAddIn' does not contain a definition for 'OracleNode' and no extension method 'OracleNode' accepting a first argument of type 'Bentley.Geospatial.DataInterchange.GDIExplorerAddIn' could be found (are you missing a using directive or an assembly reference?) D:\Vishnu Vardhan_16505\Projects\Sasktel\Sources_series3\TeeM_NG_Functionality\TeeM_NG_Functionality\GDIExplorerExampleCode.cs 30 47 TeeM_NG_Functionality.
Can any one please help me to fix these errors regarding GDIExplorerAddin.
Thanks in advance,
Regards,
VishnuVardhan.
Greetings,
For the Bentley Map V8i (SELECTseries 3) 08.11.09 release, you will need to refactor some of your code. For example, your connection to the registered Oracle Spatial graphical source can now be done as follows:
// This code opens the first Oracle graphical source using the supplied username and passwordif (GDI.GDIExplorerAddIn.Instance != null && GDI.GDIExplorerAddIn.Instance.ConnectionsNode != null) opened = (GDI.GDIExplorerAddIn.Instance.ConnectionsNode.OpenFirstGraphicalSource(user, password) != null);
For the TreeForm reference, it no longer exists and should not be required. I would have to see the complete code to determine that.
Jeff Bielefeld [Bentley]
Thank You Jeff,
By using the above code some of my errors are fixed. But iam unable to find the solution for treeform reference error.
the erro description is
Error 460 'Bentley.Geospatial.DataInterchange.GDIExplorerAddIn' does not contain a definition for 'TreeForm' and no extension method 'TreeForm' accepting a first argument of type 'Bentley.Geospatial.DataInterchange.GDIExplorerAddIn' could be found (are you missing a using directive or an assembly reference?) D:\Vishnu Vardhan_16505\Projects\Sasktel\Sources_series3\TeeM_NG_Functionality\TeeM_NG_Functionality\GDIExplorerExampleCode.cs 32 71 TeeM_NG_Functionality
in the method
public static bool OpenFirstOracleGraphicalSource(string user, string password)
{
bool opened = false;
if (GeoDataInterchangeAddIn.Instance.MasterFileImport != null)
return true;
//this code opens the first Oracle graphical source using the supplied username and password
if (GDIExplorerAddIn.Instance != null)
if (GDIExplorerAddIn.Instance.ConnectionsNode == null)
ExplorerTreeForm form = GDIExplorerAddIn.Instance.TreeForm;
if (form == null)
return false;
}
if (GDIExplorerAddIn.Instance.ConnectionsNode != null)
opened = (GDIExplorerAddIn.Instance.ConnectionsNode.OpenFirstGraphicalSource(user, password) != null);
return opened;
As mentioned the TreeForm reference should no longer be necessary. Your OpenFirstOracleGraphicalSouroce method should work as follows:
public static bool OpenFirstOracleGraphicalSource(string user, string password){ bool opened = false; if (GeoDataInterchangeAddIn.Instance.MasterFileImport != null) return true; //this code opens the first Oracle graphical source using the supplied username and password if (GDI.GDIExplorerAddIn.Instance != null && GDI.GDIExplorerAddIn.Instance.ConnectionsNode != null) opened = (GDI.GDIExplorerAddIn.Instance.ConnectionsNode.OpenFirstGraphicalSource(user, password) != null); return opened;}
public static bool OpenFirstOracleGraphicalSource(string user, string password){ bool opened = false; if (GeoDataInterchangeAddIn.Instance.MasterFileImport != null) return true;
//this code opens the first Oracle graphical source using the supplied username and password if (GDI.GDIExplorerAddIn.Instance != null && GDI.GDIExplorerAddIn.Instance.ConnectionsNode != null) opened = (GDI.GDIExplorerAddIn.Instance.ConnectionsNode.OpenFirstGraphicalSource(user, password) != null);
return opened;}
Hello, i have a question,
what is the syntax to select series 3?
i can´t connect to net services oracle spatial because this get an error in GDIExplorerOracleImportsNode or OracleNode,
C# Code:
GDI.GDIExplorerOracleImportsNode oracleNode = GDI.GDIExplorerAddIn.Instance.OracleNode;
if (oracleNode != null && oracleNode.CountSubNodes() == 0)
ECSTORAGE.IECStorage storage = GDI.GeoDataInterchangeAddIn.Instance.OpenOracleStorage(userName, userName, password, serviceName, false);
if (storage != null)
GDI.GDIExplorerOracleNode node = new GDI.GDIExplorerOracleNode("Current Session");
node.AddStorage(userName + "@" + serviceName, storage, false, null);
oracleNode.AddSubNode(node);
Luis,
Are you attempting to connect to an Oracle database instance that has been defined in the Bentley Geospatial Administrator as a registered graphical source?