Hi,
I have a problemtype that works fine to generate tcl file with models that I built earlier using GiD13, but it gives an error when I try to generate the tcl file for models built in GiD15. Could you please take a look at it? I have attached the model and the problemtype.
Thanks!
Jing
Error with .bas file using GiD15
Moderator: GiD Team
Error with .bas file using GiD15
- Attachments
-
- CoreDam.gid.zip
- (2.88 MiB) Downloaded 168 times
-
- UWquad2D_Effective_PM4Sand.gid - Original.zip
- (8.12 KiB) Downloaded 170 times
Re: Error with .bas file using GiD15
I have tested it with GiD 13.0.4 and 13.1.11d and both do the same as current GiD 15
Which exact GiD 13 version is writting the .dat file without errors?
Error in base file 'C:/gid project more/gidusers/Forum/jingwenh/UWquad2D_Effective_PM4Sand.gid/UWquad2D_Effective_PM4Sand.bas' at line number 919: *endif or *end necessary for *if
It seems that there are bugs in the .bas template (some *loop or *if not paired with *end loop and *end if)
Unfortunately is is very difficult to detect the bugs in 1000 lines of code, specially because it is not possible to indent the .bas file or debug it.
The only way is to see what is printed in the .dat until the error is raised
Also edit the .bas file with RamDebugger (Data->Problemtype->Debugger...) can aid sometimes.
Note: ramdebugger can debug the Tcl files, but not the .bas templates
If has a special parser that check the GiD .bas syntax.
open your file and got to ramdebuger menu: Debug->Reinstrument
It raise some errors.
You can double-click the asterisc * of *if *loop, etc and it will select in green its block.
e.g. If I click the lines 85 and 112
*loop nodes
It show an error that ist *end nodes doesn't exists and maybe *loop nodes must be deleted?
and the line
*if(eqDOF2(int)==1)
seems that also is not closed by an *end if, add it in the appropliated place (I don't know what must be writeen in the file)
After these 3 chages, at least Ramdebugger is not complaing of unpaired commands, and I am able to export a calculation file without errors.
This is my modified file: Note: the modern problemtypes don't use .bas templates, they write the calculating files with Tcl procedures, that is a scripting language much more powerful than these simple templates.
Which exact GiD 13 version is writting the .dat file without errors?
Error in base file 'C:/gid project more/gidusers/Forum/jingwenh/UWquad2D_Effective_PM4Sand.gid/UWquad2D_Effective_PM4Sand.bas' at line number 919: *endif or *end necessary for *if
It seems that there are bugs in the .bas template (some *loop or *if not paired with *end loop and *end if)
Unfortunately is is very difficult to detect the bugs in 1000 lines of code, specially because it is not possible to indent the .bas file or debug it.
The only way is to see what is printed in the .dat until the error is raised
Also edit the .bas file with RamDebugger (Data->Problemtype->Debugger...) can aid sometimes.
Note: ramdebugger can debug the Tcl files, but not the .bas templates
If has a special parser that check the GiD .bas syntax.
open your file and got to ramdebuger menu: Debug->Reinstrument
It raise some errors.
You can double-click the asterisc * of *if *loop, etc and it will select in green its block.
e.g. If I click the lines 85 and 112
*loop nodes
It show an error that ist *end nodes doesn't exists and maybe *loop nodes must be deleted?
and the line
*if(eqDOF2(int)==1)
seems that also is not closed by an *end if, add it in the appropliated place (I don't know what must be writeen in the file)
After these 3 chages, at least Ramdebugger is not complaing of unpaired commands, and I am able to export a calculation file without errors.
This is my modified file: Note: the modern problemtypes don't use .bas templates, they write the calculating files with Tcl procedures, that is a scripting language much more powerful than these simple templates.