[Qgis-user] qgis 2.12.3 Lyon Dimensioning
Richard Duivenvoorde
rdmailings at duif.net
Thu Feb 18 01:34:17 PST 2016
On 18-02-16 09:47, Chris Wouters wrote:
> Hello
>
>
>
> Why does the plug-in Dimensioning in this version does not work? I get
> always this message : "Traceback (most recent call last):
>
> File "C:/Users/cw/.qgis2/python/plugins\dimensioning\dimensioning.py",
> line 121, in calculateDimensioning
> tools.utils.addGeometryToDimensionLayer( f, "help" )
>
> File "C:/Users/cw/.qgis2/python/plugins\dimensioning\tools\utils.py",
> line 35, in addGeometryToDimensionLayer
> QgsMapLayerRegistry().instance().addMapLayer(vl, True)
>
> TypeError: qgis._core.QgsMapLayerRegistry cannot be instantiated or
> sub-classed". Thanks for help!
Hi Chris,
instead of
QgsMapLayerRegistry().instance().addMapLayer(vl, True)
do
QgsMapLayerRegistry.instance().addMapLayer(vl, True)
(removing the '()')
and it should work. This line should be on
"C:/Users/cw/.qgis2/python/plugins\dimensioning\tools\utils.py" line 35
But even better, contact the plugin author or create an issue, see
http://plugins.qgis.org/plugins/dimensioning/
Regards,
Richard
More information about the Qgis-user
mailing list