[GiDlist] About ".central.s info gendata"

Moderator: GiD Team

Post Reply
Mihai TEODORESCU

[GiDlist] About ".central.s info gendata"

Post by Mihai TEODORESCU »

What about acces to others data sets: Conditions, Materials. The
_GidAccessValue function seems to be have acces to more information
than the user interface fonctions GIdUtils::GetProblemDataValue and
GidUtils::GetCurrentIntervalDataValue.

Best regards,
--------------------------------------------
Mihai TEODORESCU
Email: mihai.teodorescu at prevost-industries.com
--------------------------------------------


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://listas.cimne.upc.edu/pipermail/gidlist/attachments/20030319/0d7511a9/attachment.htm
ieea

[GiDlist] Finding a Tcl procedure to execute *.win.bat

Post by ieea »

Dear All,

I am looking for a Tcl procedure to execute a problem_type.win.bat.
I wish to reproduce the same command as GID, that means:

problem_type.win.bat project_name project_name_directory
problem_type_directory

and now, don't.

For example I execute the Execute command from the InitGIDProject
procedure something like this :


proc InitGIDProject { dir } {

# The Execute Tcl command is called here
source $dir/scripts/Execute.tcl
...
# the variable GidRepertoire take the value of the
problem_type_directory directory
set GidRepertoire $dir
...

# the variable GidRepertoire take the value of the
problem_type_directory directory
Execute GidRepertoire
...

}


with:


proc Execute {repertoire} {

# The name of the executable problem_type.win.bat
set executable "IDRA.win.bat"

set exttrans "/"
set aa [.central.s info Project]
set ProblemType [lindex $aa 0]
set ProjectName [lindex $aa 1]
set ProjectName [file root $ProjectName]

set repertoire [file native $repertoire]

# the argument %1
set basename [file tail $ProjectName]

# the argument %2
set directory $ProjectName.gid

# the argument %3 corresponds to $repertoire

append script $repertoire$exttrans$executable

exec $script \"$basename\" \"$directory\" \"$repertoire\" &
NUL: &

}


This procedure doesn't work here because the directory names are written
as:

C:\Program Files\GID\GID7.2\problemtypes\IDRA.gid

and should be written as:

C:\PROGRA~1\GID\GID7.2\PROBLE~1\IDRA.GID

Can somebody help me to use the right Tcl command.

Thank you in advance,

G.W.R. Geis
ieea

[GiDlist] Problem with *.flavia.msh in GID 7.2

Post by ieea »

I noticed in GID 7.2 that the POSTPROCESS doesn't read the problem
type.flavia.msh file,
created from a problem type problem type.

When the POSTPROCESS window is called, only the problem type.msh is
read in GID 7.2, what it is not the case in the GID 7.1.

G.W.R. Geis
Enrique Escolano

[GiDlist] Finding a Tcl procedure to execute *.win.bat

Post by Enrique Escolano »

To run a bat file is needed call a interpreter command as "command.com" for
Win9x or "cmd.exe" of WinNT/2000

You can use auto_execok to write a "system independent" command (it set
automatically the appropiate paht
and cmd.exe or command.com)

exec [auto_execok $batfile]

You can also use command.exe provided with GiD to avoid some limitations of
the
Windows command.com and cmd.exe (size of parameters with small limit, etc)
See GiD help on Tcl/Tk extension-Using EXEC in GiD

exec [[file join $GIDDEFAULT command.exe] $batfile]

Enrique

----- Original Message -----
From: "ieea" ieea at club-internet.fr
To: "GID" GiDlist at gatxan.cimne.upc.es
Sent: Thursday, March 20, 2003 4:56 PM
Subject: [GiDlist] Finding a Tcl procedure to execute *.win.bat


Dear All,

I am looking for a Tcl procedure to execute a problem_type.win.bat.
I wish to reproduce the same command as GID, that means:

problem_type.win.bat project_name project_name_directory
problem_type_directory

and now, don't.

For example I execute the Execute command from the InitGIDProject
procedure something like this :


proc InitGIDProject { dir } {

# The Execute Tcl command is called here
source $dir/scripts/Execute.tcl
...
# the variable GidRepertoire take the value of the
problem_type_directory directory
set GidRepertoire $dir
...

# the variable GidRepertoire take the value of the
problem_type_directory directory
Execute GidRepertoire
...

}


