<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
</head>
<body bgcolor="#FFFFFF" text="#000000">
I am in need of a little help.<br>
I have created a shapefile, which represents the extent and location
of a DXF. Within the shapefiles attributes is the file location. <br>
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<br>
<br>
qgis.utils.iface.addVectorLayer('[% "LOCATION" %]','[% "MAP_NUMBER"
%]',\
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;"> 'OGR')<br>
<br>
</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;">and</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br>
qgis.utils.iface.addVectorLayer('<i>(insert file path)</i>/[%
"SCALE" %]/[% "MAP_NUMBER" %].dxf','[% "MAP_NUMBER" %]',\</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;"> 'OGR')</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br>
</p>
Every time I run the actions I get an error "The layer <i>F:...[insert
path here.dxf</i>] is not a valid layer and can not be added to
the map"<br>
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.<br>
Any help in this would be appreciated.<br>
Regards & Thanks,<br>
<br>
Richard.<br>
<br>
<br>
<p><span style="font-family:'Arial';font-size:8pt;"> </span></p>
<p><span style="font-family:'Arial';font-size:8pt;">**********************************************************************</span></p>
<p><span style="font-family:'Arial';font-size:8pt;">Email Disclaimer: http://www.opw.ie/en/disclaimer/ </span></p>
<p><span style="font-family:'Arial';font-size:8pt;">**********************************************************************</span></p>
<p><span style="font-family:'Arial';font-size:8pt;"> </span></p></body>
</html>