An error was generated when I changed the writing.tcl in the cmas2d_customelib problem type by inserting the sample lines of code given in the manual.
The following code is given in the customisation manual (page 42; in the “Accessing tree data information” section).
I inserted it into the writing.tcl code of the cmas2d_customlib problem type, just before the “customlib::EndWriteFile” line.
(writing.tcl code; many lines omitted!)
customlib::WriteString "Node Mass [gid_groups_conds::give_active_unit M]"
customlib::WriteNodes $condition_list $condition_formats "" active
# The following four lines are inserted from the sample code
# found on page42 of the customization manual.
set document [$::gid_groups_conds::doc documentElement]
set xpath {/cmas2d_customlib_data/condition[@n='Point_Weight']/group[@name='Point Weight Auto1']/value[@n='Weight']}
set xml_node [$document selectNodes $xpath]
set value [get_domnode_attribute $xml_node v]
customlib::EndWriteFile ;#finish writting
}
As shown in the figure, I encountered an error after CntlX-CntlC operation.
What is wrong with me?
Am using GiD 16.0.7 on Windows11 Pro.
writing.tcl.zip (1.17 KB)
foobar.gid.zip (9.49 KB)