with:


proc Execute {repertoire} {

# The name of the executable problem_type.win.bat
set executable "IDRA.win.bat"

set exttrans "/"
set aa [.central.s info Project]
set ProblemType [lindex $aa 0]
set ProjectName [lindex $aa 1]
set ProjectName [file root $ProjectName]

set repertoire [file native $repertoire]

# the argument %1
set basename [file tail $ProjectName]

# the argument %2
set directory $ProjectName.gid

# the argument %3 corresponds to $repertoire

append script $repertoire$exttrans$executable

exec $script \"$basename\" \"$directory\" \"$repertoire\" &
NUL: &

}


This procedure doesn't work here because the directory names are written
as:

C:\Program Files\GID\GID7.2\problemtypes\IDRA.gid

and should be written as:

C:\PROGRA~1\GID\GID7.2\PROBLE~1\IDRA.GID

Can somebody help me to use the right Tcl command.

Thank you in advance,

G.W.R. Geis

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

Enrique Escolano

[GiDlist] Problem with *.flavia.msh in GID 7.2

Post by Enrique Escolano »

Hola Miguel.
Parece que tiene razón esta persona
Puedes mirar de corregirlo.

Enrique
----- Original Message -----
From: "ieea" ieea at club-internet.fr
To: "GID" GiDlist at gatxan.cimne.upc.es
Sent: Friday, March 21, 2003 1:50 PM
Subject: [GiDlist] Problem with *.flavia.msh in GID 7.2


I noticed in GID 7.2 that the POSTPROCESS doesn't read the problem
type.flavia.msh file,
created from a problem type problem type.

When the POSTPROCESS window is called, only the problem type.msh is
read in GID 7.2, what it is not the case in the GID 7.1.

G.W.R. Geis

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

Enrique Escolano

[GiDlist] Problem with *.flavia.msh in GID 7.2

Post by Enrique Escolano »

It seems a bug to correct. But, if it exists the results file
(*.flavia.res), then if exist (*.flavia.msh) is also
readed instead the preprocess mesh.

Thanks for your bug report

Enrique Escolano

----- Original Message -----
From: "ieea" ieea at club-internet.fr
To: "GID" GiDlist at gatxan.cimne.upc.es
Sent: Friday, March 21, 2003 1:50 PM
Subject: [GiDlist] Problem with *.flavia.msh in GID 7.2


I noticed in GID 7.2 that the POSTPROCESS doesn't read the problem
type.flavia.msh file,
created from a problem type problem type.

When the POSTPROCESS window is called, only the problem type.msh is
read in GID 7.2, what it is not the case in the GID 7.1.

G.W.R. Geis

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

Miguel A. de Riera Pasenau

[GiDlist] Problem with *.flavia.msh in GID 7.2

Post by Miguel A. de Riera Pasenau »

Yes, i found the problem. will be solved for the next beta.
in the mean time you can rename your .flavia.msh /.flavia.res
to .post.msh /.post.res.

miguel

Enrique Escolano wrote:

Hola Miguel.
Parece que tiene razón esta persona
Puedes mirar de corregirlo.

Enrique
----- Original Message -----
From: "ieea" ieea at club-internet.fr
To: "GID" GiDlist at gatxan.cimne.upc.es
Sent: Friday, March 21, 2003 1:50 PM
Subject: [GiDlist] Problem with *.flavia.msh in GID 7.2

I noticed in GID 7.2 that the POSTPROCESS doesn't read the problem
type.flavia.msh file,
created from a problem type problem type.

When the POSTPROCESS window is called, only the problem type.msh is
read in GID 7.2, what it is not the case in the GID 7.1.

G.W.R. Geis

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


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

[GiDlist] Finding a Tcl procedure to execute *.win.bat

Post by ieea »

Thank you Enrique for your response, neverthless, my problem is not exactly
this one and I had surely not well explained it !

I wish execute an external program without generating a mesh (that means, it is
not possible to use a problem_type.win.bat).
So, I'd execute an external program called PROGRAM.exe, for example.

