[GiDlist] execution of external mesher

Moderator: GiD Team

Post Reply
Andreas Friedberg

[GiDlist] execution of external mesher

Post by Andreas Friedberg »

Hi Enrique,

thanks for your advice. The creation of the input file for the external
mesher works fine. But I have a problem with the execution of the external
mesher. When I try to execute the mesher from within a tcl procedure, I get
an error message. It seems to me that the path to that mesher is wrong, but
I checked it and couldn't find any fault. Here is the tcl procedure from
which I want to start the mesher:

proc Vernetzen {w} {

global NetzPriv
global GeometriePriv
global VoreinstellungPriv
global HalbraumartPriv
global Projektverzeichnis

set Projektname [lindex [.central.s info project] 1]

set Inputdateibis [join [list $Projektname "gid"] .]
set Inputdatei [join [list $Inputdateibis "D3D_gid_msh.in"] /]

set 1000 [list $GeometriePriv(afx) $GeometriePriv(afy)
$GeometriePriv(lax) $GeometriePriv(lay) $GeometriePriv(bx)
$GeometriePriv(by)]
set 1010 [list $NetzPriv(aex) $NetzPriv(aey)]
set 1020 [list $NetzPriv(aebx) $NetzPriv(aeby)]

set channel [open $Inputdatei w]

puts $channel "! Input-File für das Programmsystem D3D ab Version 3.200"
puts $channel ":0000 ! Titel"
puts $channel "Netzausgabe für GiD"
puts $channel "!"
puts $channel ":0010 ! BerechnungsArt"

if { $VoreinstellungPriv(Belastungsart) == " schlaffe_Last " } {

puts $channel "1" }

if { $VoreinstellungPriv(Belastungsart) == " starre_Platte " } {

puts $channel "2" }

if { $VoreinstellungPriv(Belastungsart) == " elastische_Platte " } {

puts $channel "3" }

puts $channel "!"
puts $channel ":1000 ! AnzFlaeche_x AnzFlaeche_y Abstand_x Abstand_y
Breite_x Breite_y"
puts $channel $1000
puts $channel "!"
puts $channel ":1010 ! Elementierung der Platte: PlatTlgX PlatTlgY"
puts $channel $1010
puts $channel "!"
puts $channel ":1020 ! Teilung in Bodenelemente: x-Richtung y-Richtung"
puts $channel $1020
puts $channel "!"
puts $channel ":1099 ! Abstand_z"
puts $channel $NetzPriv(afb)
puts $channel "!"

close $channel

set KopierInputdatei [file join $Projektverzeichnis [file tail
$Inputdatei]]

file delete $KopierInputdatei
file copy $Inputdatei $KopierInputdatei

set Mesher [file join $Projektverzeichnis D3D_gid_msh.exe]

file attributes $Mesher -shortname

WarnWinText $Mesher
WarnWinText $KopierInputdatei

exec $Mesher
#...
}

Here is where I get the error message.
I also tried to execute the mesher with the following line:

exec $Mesher $KopierInputdatei

but I got the same error message.
The error message reads as follows:

C:\Programme\GiD\GiD7.2\D3D_gid_msh.in
Image PC
Routine Line
Source
D3D_gid_msh.exe
0040F102 Unknown Unknown Unknown
D3D_gid_msh.exe
0040EF03 Unknown Unknown Unknown
D3D_gid_msh.exe
0040E0C4 Unknown Unknown Unknown
D3D_gid_msh.exe
0040E33E Unknown Unknown Unknown
D3D_gid_msh.exe
00406565 Unknown Unknown Unknown
D3D_gid_msh.exe
00401806 Unknown Unknown Unknown
D3D_gid_msh.exe
004011D2 Unknown Unknown Unknown
D3D_gid_msh.exe
00431809 Unknown

The path that is indicated at the beginning of the error message doesn't
exist, because I didn't copy or create the input file for the mesher
(D3D_gid_msh.in) in the directory of gid. I don't have any clue what the
rest of the error message means.

thanks for response,

regards, Andreas



_________________________________________________________________
Hotmail - Absolut kostenfrei! Der weltweit größte E-Mail-Anbieter im Netz:
http://www.msn.de/hotmail
Enrique Escolano

[GiDlist] execution of external mesher

Post by Enrique Escolano »

