coidio

problem with scrpt (VB fragstatsbatch)

Discussion created by coidio on Feb 4, 2013
Hi all,

Iâ??m having a problem with the script (VB) Fragstatsbatch for ArcGIS 9.2. After reading carefully the installation notes, It looks that the problem is related with the existence of elements (it is not clear if rasters or shapefiles) with a confusing name on my laptop. I have searched for them (as recommended on the installation notes of the script), and I couldnâ??t find anything wrong. ..

So I tried running the script, introducing breaks in the code. The errorâ?¦
[INDENT][INDENT]
Run-time error â??-2147417848 (80010108)â??:

Automation error
The object invoked has disconnected from its clients.

[/INDENT][/INDENT]

â?¦shows up when the script is in the line marked on red below (part of the original script).

'run code to convert selected graphics to features: arcobjects help: Graphics... Converting sample
'Start an editing session; will edit in workspace of first feature layer (the new temporary file)
'** The following code is from arcobjects help: StartEditing Method **
puid = "esrieditor.Editor"
Set pEditor = Application.FindExtensionByCLSID(puid)
If pEditor.EditState = esriStateEditing Then Exit Sub
'Start editing the workspace of the first featurelayer you find
For LayerCount = 0 To pMap.LayerCount - 1
If TypeOf pMap.Layer(LayerCount) Is IFeatureLayer Then
Set pFeatureLayer = pMap.Layer(LayerCount)
Set pDataset = pFeatureLayer.FeatureClass
pEditor.StartEditing pDataset.Workspace
Exit For
End If
Next LayerCount
'** End start editing sample **

I guess (I donâ??t have a clue about programming on VB) that the error has to do with a graph conversion to feature.

Anyone can help me with this error?. The problem is driving me crazy because I have run the script in other computers without any problemâ?¦ Someone can explain to me the porpouse of this part of code and the cause of crashing on my laptop?

Thank you in advance and I have to apologize if mi question is a little silly or it needs any more explanations.

Outcomes