# \[GiDlist\] GiDlist Digest, Vol 36, Issue 7

**URL:** <https://forum.gidsimulation.com/t/gidlist-gidlist-digest-vol-36-issue-7/294>\
**Category:** 2013 - 2005\
**Created:** [July 26, 2013, 8:05am UTC](https://forum.gidsimulation.com/t/gidlist-gidlist-digest-vol-36-issue-7/294 "2013-07-26T08:05:39Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![\_38738\_26757\_29038\_3](https://forum.gidsimulation.com/letter_avatar_proxy/v4/letter/_/3da27b/32.png) [@\_38738\_26757\_29038\_3](https://forum.gidsimulation.com/u/_38738_26757_29038_3)\
**Post date:** [July 26, 2013, 8:05am UTC](https://forum.gidsimulation.com/t/gidlist-gidlist-digest-vol-36-issue-7/294/1 "2013-07-26T08:05:39Z")

</div>

Sir  
Thank you for your kind advice!  
Maybe another way is we can import the terrain model from other CAD software (such as CAD or CUBIT, save the model as .iges or .dxf file then import into GID), Thank you!  
  
  
Hui Liu  
Wuhan,Hubei Province  
  
  
  
  
------------------ Original ------------------  
From: "gidlist-request"[gidlist-request at listas.cimne.upc.edu](http://listas.cimne.upc.edu/cgi-bin/mailman/listinfo/gidlist)&gt  
Date: Wed, Jul 24, 2013 06:00 PM  
To: "gidlist"[gidlist at listas.cimne.upc.edu](http://listas.cimne.upc.edu/cgi-bin/mailman/listinfo/gidlist)&gt

Subject: GiDlist Digest, Vol 36, Issue 7  
  
  
  
Send GiDlist mailing list submissions to  
[gidlist at listas.cimne.upc.edu](http://listas.cimne.upc.edu/cgi-bin/mailman/listinfo/gidlist)

To subscribe or unsubscribe via the World Wide Web, visit  
[http://listas.cimne.upc.edu/cgi-bin/mailman/listinfo/gidlist](http://listas.cimne.upc.edu/cgi-bin/mailman/listinfo/gidlist)  
or, via email, send a message with subject or body ‘help’ to  
[gidlist-request at listas.cimne.upc.edu](http://listas.cimne.upc.edu/cgi-bin/mailman/listinfo/gidlist)

You can reach the person managing the list at  
[gidlist-owner at listas.cimne.upc.edu](http://listas.cimne.upc.edu/cgi-bin/mailman/listinfo/gidlist)

When replying, please edit your Subject line so it is more specific  
than “Re: Contents of GiDlist digest…”  
  
  
Today’s Topics:

1. Re: How to establish a 3D terrain model (Enrique Escolano)  
  
\

* * *

Message: 1  
Date: Tue, 23 Jul 2013 22:28:03 +0200  
From: “Enrique Escolano” [escolano at cimne.upc.edu](http://listas.cimne.upc.edu/cgi-bin/mailman/listinfo/gidlist)  
Subject: Re: [GiDlist] How to establish a 3D terrain model  
To: [gidlist at listas.cimne.upc.edu](http://listas.cimne.upc.edu/cgi-bin/mailman/listinfo/gidlist)  
Message-ID: 1d21601ce87e3$22ab9840$6802c8c0$@cimne.upc.edu  
Content-Type: text/plain; charset=“iso-2022-jp”

There are different possibilities, depending on the kind of available data,

Typical terrain cases are:

1- Unstructured cloud of points, e.g. a text data with x,y,z  
coordinates

2- Level curves, e.g. dxf format with some kind curves of z=constant

3- A collection of unstructured triangles or other polygons, in formats  
like dxf, stl, shapefile ?

4- A structured grid of points z(x,y), e.g. Arc/Gis data or several  
raster formats like geotiff

…  
  
  
  
If you are in the case 4) then you can try for example to import them with  
Files-Import-GDAL? , the open file dialog offer some extra options to  
create elements or geometry surfaces, and subsample the data if the grid is  
too dense.  
  
  
  
If you are in the case 1) you can try Files-Import-XYZ points or XYZ nodes

and then do you have an interesting extra option to connect the points  
triangulating them in XY projection, to create automatically surfaces  
  
  
  
Other possibility is to import only the points, and create a single NURBS  
surface that approximate the selected points with Geometry-Create-NURBS  
surface-By points  
  
  
  
  
  
Enrique Escolano  
  
  
  
  
  
De: [gidlist-bounces at listas.cimne.upc.edu](http://listas.cimne.upc.edu/cgi-bin/mailman/listinfo/gidlist)  
[mailto:[gidlist-bounces at listas.cimne.upc.edu](http://listas.cimne.upc.edu/cgi-bin/mailman/listinfo/gidlist)] En nombre de ???  
Enviado el: domingo, 21 de julio de 2013 4:47  
Para: GiDlist  
Asunto: [GiDlist] How to establish a 3D terrain model  
  
  
  
Hello  
  
  
  
I’d like to know how to set up a 3D model with topography, I already  
have the terrain elevation data, such as .DEM or .XYZ data. How can GID  
import them and about the interpolation work. I find it is hard to make a  
satisfied .geo model.

I am very appreciated to hear from you and thank you for your  
advice?  
  
  
  
best wishes

-------------- next part --------------  
An HTML attachment was scrubbed…  
URL: [http://listas.cimne.upc.edu/pipermail/gidlist/attachments/20130723/7b15c69b/attachment.html](http://listas.cimne.upc.edu/pipermail/gidlist/attachments/20130723/7b15c69b/attachment.html)

* * *

* * *

GiDlist mailing list  
[GiDlist at listas.cimne.upc.edu](http://listas.cimne.upc.edu/cgi-bin/mailman/listinfo/gidlist)  
[http://listas.cimne.upc.edu/cgi-bin/mailman/listinfo/gidlist](http://listas.cimne.upc.edu/cgi-bin/mailman/listinfo/gidlist)  
  
  
End of GiDlist Digest, Vol 36, Issue 7

* * *

.  
-------------- next part --------------  
An HTML attachment was scrubbed…  
URL: [http://listas.cimne.upc.edu/pipermail/gidlist/attachments/20130726/0e7e254e/attachment.htm](http://listas.cimne.upc.edu/pipermail/gidlist/attachments/20130726/0e7e254e/attachment.htm)

---

<div class="post-metadata">

**Author:** ![Simon\_Bance](https://forum.gidsimulation.com/letter_avatar_proxy/v4/letter/s/ed8c4c/32.png) [@Simon\_Bance](https://forum.gidsimulation.com/u/Simon_Bance)\
**Post date:** [August 5, 2013, 8:25am UTC](https://forum.gidsimulation.com/t/gidlist-gidlist-digest-vol-36-issue-7/294/2 "2013-08-05T08:25:18Z")

</div>

Greetings to the GiD community,

I am attempting to call a .bch batch script in GiD 11.0.4 with the command  
command = “C:/GID/GiD11/gid.exe -b batch.bch -n”  
from inside a Python script using os.system(command).  
I receive an error window message:

“Error:  
Error setting environment variables  
Check for more info to files in directory:  
C:\Users\me\AppData\Local\Temp\gid24”

where the number 24 is incrementing each time.

Checking the suggested info file it only contains the same message!

I have checked that the batch file works in interactive mode and have made  
sure GiD runs as administrator. I have also turned off the User Account  
Control (UAC) in Windows. But none of this helps.  
Please could you suggest a workaround or perhaps I am missing a command  
line option (I tried some but I believe the -n option should avoid all  
graphical windows already).

Thank you and best wishes  
Simon  
-------------- next part --------------  
An HTML attachment was scrubbed…  
URL: [http://listas.cimne.upc.edu/pipermail/gidlist/attachments/20130805/15f77174/attachment.htm](http://listas.cimne.upc.edu/pipermail/gidlist/attachments/20130805/15f77174/attachment.htm)

---

<div class="post-metadata">

**Author:** ![escolano](https://forum.gidsimulation.com/user_avatar/forum.gidsimulation.com/escolano/32/6_2.png) [@escolano](https://forum.gidsimulation.com/u/escolano)\
**Post date:** [August 5, 2013, 11:12am UTC](https://forum.gidsimulation.com/t/gidlist-gidlist-digest-vol-36-issue-7/294/3 "2013-08-05T11:12:25Z")

</div>

GiD for Windows doesnt require any environment variable.  
  
  
  
The error is that you are trying to use as folder separator the character  
/ , but this is for Linux!! for Windows this character must be \  
  
  
  
Be careful : the character \ for C/C++/Python strings has a special meaning  
, is also the escape character used to print special symbols, like  or   
itself.

\ à 

\ à \

You must use something like this  
  
  
  
command = “\C:\GID\GiD11\gid.exe\ -b batch.bch -n”

os.system(command)  
  
  
  
note that gid.exe is enclosed with quotes, required in case its path has  
spaces

and batch.bch is a relative path, you can set the full path or the current  
folder must be path that contain batch.bch  
  
  
  
e.g. if this file is located in C:\temporary file\batch.bch could use

os.chdir(C:\temporary file)

os.system(command)  
  
  
  
or specify its full path

command = “\C:\GID\GiD11\gid.exe\ -b \C:\temporary file\batch.bch\  
-n”  
  
  
  
I have tried with Pyton (Enthought Canopy Python 2.7.3) from a command line  
console and it works well  
  
  
  
Enrique Escolano  
  
  
  
De: [gidlist-bounces at listas.cimne.upc.edu](http://listas.cimne.upc.edu/cgi-bin/mailman/listinfo/gidlist)  
[mailto:[gidlist-bounces at listas.cimne.upc.edu](http://listas.cimne.upc.edu/cgi-bin/mailman/listinfo/gidlist)] En nombre de Simon Bance  
Enviado el: lunes, 5 de agosto de 2013 10:25  
Para: [gidlist at listas.cimne.upc.edu](http://listas.cimne.upc.edu/cgi-bin/mailman/listinfo/gidlist)  
Asunto: [GiDlist] GiD 11.0.4 cannot set environment variables in batch mode  
(Win7x64)  
  
  
  
Greetings to the GiD community,

I am attempting to call a .bch batch script in GiD 11.0.4 with the command

command = “C:/GID/GiD11/gid.exe -b batch.bch -n”

from inside a Python script using os.system(command).

I receive an error window message:

"Error:

Error setting environment variables

Check for more info to files in directory:

C:\Users\me\AppData\Local\Temp\gid24"

where the number 24 is incrementing each time.

Checking the suggested info file it only contains the same message!  
  
  
  
I have checked that the batch file works in interactive mode and have made  
sure GiD runs as administrator. I have also turned off the User Account  
Control (UAC) in Windows. But none of this helps.

Please could you suggest a workaround or perhaps I am missing a command line  
option (I tried some but I believe the -n option should avoid all graphical  
windows already).

Thank you and best wishes

Simon

-------------- next part --------------  
An HTML attachment was scrubbed…  
URL: [http://listas.cimne.upc.edu/pipermail/gidlist/attachments/20130805/6e0429e2/attachment.htm](http://listas.cimne.upc.edu/pipermail/gidlist/attachments/20130805/6e0429e2/attachment.htm)

---

<div class="post-metadata">

**Author:** ![Simon\_Bance](https://forum.gidsimulation.com/letter_avatar_proxy/v4/letter/s/ed8c4c/32.png) [@Simon\_Bance](https://forum.gidsimulation.com/u/Simon_Bance)\
**Post date:** [August 6, 2013, 2:12pm UTC](https://forum.gidsimulation.com/t/gidlist-gidlist-digest-vol-36-issue-7/294/4 "2013-08-06T14:12:54Z")

</div>

Dear Enrique,  
Thank you very much for your thoughtful response. I think I have fixed the  
problem with your help but I would like to discuss it further in order to  
help other people who may have similar problems in the future. I disagree  
with some of the things you said.

GiD for Windows doesn?t require any environment variable.  
  
  
OK thanks… I’m glad I no longer have to worry about that.

The error is that you are trying to use as folder separator the character  
_?/? , but this is for Linux!! for Windows this character must be ??_

You are correct that the forward slash is used by Linux and the backward  
slash by Windows but actually Windows has no trouble interpreting both  
correctly!  
I always use the forward slash in such scripts because it means my scripts  
will also work cross-platform including on my Linux machines.  
If you don’t believe me, try replacing some of your backslashes with  
forward slashes on the Windows command line! 🙂  
Also, having to use the backslash when defining paths in Python would be  
hassle because, like you said, every single one must be escaped using a  
double slash and could not be simply copied from Windows Explorer, for  
example.

note that gid.exe is enclosed with quotes, required in case its path has  
_spaces_

---

<div class="post-metadata">

**Author:** ![escolano](https://forum.gidsimulation.com/user_avatar/forum.gidsimulation.com/escolano/32/6_2.png) [@escolano](https://forum.gidsimulation.com/u/escolano)\
**Post date:** [August 6, 2013, 2:53pm UTC](https://forum.gidsimulation.com/t/gidlist-gidlist-digest-vol-36-issue-7/294/5 "2013-08-06T14:53:58Z")

</div>

More comments about this topic.  
  
  
  
Windows accepts ‘Linux like forward slash’ but only sometimes, not  
everywhere, and not all Windows versions !!