If you have installed tcl/tk (can download from http://tcl.activestate.com)
, the you can open a
tcl/tk console (Whish or tkcon) to try to run outside GiD with exec your
program.

Your code always try to read from a file named "D3D_gid_msh.in" located in
the same directory as D3D_gid_msh.exe?
It is best to expect from your code the filename as command line parameter,
else cannot be used "exec $Mesher $KopierInputdatei"

Enrique

----- Original Message -----
From: "Andreas Friedberg" andreasfriedberg at hotmail.com
To: gidlist at gatxan.cimne.upc.es
Sent: Wednesday, January 29, 2003 2:16 PM
Subject: [GiDlist] execution of external mesher


Hi Enrique,

thanks for your advice. The creation of the input file for the external
mesher works fine. But I have a problem with the execution of the external
mesher. When I try to execute the mesher from within a tcl procedure, I
get
an error message. It seems to me that the path to that mesher is wrong,
but
I checked it and couldn't find any fault. Here is the tcl procedure from
which I want to start the mesher:

proc Vernetzen {w} {

global NetzPriv
global GeometriePriv
global VoreinstellungPriv
global HalbraumartPriv
global Projektverzeichnis

set Projektname [lindex [.central.s info project] 1]

set Inputdateibis [join [list $Projektname "gid"] .]
set Inputdatei [join [list $Inputdateibis "D3D_gid_msh.in"] /]

set 1000 [list $GeometriePriv(afx) $GeometriePriv(afy)
$GeometriePriv(lax) $GeometriePriv(lay) $GeometriePriv(bx)
$GeometriePriv(by)]
set 1010 [list $NetzPriv(aex) $NetzPriv(aey)]
set 1020 [list $NetzPriv(aebx) $NetzPriv(aeby)]

set channel [open $Inputdatei w]

puts $channel "! Input-File für das Programmsystem D3D ab Version
3.200"
puts $channel ":0000 ! Titel"
puts $channel "Netzausgabe für GiD"
puts $channel "!"
puts $channel ":0010 ! BerechnungsArt"

if { $VoreinstellungPriv(Belastungsart) == " schlaffe_Last " } {

puts $channel "1" }

if { $VoreinstellungPriv(Belastungsart) == " starre_Platte " } {

puts $channel "2" }

if { $VoreinstellungPriv(Belastungsart) == " elastische_Platte " } {

puts $channel "3" }

puts $channel "!"
puts $channel ":1000 ! AnzFlaeche_x AnzFlaeche_y Abstand_x Abstand_y
Breite_x Breite_y"
puts $channel $1000
puts $channel "!"
puts $channel ":1010 ! Elementierung der Platte: PlatTlgX PlatTlgY"
puts $channel $1010
puts $channel "!"
puts $channel ":1020 ! Teilung in Bodenelemente: x-Richtung
y-Richtung"
puts $channel $1020
puts $channel "!"
puts $channel ":1099 ! Abstand_z"
puts $channel $NetzPriv(afb)
puts $channel "!"

close $channel

set KopierInputdatei [file join $Projektverzeichnis [file tail
$Inputdatei]]

file delete $KopierInputdatei
file copy $Inputdatei $KopierInputdatei

set Mesher [file join $Projektverzeichnis D3D_gid_msh.exe]

file attributes $Mesher -shortname

WarnWinText $Mesher
WarnWinText $KopierInputdatei

exec $Mesher
#...
}

Here is where I get the error message.
I also tried to execute the mesher with the following line:

exec $Mesher $KopierInputdatei

but I got the same error message.
The error message reads as follows:

C:\Programme\GiD\GiD7.2\D3D_gid_msh.in
Image PC
Routine Line
Source
D3D_gid_msh.exe
0040F102 Unknown Unknown Unknown
D3D_gid_msh.exe
0040EF03 Unknown Unknown Unknown
D3D_gid_msh.exe
0040E0C4 Unknown Unknown Unknown
D3D_gid_msh.exe
0040E33E Unknown Unknown Unknown
D3D_gid_msh.exe
00406565 Unknown Unknown Unknown
D3D_gid_msh.exe
00401806 Unknown Unknown Unknown
D3D_gid_msh.exe
004011D2 Unknown Unknown Unknown
D3D_gid_msh.exe
00431809 Unknown

The path that is indicated at the beginning of the error message doesn't
exist, because I didn't copy or create the input file for the mesher
(D3D_gid_msh.in) in the directory of gid. I don't have any clue what the
rest of the error message means.

thanks for response,

regards, Andreas



_________________________________________________________________
Hotmail - Absolut kostenfrei! Der weltweit größte E-Mail-Anbieter im Netz:
http://www.msn.de/hotmail

_______________________________________________
GiDlist mailing list
GiDlist at gid.cimne.upc.es
http://gid.cimne.upc.es/mailman/listinfo/gidlist

Post Reply