Thanks for the support.
For a .bat file at your suggesion,
tcl
foreach “- - basename dir problemtypedir - more_files” $argv break
set dir [lindex [file split [file normalize $dir]] end]
set problemtypedir [file normalize $problemtypedir]
if [catchFo {open “C:/args.txt” w} fd] {
error “Unable to open file”
}
puts $fd $dir
puts $fd $problemtypedir
close $fd
I got a file C:\args.txt what I wanted:
sphere_model.gid
C:/Program Files/CTC/GiD 8.0.9/problemtypes/MagnaFEM/3d_A-Phi_Edge.gid
Best regards,
HEMMI, Shigeru
ITOCHU Techno-Solutions Corporation (CTC)
Ramon Ribó wrote:
If you need a workaround, insert the following text in the .bat file:
--------------------------------------------
rem OutputFile: %2%1.info
rem ErrorFile: %2%1.err
rem WarningFile: %2%1.war
tcl
foreach “- - basename dir problemtypedir - more_files” $argv break
set dir [file normalize $dir]
set problemtypedir [file normalize $problemtypedir]
----------------------------------------------
Note that command “tcl” is and extension to the MSDOS bat file language
for GiD. If this command is used, all the rest of the file is interpreted
as TCL commands instead of MSDOS commands.
In this situation, TCL variable “argv” contains all the arguments to
the .bat file and variable “dir” contains the expanded name of the
directory.
–
Compass Ing. y Sistemas Dr. Ramon Ribo
http://www.compassis.com ramsan at compassis.com
c/ Tuset, 8 7-2 tel. +34 93 218 19 89
08006 Barcelona, Spain fax. +34 93 396 97 46
En Fri, 13 Jul 2007 02:38:07 +0200, HEMMI, Shigeru
shigeru.hemmi at ctc-g.co.jp escribió:
Thanks for the reply.
I did the same test as you wrote. My C:\args.txt is
SPHERE~1
C:\cygwin\home\c1544\CRCSOL~3\work\SPHERE~1.GID
C:\PROGRA~1\CTC\GID80~1.9\PROBLE~1\MagnaFEM\3D_A-P~1.GID
FYI, the “true” %2 name for this case is
C:\cygwin\home\c1544\crcsolver\work\sphere_model.gid
and my C-drive is NTFS, not FAT nor FAT32 formatted.
Further, for my another project, I got a “true” name for %1,
my C:\args.txt is
ConstFieldByT0Tetra
C:\cygwin\home\c1544\CRCSOL~3\work\CONSTF~1.GID
C:\PROGRA~1\CTC\GID80~1.9\PROBLE~1\MagnaFEM\3D_A-P~1.GID
I am not sure why my %1 is short name for the first case,
though I do not believe with that the cause came from theJapanese
encoding.
It seems difficult to fix this problem within short term.
Regards,
HEMMI, Shigeru
ITOCHU Techno-Solutions Corporation (CTC), Japan.
Enrique Escolano wrote:
I’ve tested this with some GiD versions,
and the %2 and %3 model and problemtype paths are short names,
but the %1 project_name parameter is not short.
e.g.
I tested a .bat file with this content:
echo %1 C:\args.txt
echo %2 C:\args.txt
echo %3 C:\args.txt
And for a model named sphere_model I obtained a file C:\args.txt with
this:
sphere_model
C:\temp\SPHERE~1.GID
C:\ARCHIV~1\GiD\GID80~1.9\PROBLE~1\base.gid
Maybe is a problem related with theJapanese encoding of your
operating system.
Regards
Enrique
----- Original Message -----
From: “HEMMI, Shigeru” shigeru.hemmi at ctc-g.co.jp
To: gidlist at gatxan.cimne.upc.es
Sent: Thursday, July 12, 2007 7:32 AM
Subject: [GiDlist] Current project name forced short name like SPHERE~1
Dear GiD team,
I’m using GiD 8.0.4.
In executing an external program via “CALCULATE” menu, GiD manual
says that
“%1 is the name of the current project (project_name)”.
Within my short experience, current project name is
forced to short name like “SPHERE~1” though the original name is
“sphere_model”. This is annoying me. Is there a way not using
short name?
HEMMI, Shigeru
ITOCHU Techno-Solutions Corporation (CTC), Japan.
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_
GiDlist mailing list
GiDlist at gid.cimne.upc.es
_http://gid.cimne.upc.es/mailman/listinfo/gidlist_
–Compass Ing. y Sistemas Dr. Ramon Ribo
http://www.compassis.com ramsan at compassis.com
c/ Tuset, 8 7-2 tel. +34 93 218 19 89
08006 Barcelona, Spain fax. +34 93 396 97 46
GiDlist mailing list
GiDlist at gid.cimne.upc.es
_http://gid.cimne.upc.es/mailman/listinfo/gidlist_