Patch gvsig.py
Patch to the [gvsig-install-folder]/gvSIG/extensiones/org.gvsig.scripting.extension/scripting/lib/gvsig.py
In the header of file, add the import:
from org.gvsig.fmap.mapcontext.layers.vectorial import FLyrVect
In the method "getLayer" of class "View", the last lines should be
ls = self.getLayers() for i in xrange(ls.getLayersCount()): l = ls.getLayer(i) if l.name == name: if isinstance(layer, FLyrVect): return Layer(l) else: return l return None
Changed the "return Layer(l)" by a "if" with a "isinstance".
Care with the indentation!
Whenever you modify this file you must restart gvSIG for the changes to take effect