<HTML xmlns="http://www.w3.org/TR/REC-html40" xmlns:v =
"urn:schemas-microsoft-com:vml" xmlns:o =
"urn:schemas-microsoft-com:office:office" xmlns:w =
"urn:schemas-microsoft-com:office:word" xmlns:m =
"http://schemas.microsoft.com/office/2004/12/omml"><HEAD>
<META content="text/html; charset=utf-8" http-equiv=Content-Type>
<META name=Generator content="Microsoft Word 14 (filtered medium)">
<STYLE><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></STYLE>
</HEAD>
<BODY dir=ltr lang=EN-NZ link=blue vLink=purple>
<DIV dir=ltr>
<DIV style="FONT-FAMILY: 'Times New Roman'; COLOR: #00002b; FONT-SIZE: 12pt">
<DIV>Thanks, I missed that. However I still get only the second table
blocks. The first table entities is missed.</DIV>
<DIV> </DIV>
<DIV>Bob</DIV>
<DIV
style="FONT-STYLE: normal; DISPLAY: inline; FONT-FAMILY: 'Calibri'; COLOR: #000000; FONT-SIZE: small; FONT-WEIGHT: normal; TEXT-DECORATION: none">
<DIV style="FONT: 10pt tahoma">
<DIV> </DIV>
<DIV style="BACKGROUND: #f5f5f5">
<DIV style="font-color: black"><B>From:</B> <A title=Conor_Boyd@trimble.com
href="mailto:Conor_Boyd@trimble.com">Conor Boyd</A> </DIV>
<DIV><B>Sent:</B> Sunday, February 12, 2012 12:01 PM</DIV>
<DIV><B>To:</B> <A title=delphi@listserver.123.net.nz
href="mailto:delphi@listserver.123.net.nz">NZ Borland Developers Group - Delphi
List</A> </DIV>
<DIV><B>Subject:</B> Re: [DUG] Shell Execute</DIV></DIV></DIV>
<DIV> </DIV></DIV>
<DIV
style="FONT-STYLE: normal; DISPLAY: inline; FONT-FAMILY: 'Calibri'; COLOR: #000000; FONT-SIZE: small; FONT-WEIGHT: normal; TEXT-DECORATION: none">
<DIV class=WordSection1>
<P class=MsoNormal><SPAN
style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: #1f497d; FONT-SIZE: 11pt">Unless
I’m reading it wrong, you’re missing a backslash in the path that you’re
constructing to the ogr2ogr binary.<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: #1f497d; FONT-SIZE: 11pt"><o:p></o:p></SPAN> </P>
<P class=MsoNormal><SPAN style="COLOR: #00002b">ProgramName
:=<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="COLOR: #00002b">
'"'+s+'\Quantum GIS Wroclaw\bin'+<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="COLOR: #00002b">'ogr2ogr"<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: #1f497d; FONT-SIZE: 11pt"><o:p></o:p></SPAN> </P>
<P class=MsoNormal><SPAN
style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: #1f497d; FONT-SIZE: 11pt">I
think there should be a slash after the “bin”?<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: #1f497d; FONT-SIZE: 11pt"><o:p></o:p></SPAN> </P>
<DIV>
<DIV
style="BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; BORDER-TOP: #b5c4df 1pt solid; BORDER-RIGHT: medium none; PADDING-TOP: 3pt">
<P class=MsoNormal><B><SPAN
style="FONT-FAMILY: 'Tahoma','sans-serif'; FONT-SIZE: 10pt"
lang=EN-US>From:</SPAN></B><SPAN
style="FONT-FAMILY: 'Tahoma','sans-serif'; FONT-SIZE: 10pt" lang=EN-US>
delphi-bounces@listserver.123.net.nz
[mailto:delphi-bounces@listserver.123.net.nz] <B>On Behalf Of </B>Bob
Pawley<BR><B>Sent:</B> Monday, 13 February 2012 6:54 a.m.<BR><B>To:</B>
DUG<BR><B>Subject:</B> [DUG] Shell Execute<o:p></o:p></SPAN></P></DIV></DIV>
<P class=MsoNormal><o:p></o:p> </P>
<DIV>
<DIV>
<DIV>
<P class=MsoNormal><SPAN style="COLOR: #00002b">Hi <o:p></o:p></SPAN></P></DIV>
<DIV>
<P class=MsoNormal><SPAN
style="COLOR: #00002b"> <o:p></o:p></SPAN></P></DIV>
<DIV>
<P class=MsoNormal><SPAN style="COLOR: #00002b">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.<o:p></o:p></SPAN></P></DIV>
<DIV>
<P class=MsoNormal><SPAN
style="COLOR: #00002b"> <o:p></o:p></SPAN></P></DIV>
<DIV>
<P class=MsoNormal><SPAN style="COLOR: #00002b">The following two part code
performs well when I copy and paste it into command
prompt.<o:p></o:p></SPAN></P></DIV>
<DIV>
<P class=MsoNormal><SPAN
style="COLOR: #00002b"> <o:p></o:p></SPAN></P></DIV>
<DIV>
<P class=MsoNormal><SPAN style="COLOR: #00002b">However when I use it in shell
execute there is a problem getting both parts to run
together.<o:p></o:p></SPAN></P></DIV>
<DIV>
<P class=MsoNormal><SPAN
style="COLOR: #00002b"> <o:p></o:p></SPAN></P></DIV>
<DIV>
<P class=MsoNormal><SPAN style="COLOR: #00002b">In shell execute each part of
the code does its thing when the other part is commented
out.<o:p></o:p></SPAN></P></DIV>
<DIV>
<P class=MsoNormal><SPAN
style="COLOR: #00002b"> <o:p></o:p></SPAN></P></DIV>
<DIV>
<P class=MsoNormal><SPAN style="COLOR: #00002b">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.<o:p></o:p></SPAN></P></DIV>
<DIV>
<P class=MsoNormal><SPAN
style="COLOR: #00002b"> <o:p></o:p></SPAN></P></DIV>
<DIV>
<P class=MsoNormal><SPAN style="COLOR: #00002b">I either get “unable to run” or
the second part of the code is recognized with the first part being
ignored.<o:p></o:p></SPAN></P></DIV>
<DIV>
<P class=MsoNormal><SPAN
style="COLOR: #00002b"> <o:p></o:p></SPAN></P></DIV>
<DIV>
<P class=MsoNormal><SPAN style="COLOR: #00002b">The following is my command
prompt code – which works as shown<o:p></o:p></SPAN></P></DIV>
<DIV>
<P class=MsoNormal><SPAN
style="COLOR: #00002b"> <o:p></o:p></SPAN></P></DIV>
<DIV>
<P class=MsoNormal><SPAN style="COLOR: #00002b">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 <o:p></o:p></SPAN></P></DIV>
<DIV>
<P class=MsoNormal><SPAN
style="COLOR: #00002b"> <o:p></o:p></SPAN></P></DIV>
<DIV>
<P class=MsoNormal><SPAN
style="COLOR: #00002b"> <o:p></o:p></SPAN></P></DIV>
<DIV>
<P class=MsoNormal><SPAN style="COLOR: #00002b">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" <o:p></o:p></SPAN></P></DIV>
<DIV>
<P class=MsoNormal><SPAN
style="COLOR: #00002b"> <o:p></o:p></SPAN></P></DIV>
<DIV>
<P class=MsoNormal><SPAN
style="COLOR: #00002b"> <o:p></o:p></SPAN></P></DIV>
<DIV>
<P class=MsoNormal><SPAN style="COLOR: #00002b">Here is the shell execute code
which is giving me a challenge -<o:p></o:p></SPAN></P></DIV>
<DIV>
<P class=MsoNormal><SPAN
style="COLOR: #00002b"> <o:p></o:p></SPAN></P></DIV>
<DIV>
<P class=MsoNormal><SPAN style="COLOR: #00002b">ProgramName
:=<o:p></o:p></SPAN></P></DIV>
<DIV>
<P class=MsoNormal><SPAN style="COLOR: #00002b">
'"'+s+'\Quantum GIS Wroclaw\bin'+<o:p></o:p></SPAN></P></DIV>
<DIV>
<P class=MsoNormal><SPAN style="COLOR: #00002b">'ogr2ogr" "-f"
'+<o:p></o:p></SPAN></P></DIV>
<DIV>
<P class=MsoNormal><SPAN
style="COLOR: #00002b">'"PostgreSQL";'+<o:p></o:p></SPAN></P></DIV>
<DIV>
<P class=MsoNormal><SPAN style="COLOR: #00002b">' PG:"host='+DBHost+'
user=postgres dbname='+DBName+' password='+Pass+'" "'+ DXFfile +'"
'+<o:p></o:p></SPAN></P></DIV>
<DIV>
<P class=MsoNormal><SPAN style="COLOR: #00002b">' --config DXF_INLINE_BLOCKS
FALSE --config DXF_MERGE_BLOCK_GEOMETRIES FALSE --config DXF_ENCODING=UTF8
'+<o:p></o:p></SPAN></P></DIV>
<DIV>
<P class=MsoNormal><SPAN style="COLOR: #00002b">' -lco DIM=2 -nlt GEOMETRY
-overwrite -skipfailures'+<o:p></o:p></SPAN></P></DIV>
<DIV>
<P class=MsoNormal><SPAN style="COLOR: #00002b">' -sql "select layer, linetype,
subclasses, ogr_style, blockname, blockangle, blockscale, text from
entities"'+<o:p></o:p></SPAN></P></DIV>
<DIV>
<P class=MsoNormal><SPAN style="COLOR: #00002b">
'"'+s+'\Quantum GIS Wroclaw\bin'+<o:p></o:p></SPAN></P></DIV>
<DIV>
<P class=MsoNormal><SPAN
style="COLOR: #00002b">'ogr2ogr""-f"'+<o:p></o:p></SPAN></P></DIV>
<DIV>
<P class=MsoNormal><SPAN style="COLOR: #00002b">'
"PostgreSQL";'+<o:p></o:p></SPAN></P></DIV>
<DIV>
<P class=MsoNormal><SPAN style="COLOR: #00002b">'PG:"host='+DBHost+'
user=postgres dbname='+DBName+' password='+Pass+'" "'+ DXFfile +'"
'+<o:p></o:p></SPAN></P></DIV>
<DIV>
<P class=MsoNormal><SPAN style="COLOR: #00002b">' --config DXF_INLINE_BLOCKS
FALSE --config DXF_MERGE_BLOCK_GEOMETRIES FALSE --config DXF_ENCODING=UTF8
'+<o:p></o:p></SPAN></P></DIV>
<DIV>
<P class=MsoNormal><SPAN style="COLOR: #00002b">' -lco DIM=2 -nlt GEOMETRY
-overwrite -skipfailures'+<o:p></o:p></SPAN></P></DIV>
<DIV>
<P class=MsoNormal><SPAN style="COLOR: #00002b">' -sql "select layer, linetype,
subclasses, ogr_style, blockname, text from
blocks"';<o:p></o:p></SPAN></P></DIV>
<DIV>
<P class=MsoNormal><SPAN
style="COLOR: #00002b"> <o:p></o:p></SPAN></P></DIV>
<DIV>
<P class=MsoNormal><SPAN style="COLOR: #00002b">Thanks in advance for any
suggestions.<o:p></o:p></SPAN></P></DIV>
<DIV>
<P class=MsoNormal><SPAN
style="COLOR: #00002b"> <o:p></o:p></SPAN></P></DIV>
<DIV>
<P class=MsoNormal><SPAN
style="COLOR: #00002b">Bob<o:p></o:p></SPAN></P></DIV></DIV></DIV></DIV>
<P>
<HR>
_______________________________________________<BR>NZ Borland Developers Group -
Delphi mailing list<BR>Post: delphi@listserver.123.net.nz<BR>Admin:
http://delphi.org.nz/mailman/listinfo/delphi<BR>Unsubscribe: send an email to
delphi-request@listserver.123.net.nz with Subject:
unsubscribe</DIV></DIV></DIV></BODY></HTML>