Page 1 of 1

Simple problemtype to validate .bas file commands?

Posted: Tue Apr 11, 2017 12:51 pm
by awa5114
Hello,

I am trying to verify what some of the commands in the .bas file are returning for learning purposes. Does there exist some simple way to generate a model in GiD using the GUI, and querying the model using the .bas file without using a solver or any of the other (.mat, .prb, .cnd etc..) filetypes?

For example, I just want to know what a command like *elem or *npoin will return. Unfortunately when I run this in the GiD command prompt I get no output. What is an easy way to get the numerical output of .bas commands without having to build an entire problemtype+solver?

Re: Simple problemtype to validate .bas file commands?

Posted: Tue Apr 11, 2017 1:26 pm
by escolano
There is just a way to do this: copy the .bas template to the '<gid>/templates' folder
then its name (without .bas extension) will appear in the menu
Files->Export->Using template .ba
Have a look for example to the file 'Dump.bas' of this folder. It is an example that try to export the data of the mesh, layers, groups, and conditions and materials if any.

Re: Simple problemtype to validate .bas file commands?

Posted: Tue Apr 11, 2017 2:15 pm
by awa5114
FOr the materials, is also to have a MAT file? If so, where should I save the MAT file if I don't have a problemtype?

Re: Simple problemtype to validate .bas file commands?

Posted: Wed Apr 12, 2017 6:08 pm
by escolano
If you want to define materials you must to define a problemtype.
The problemtype xxx could be as simple as the xxx.mat and the xxx.bas template files copied in a folder named xxx.gid inside <gid>/problemtypes

Re: Simple problemtype to validate .bas file commands?

Posted: Sat Apr 15, 2017 12:18 pm
by awa5114
Sorry but that does not work. I created a problemtype with only .BAS, .MAT and .CND files and when I create a model and click "Calculate" I get the following error message:
This type of problem doesn't exist. Enter new problem type name:
The folder does have a .gid extension so I don't understand why this is happening. This is why I asked the question to begin with...