This program needs the name of the problem type directory and the name of the
current project, which will be recognized as argument %1 and %2 by PROGRAM.exe
.
For the moment I use this Tcl command:

exec PROGRAM.exe $problem_type_directory $current_project_name &
NUL: &

where :
$problem_type_directory is the variable containing the name of the
problem typedirectory which is here: C:\Program
Files\GID\GID7.2\problemtypes\IDRA.gid
and
$problem_type_directory is the variable containing C:\Documents and
Setting\IDRA\test.gid

But this doesn't work, because the directories names are not given by their
Window 3.1 name (there is blank space in the name).

Could you tell me if it is the good way to execute without meshing or if there
is an other good solution.

Thank you if you have a response.

G.W.R. Geis



Enrique Escolano a écrit :

To run a bat file is needed call a interpreter command as "command.com" for
Win9x or "cmd.exe" of WinNT/2000

You can use auto_execok to write a "system independent" command (it set
automatically the appropiate paht
and cmd.exe or command.com)

exec [auto_execok $batfile]

You can also use command.exe provided with GiD to avoid some limitations of
the
Windows command.com and cmd.exe (size of parameters with small limit, etc)
See GiD help on Tcl/Tk extension-Using EXEC in GiD

exec [[file join $GIDDEFAULT command.exe] $batfile]

Enrique

----- Original Message -----
From: "ieea" ieea at club-internet.fr
To: "GID" GiDlist at gatxan.cimne.upc.es
Sent: Thursday, March 20, 2003 4:56 PM
Subject: [GiDlist] Finding a Tcl procedure to execute *.win.bat

Dear All,

I am looking for a Tcl procedure to execute a problem_type.win.bat.
I wish to reproduce the same command as GID, that means:

problem_type.win.bat project_name project_name_directory
problem_type_directory

and now, don't.

For example I execute the Execute command from the InitGIDProject
procedure something like this :


proc InitGIDProject { dir } {

# The Execute Tcl command is called here
source $dir/scripts/Execute.tcl
...
# the variable GidRepertoire take the value of the
problem_type_directory directory
set GidRepertoire $dir
...

# the variable GidRepertoire take the value of the
problem_type_directory directory
Execute GidRepertoire
...

}


with:


proc Execute {repertoire} {

# The name of the executable problem_type.win.bat
set executable "IDRA.win.bat"

set exttrans "/"
set aa [.central.s info Project]
set ProblemType [lindex $aa 0]
set ProjectName [lindex $aa 1]
set ProjectName [file root $ProjectName]

set repertoire [file native $repertoire]

# the argument %1
set basename [file tail $ProjectName]

# the argument %2
set directory $ProjectName.gid

# the argument %3 corresponds to $repertoire

append script $repertoire$exttrans$executable

exec $script \"$basename\" \"$directory\" \"$repertoire\" &
NUL: &

}


This procedure doesn't work here because the directory names are written
as:

C:\Program Files\GID\GID7.2\problemtypes\IDRA.gid

and should be written as:

C:\PROGRA~1\GID\GID7.2\PROBLE~1\IDRA.GID

Can somebody help me to use the right Tcl command.

Thank you in advance,

G.W.R. Geis

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


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

[GiDlist] Finding a Tcl procedure to execute *.win.bat

Post by ieea »

Dear All,

OK, I have found the response to my question (great!)

To execute an external program.bat using arguments:



proc InitGIDProject { dir } {
# ----------------------------------------------------------------------
# InitGIDProject
# ----------------------------------------------------------------------
...
InsertMenuOption "Calculate" "Run IDRA" 5 {RunExternalProgram $dir} "PRE"
"insert"
UpdateMenus
...
# ----------------------------------------------------------------------
# End InitGIDProject
# ----------------------------------------------------------------------
}



