[Qgis-user] QGIS Actions Help

Richard McDonnell richard.mcdonnell at opw.ie
Wed Jan 15 04:31:17 PST 2014


Apologies if this is the incorrect forum for this, but I am in need of a 
little help.
Ill keep this as simple as I can, Id I create a shapefile, which 
represents the extent and location of a dxf. within the attributes is 
the file location, lets call it LOCATION.
I have looked for an action which would insert the DXF into the map 
canvas as required, the action I am currently trying is

qgis.utils.iface.addVectorLayer('[% "LOCATION" %]','[% "MAP_NUMBER" %]',\

'OGR')

and


qgis.utils.iface.addVectorLayer('/(insert file path)//[% "SCALE" %]/[% 
"MAP_NUMBER" %].dxf','[% "MAP_NUMBER" %]',\

'OGR')



every time I run the actions I get an error "The layer /F:...insert path 
here.dxf/ is not a valid layer and can not be added to the map"
I have other Actions which open the DXF in a CAD Program, and one which 
displays the file name, so I know the Location works and is valid. I 
just cant seem to get it to work.

Regards & Thanks,

Richard.





**********************************************************************
Email Disclaimer: http://www.opw.ie/en/disclaimer/ 
**********************************************************************

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20140115/8aaeb473/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: richard_mcdonnell.vcf
Type: text/x-vcard
Size: 381 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20140115/8aaeb473/attachment.vcf>


More information about the Qgis-user mailing list