%DICT %BC and procs node

Moderator: GiD Team

Post Reply
Hemmi
Posts: 32
Joined: Fri Nov 20, 2015 6:05 am
Location: Chiba prefecture, Japan

%DICT %BC and procs node

Post by Hemmi »

In the cmas2d_customlib.spd I can see a proc command:
proc='Cmas2d::EditDatabaseListDirect %W %DICT %BC'

Question 1.
What are %DICT and %BC.

%W is described on page 18 of the GiD 16 customization manual.
I know that %DICT and %BC are "dict" and "boundary condition" respectively, but I would like to know more.

Question 2.
On page 20 of the manual there is the following sentence:
"It is compulsory to collect all <proc> nodes inside a <procs> xml node."
When I search for the word "procs" in the cmas2d_customlib.spd file, no procs word is found. At the moment the <procs> node is NOT compulsory?
User avatar
escolano
Posts: 1922
Joined: Sun Sep 05, 1982 10:51 pm

Re: %DICT %BC and procs node

Post by escolano »

1) It is explained in more detail in the online current documentation (for the last developer version):
https://gidsimulation.atlassian.net/wik ... 54437/proc

you can show the values of the arguments with W to understand it better
In the proc Cmas2d::EditDatabaseListDirect (file <gid>\problemtypes\Examples\cmas2d_customlib.gid\cmas2d_customlib.tcl)

proc Cmas2d::EditDatabaseListDirect { domNode dict boundary_conds } {
W "domNode=$domNode dict=$dict boundary_conds=$boundary_conds"
...
}



2) this is old, read the new documentation:
Now is not necessary to define in the spd these procs in the <procs> block
<procs>
<proc n='EditDatabaseList' args='args'>
Cmas2d::EditDatabaseList $domNode $dict $boundary_conds $args
</proc>
...
</procs>

and in particular is more unrecommended to implement also the body of the Tcl proc in the xml document (e.g. cannot use ramdebugger to inspect it, it is much better to put the Tcl code in a .tcl normal file)

Instead can use the new simplified syntax without this block, using the special arguments %W, %DICT, %BC, etc.
as is explained in the current documentation
Post Reply