On 11 September 2015 at 23:53, Hugo Mercier <[email protected]> wrote:
> Another question: I am trying to access the current atlas geometry from
> a plugin, but fail to do so.
> From the python console, with a atlas in preview mode :
> QgsExpression.specialColumn("$atlasgeometry") -> None
> QgsExpression("$atlasgeometry").evaluate() -> None
>
> However, if I set a layer's label to "$atlasfeatureid", I get the right
> label ...
>
> Is it intended ? I guess that is because the "global" expression
> evaluation has no atlas context ?
That's true. Is there any reason you aren't accessing the atlas
feature/geometry directly? Why go through the expression engine to
retrieve this?
Nyall
_______________________________________________
Qgis-developer mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/qgis-developer