Starting from cmas2d_customlib.gid example, I’ve been trying to set up my own problemtype. Here, I revised the preprocess files to accomodate two editable material data sets. In GiD, I can access to and edit the two material data sets but I’m getting some error messages in GiD when moving to Calculate step.
Below is what I changed in the preprocess files.
In the spd file, I put two property sections for the two material data sets. The actual data set is described in separate files (materials.xml and materials_joint.xml).
To link to the two datasets, I prepared separate procedures:
Cmas2d::GetMaterialsList and Cmas2d::GetMaterialsListJoint
Cmas2d::EditDatabaseListDirect and Cmas2d::EditDatabaseListDirectJoint.
Attached is a screenshot of the error message. It seems like when writing out the material properties in input file, it encounters an error…
I’ve also attached the problemtype files I prepared. I would really appreciate if you can give me some advice.
I’ve found a bug in the GID code thanks to your query. It will be fixed in the next GiD version
You can fix it in your installed gid so you can keep on working.
In the GiD installation folder, find the file scripts\customlib_extras\customlib_extras.tcl
Find the function customlib::InitMaterials
One of the lines in this function is:
set xp2 {.//container[@n="materials"]/blockdata[@n="material"]}
Please, repace it with
set xp2 {.//blockdata[@n="material"]}
I could not test it with real data since I don’t have an example.
Please let me know if it worked for you.
Thank you for your answering my question. I changed the code in scripts\customlib_extras\customlib_extras.tcl as you suggested. It worked ok after restarting GiD. Again, thanks for you help!!!
Attached are the example and problemtypes used for the test. (I just wanted to share this for others as future reference.) wFAST2.gid.zip (171 KB) test.gid.zip (34.8 KB)