Modify PBAR beamsection (TCL)
I am trying to modify a group of Nastran PBAR property groups in Hypermesh via an automated tcl script. I am trying to change the beam sections of all the pbar properties groups I have stored. I have tried using a script with the line as follows (in an iterative manner):
*setvalue props id=<some_pbar_prop_id> 3186={beamsects <id_of_new_beam_sect>}
While there is no error output, the property card is not updated and the beam section displayed in the GUI is not correct.
I am not 100% sure the entity attribute 3186 is correct for pbar beamsections: is there a file or section of the HyperWorks guide listing these id's? I have not been able to find this information.
Additionally, I am unsure if the STATUS value needs to be modified in this instance. I have tried the following, also to no avail:
*setvalue props id=<some_pbar_prop_id> STATUS=2 3186={beamsects <id_of_new_beam_sect>}
or
*setvalue props id=<some_pbar_prop_id> 3186={beamsects <id_of_new_beam_sect>} STATUS=2
my beam sections are already defined and are not being generated in the script.
Any help resolving this would be greatly appreciated!
Answers
-
Hello
Don't you find 3186 in command.cmf when you interactively update PBAR?
Attribute ID 3186 stores beam section id for PBEAM, not PBAR
for PBAR, use attribute 3179
*setvalue props id=$PropId STATUS=2 3179=$BeamSectId
Attributes are defined in template file 'attribs'
To check what attribute ID is, use command
hm_attributenamefromid $AttributeId
But all you need are follow command.cmf
0 -
That did the trick!
I was not aware of the command.cmf file. Seems quite handy for replicating commands.
Thanks for the help!
0