|
|
| GeoCommunity Mailing List |
| |
| Mailing List Archives |
| Subject: | [gislist] ArcObjects - IWorkspace |
| Date: |
09/30/2003 07:20:01 AM |
| From: |
Lyall Perry |
|
|
Calling all ArcObjects gurus...
I am attempting to construct a prototype Spatial Decision Support System for my thesis. I am constructing it in Visual Basic 6.0 and running it in ArcMap 8.2 as a DLL. Part of that system requires that I load a comma-delimited text file into ArcMap as a table. I am, however, having a great deal of trouble opening a workspace to do it. The code falls in a heap with an "Automation Error" on the "Set pWorkspace" statement in the procedure included below. Variable 'sImportDir' is the explicit pathname to the working directory.
Can anyone suggest what I might be doing wrong or recommend another method of doing it? Any advice would be much appreciated.
Regards, Lyall Perry Graduate Student in Spatial Information Science University of Adelaide South Australia
'--------------------------------------------------------------------------- ----------------------- Private Sub TableImport(sImportDir As String, sImportFile As String) Dim pFact As IWorkspaceFactory Dim pWorkspace As IWorkspace Dim pFeatWS As IFeatureWorkspace Dim pTable As ITable Set pFact = New TextFileWorkspaceFactory Set pWorkspace = pFact.OpenFromFile(sImportDir, m_App.hWnd) ' <<<<< Automation Error Set pFeatWS = pWorkspace Set pTable = pFeatWS.OpenTable(sImportFile) 'Add the table Add_Table_TOC pTable End Sub '--------------------------------------------------------------------------- -----------------------
_______________________________________________ gislist mailing list gislist@lists.geocomm.com http://lists.geocomm.com/mailman/listinfo/gislist
_________________________________ This list is brought to you by The GeoCommunity http://www.geocomm.com/
Get Access to the latest GIS & Geospatial Industry RFPs and bids http://www.geobids.com
|
|

Sponsored by:

For information regarding advertising rates Click Here!
|