[Gmsh] Command Parameter "string"

Christophe Geuzaine cag32 at case.edu
Mon Oct 31 13:06:59 CET 2005


Uwe Blechard wrote:
> Hello,
> 
> I use gmsh in version 1.44 and start it with the following command
> (interactive):
> 
> gmsh .... -string "ViewStepNr=1;"
> 
> All works fine ( I use the variable ViewStepNr to decide something
> in the script file ).
> 
> Last week I upgade gmsh to 1.60.1 and now I get the error message:
> 
> Error: ....line 38 : Unknown variable 'ViewStepNr'
> 
> In the manual and in the mailing lists I can't find an example
> or a explanation about this behavior.
> 

Hello Uwe - Good catch. Indeed, in recent versions a variable defined
with "-string" on the command line is not available in the global
context (we parse the string options as soon as we see them on the 
command line, but we reset the context when we open the problem file).

I fixed the problem in cvs. The fix will be available in tomorrow's 
nightly source snapshot.

Thanks for reporting the bug,

Christophe

PS: Recent releases provide another (nicer?) method to specify variables 
interactively, by using "GetValue()". For example, in your case, you 
could add the following command in your file:

ViewStepNr = GetValue("Step Nr = ", 1);


> Question: What do I wrong?
> 
> Thanx for a short comment.
> 
> Best regards
> Uwe Blechard
> 
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> gmsh mailing list
> gmsh at geuz.org
> http://www.geuz.org/mailman/listinfo/gmsh


-- 
Christophe Geuzaine
Assistant Professor, Case University, Mathematics
http://www.case.edu/artsci/math/geuzaine