[Qgis-user] Action to insert DXF into Map Canvas
Richard McDonnell
richard.mcdonnell at opw.ie
Wed Feb 5 08:39:47 PST 2014
I am in need of a little help.
I have created a shapefile, which represents the extent and location of
a DXF. Within the shapefiles attributes is the file location.
I am trying to create 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 insert the DXF.
Any help in this would be appreciated.
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/20140205/bdc86986/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/20140205/bdc86986/attachment.vcf>
More information about the Qgis-user
mailing list