<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
</head>
<body text="#000000" bgcolor="#FFFFFF">
Apologies if this is the incorrect forum for this, but I am in need
of a little help.<br>
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. <br>
I have looked for 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>
<br>
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 work.<br>
<br>
Regards & Thanks,<br>
<br>
Richard.<br>
<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>