Page 1 of 1

%DICT %BC and procs node

Posted: Fri Mar 29, 2024 7:10 am
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?

Re: %DICT %BC and procs node

Posted: Wed Apr 10, 2024 5:53 pm
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