Page 1 of 1

[ GiDlist ] file .bat

Posted: Fri Jul 13, 2001 3:51 pm
by Aldo Ghisi
Hi to all,

I want that GiD executes a problem in a directory where I save my file, but
I cannot get it.

Suppose that I save a GiD database "wedge.gid" in a directory
c:\aldo\wedge, then GiD writes a directory "wedge.gid" here.
If I save also an input file (ctrl-x ctrl-c) for my solver as "wedge" in
directory c:\aldo\wedge, I have this situation in the directory c:\aldo\wedge:
.\wedge.gid
wedge

In problem customization I use these instructions in my batch file aldo.bat:

-----------------------------------------------------------------------------------
@echo off

rem set basename = %1
rem set directory = %2
rem set problemdirectory = %3

echo %1 %2 %3 input.txt

%2\myprogram %2\%1
-------------------------------------------------------------------------------------

I try also with %3\myprogram %3\%1. but it doesn't work.
The content of file input.txt (see the command echo, above) is:

--------------------------------------------------------
wedge e:\wedge.gid f:\PROBLEM.GID
--------------------------------------------------------

where the three strings should be:
%1 %2 %3

GiD 6.1.2 is installed in c:\Programmi\GidWin, the problem type is
installed in c:\Programmi\GidWin\PROBLEM.gid
I don't understand very well how GiD use these the parameters %1 %2 %3; it
seems different from the manual.
Thank you very much for any help.
Best regards
Aldo Ghisi

P.S.
My problem can be easily solved if I know the path of file "wedge" when I
executes
Files - Import\Export - Write calculation file
I thought it was %2 or %3, but GiD returns another string....

ALDO GHISI
Department of Structural Engineering
Politecnico di Milano
Piazza Leonardo da Vinci 32, 20133 Milano, Italy
Tel.: +39 02 2399 4218
Fax.: +39 02 2399 4220
E_mail: aldo.ghisi at polimi.it

[ GiDlist ] file .bat

Posted: Mon Jul 16, 2001 12:00 pm
by Enrique Escolano
The recommended location for a problem type is the directory \problemtypes
(c:\Programmi\GidWin\problemtypes\PROBLEM.gid)
The file c:\Programmi\GidWin\problemtypes\PROBLEM.gid\PROBLEM.bat for
example is:
%3\myprogram %2\%1.dat

If the executable myprogram cannot accept the input file name "wedge.dat"
then rename it before:
for example from "wedge.dat" to "wedge"
rename %2\%1.dat %2\%1
%3\myprogram %2\%1

Best regards

----- Original Message -----
From: "Aldo Ghisi" ghisi at stru.polimi.it
To: gidlist at gatxan.cimne.upc.es
Sent: Friday, July 13, 2001 4:51 PM
Subject: [ GiDlist ] file .bat


Hi to all,

I want that GiD executes a problem in a directory where I save my file,
but
I cannot get it.

Suppose that I save a GiD database "wedge.gid" in a directory
c:\aldo\wedge, then GiD writes a directory "wedge.gid" here.
If I save also an input file (ctrl-x ctrl-c) for my solver as "wedge" in
directory c:\aldo\wedge, I have this situation in the directory
c:\aldo\wedge:
.\wedge.gid
wedge

In problem customization I use these instructions in my batch file
aldo.bat:

--------------------------------------------------------------------------
---------
@echo off

rem set basename = %1
rem set directory = %2
rem set problemdirectory = %3

echo %1 %2 %3 input.txt

%2\myprogram %2\%1
--------------------------------------------------------------------------
-----------

I try also with %3\myprogram %3\%1. but it doesn't work.
The content of file input.txt (see the command echo, above) is:

--------------------------------------------------------
wedge e:\wedge.gid f:\PROBLEM.GID
--------------------------------------------------------

where the three strings should be:
%1 %2 %3

GiD 6.1.2 is installed in c:\Programmi\GidWin, the problem type is
installed in c:\Programmi\GidWin\PROBLEM.gid
I don't understand very well how GiD use these the parameters %1 %2 %3; it

seems different from the manual.
Thank you very much for any help.
Best regards
Aldo Ghisi

P.S.
My problem can be easily solved if I know the path of file "wedge" when I
executes
Files - Import\Export - Write calculation file
I thought it was %2 or %3, but GiD returns another string....

ALDO GHISI
Department of Structural Engineering
Politecnico di Milano
Piazza Leonardo da Vinci 32, 20133 Milano, Italy
Tel.: +39 02 2399 4218
Fax.: +39 02 2399 4220
E_mail: aldo.ghisi at polimi.it