Hi
I’m having a further problem with shell execute. There seems to be a dearth of
information on the web other than a simple “open” procedure.
The following two part code performs well when I copy and paste it into command
prompt.
However when I use it in shell execute there is a problem getting both parts to
run together.
In shell execute each part of the code does its thing when the other part is
commented out.
I have tried joining the two parts with the ogr2ogr command &&, and as it
appears below. I have also removed the second path to ogr2ogr with no joy.
I either get “unable to run” or the second part of the code is recognized with
the first part being ignored.
The following is my command prompt code – which works as shown
set PGCLIENTENCODING=LATIN1&&set DXF_ENCODING=LATIN1&&set
DXF_INLINE_BLOCKS=FALSE&&set DXF_MERGE_BLOCK_GEOMETRIES=FALSE&&ogr2ogr -f
"PostgreSQL" PG:"host=localhost user=postgres dbname=*** password=*****"
Water2000.dxf -lco DIM=2 -nlt GEOMETRY -sql "select layer, linetype,
subclasses, ogr_style, blockname, blockangle, blockscale, text from entities"
-append -update -skipfailures
set PGCLIENTENCODING=LATIN1&&set DXF_ENCODING=LATIN1&&set
DXF_INLINE_BLOCKS=FALSE&&set DXF_MERGE_BLOCK_GEOMETRIES=FALSE&&ogr2ogr -f
"PostgreSQL" PG:"host=localhost user=postgres dbname=*** password=****"
Water2000.dxf -lco DIM=2 -nlt GEOMETRY -append -update -skipfailures -sql
"select layer, linetype, subclasses, ogr_style, blockname, text from blocks"
Here is the shell execute code which is giving me a challenge -
ProgramName :=
'"'+s+'\Quantum GIS Wroclaw\bin'+
'ogr2ogr" "-f" '+
'"PostgreSQL";'+
' PG:"host='+DBHost+' user=postgres dbname='+DBName+' password='+Pass+'" "'+
DXFfile +'" '+
' --config DXF_INLINE_BLOCKS FALSE --config DXF_MERGE_BLOCK_GEOMETRIES FALSE
--config DXF_ENCODING=UTF8 '+
' -lco DIM=2 -nlt GEOMETRY -overwrite -skipfailures'+
' -sql "select layer, linetype, subclasses, ogr_style, blockname, blockangle,
blockscale, text from entities"'+
'"'+s+'\Quantum GIS Wroclaw\bin'+
'ogr2ogr""-f"'+
' "PostgreSQL";'+
'PG:"host='+DBHost+' user=postgres dbname='+DBName+' password='+Pass+'" "'+
DXFfile +'" '+
' --config DXF_INLINE_BLOCKS FALSE --config DXF_MERGE_BLOCK_GEOMETRIES FALSE
--config DXF_ENCODING=UTF8 '+
' -lco DIM=2 -nlt GEOMETRY -overwrite -skipfailures'+
' -sql "select layer, linetype, subclasses, ogr_style, blockname, text from
blocks"';
Thanks in advance for any suggestions.
Bob_______________________________________________
NZ Borland Developers Group - Delphi mailing list
Post: [email protected]
Admin: http://delphi.org.nz/mailman/listinfo/delphi
Unsubscribe: send an email to [email protected] with
Subject: unsubscribe