Simple problemtype to validate .bas file commands?

Moderator: GiD Team

Post Reply
awa5114
Posts: 43
Joined: Thu Jan 26, 2017 5:10 pm

Simple problemtype to validate .bas file commands?

Post 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?
User avatar
escolano
Posts: 1922
Joined: Sun Sep 05, 1982 10:51 pm

Re: Simple problemtype to validate .bas file commands?

Post 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.
awa5114
Posts: 43
Joined: Thu Jan 26, 2017 5:10 pm

Re: Simple problemtype to validate .bas file commands?

Post 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?
User avatar
escolano
Posts: 1922
Joined: Sun Sep 05, 1982 10:51 pm

Re: Simple problemtype to validate .bas file commands?

Post 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
awa5114
Posts: 43
Joined: Thu Jan 26, 2017 5:10 pm

Re: Simple problemtype to validate .bas file commands?

Post 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...
Post Reply