Dear Neil,
I belive you can help me on following issue:
all what I need is to Open an ArcScene, create a FileGDB (testGDB.gdb), create a FeatureClass inside of it and add a Polyline to it, add the feature class as a Layer to my ArcScene.
I have written following codes :
::CoInitialize(NULL);
ArcGISVersionLib::IArcGISVersionPtr ipVer(__uuidof(ArcGISVersionLib::VersionManager));
VARIANT_BOOL succeeded;
if (FAILED(ipVer->LoadVersion(ArcGISVersionLib::esriArcGISDesktop, L"10.0", &succeeded)))
return 0;
OLE_HANDLE iphWnd = NULL;
//Connect to ArcScene
IAppROTPtr mpAppROT(CLSID_AppROT);
IApplicationPtr ipApplication(CLSID_AppRef); //---------> I get here always class is not registered BUT, I ArcScene opens !!!!
ISxDocumentPtr ipSxDoc(CLSID_SxDocument);
IDocumentPtr ipDoc(ipSxDoc);
ipDoc->get_Parent(&ipApplication);
ipApplication->put_Visible(VARIANT_TRUE);
ipApplication->get_hWnd(&iphWnd);
IMapPtr ipMap(CLSID_Map);
then I start creating my FileGDB:
IWorkspaceFactoryPtr ipWkspFct(CLSID_FileGDBWorkspaceFactory);
IWorkspaceNamePtr ipWkspNam(CLSID_WorkspaceName);
ipWkspFct->Create(NULL, gdbName, NULL, NULL, &ipWkspNam);
up to here, it works properly and the gdb gets created.
IWorkspacePtr ipWksp(CLSID_Workspace);
ipWkspFct->OpenFromFile(gdbPath, NULL, &ipWksp); //-------> here is the problem ! always NULL for ipWksp.
Any Idea !? as I am a new VC++ programmer, please give me some instructions !
I have ArcGIS Desktop 10.0 and VS2008
Thank you vor any help 🙂
Nazereh