proc IdraIsRunning {repertoire} {
# ----------------------------------------------------------------------
# RunExternalProgram
# ----------------------------------------------------------------------
set repertoire [file native $repertoire]
set exttrans "\\"
set nothing ""
set aa [.central.s info Project]
set ProblemType [lindex $aa 0]
set ProjectName [lindex $aa 1]
set ProjectName [file root $ProjectName]
set executable "ExternalProgram.exe"

# Corresponding to GID's %1
set basename [file tail $ProjectName]
set basenameFF [file native $basename]

# Corresponding to GID's %2
set directory $ProjectName.gid
set directoryFF [file native $directory]
set directoryFFF [file attributes $directoryFF -shortname]
set directoryFFF [file native $directoryFFF]

# Corresponding to GID's %3
set repertoireFF [file native $repertoire]
set repertoireFFF [file attributes $repertoireFF -shortname]
set repertoireFFF [file native $repertoireFFF]

# Script to execute

append script $repertoireFF$exttrans$executable
exec $script $basenameFF $directoryFFF $repertoireFFF & NUL: &
# ----------------------------------------------------------------------
# End RunExternalProgram
# ----------------------------------------------------------------------
}

Ouf !

G.W.R. Geis







ieea a écrit :

Thank you Enrique for your response, neverthless, my problem is not exactly
this one and I had surely not well explained it !

I wish execute an external program without generating a mesh (that means, it is
not possible to use a problem_type.win.bat).
So, I'd execute an external program called PROGRAM.exe, for example.

This program needs the name of the problem type directory and the name of the
current project, which will be recognized as argument %1 and %2 by PROGRAM.exe
.
For the moment I use this Tcl command:

exec PROGRAM.exe $problem_type_directory $current_project_name &
NUL: &

where :
$problem_type_directory is the variable containing the name of the
problem typedirectory which is here: C:\Program
Files\GID\GID7.2\problemtypes\IDRA.gid
and
$problem_type_directory is the variable containing C:\Documents and
Setting\IDRA\test.gid

But this doesn't work, because the directories names are not given by their
Window 3.1 name (there is blank space in the name).

Could you tell me if it is the good way to execute without meshing or if there
is an other good solution.

Thank you if you have a response.

G.W.R. Geis

Enrique Escolano a écrit :

To run a bat file is needed call a interpreter command as "command.com" for
Win9x or "cmd.exe" of WinNT/2000

You can use auto_execok to write a "system independent" command (it set
automatically the appropiate paht
and cmd.exe or command.com)

exec [auto_execok $batfile]

You can also use command.exe provided with GiD to avoid some limitations of
the
Windows command.com and cmd.exe (size of parameters with small limit, etc)
See GiD help on Tcl/Tk extension-Using EXEC in GiD

exec [[file join $GIDDEFAULT command.exe] $batfile]

Enrique

----- Original Message -----
From: "ieea" ieea at club-internet.fr
To: "GID" GiDlist at gatxan.cimne.upc.es
Sent: Thursday, March 20, 2003 4:56 PM
Subject: [GiDlist] Finding a Tcl procedure to execute *.win.bat

Dear All,

I am looking for a Tcl procedure to execute a problem_type.win.bat.
I wish to reproduce the same command as GID, that means:

problem_type.win.bat project_name project_name_directory
problem_type_directory

and now, don't.

For example I execute the Execute command from the InitGIDProject
procedure something like this :


proc InitGIDProject { dir } {

# The Execute Tcl command is called here
source $dir/scripts/Execute.tcl
...
# the variable GidRepertoire take the value of the
problem_type_directory directory
set GidRepertoire $dir
...

# the variable GidRepertoire take the value of the
problem_type_directory directory
Execute GidRepertoire
...

}


with:


proc Execute {repertoire} {

# The name of the executable problem_type.win.bat
set executable "IDRA.win.bat"

set exttrans "/"
set aa [.central.s info Project]
set ProblemType [lindex $aa 0]
set ProjectName [lindex $aa 1]
set ProjectName [file root $ProjectName]

set repertoire [file native $repertoire]

# the argument %1
set basename [file tail $ProjectName]

# the argument %2
set directory $ProjectName.gid

# the argument %3 corresponds to $repertoire

append script $repertoire$exttrans$executable

exec $script \"$basename\" \"$directory\" \"$repertoire\" &
NUL: &

}


This procedure doesn't work here because the directory names are written
as:

C:\Program Files\GID\GID7.2\problemtypes\IDRA.gid

and should be written as:

C:\PROGRA~1\GID\GID7.2\PROBLE~1\IDRA.GID

Can somebody help me to use the right Tcl command.

Thank you in advance,

G.W.R. Geis

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


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