The Siemens Community Catalyst program was co-created with our community to acknowledge technology leaders who consistently contribute to the Siemens Community. Nominations are accepted on a rolling basis.
Hi,
With NASTRAN profile, I would like to read/write BULK_UNSUPPORTED_CARDS by using a tcl script. Is this possible?
Thanks in advance,
Yes, it is possible. Here are some snippets to read/write to the BULG_UNSUPPORTED_CARDS. Just a disclaimer, haven't try all the code below.
check that the card exists.
set cards [ hm_entitylist cards name ] set exists [ lsearch $cards 'BULK_UNSUPPORTED_CARDS' ] if {$exists != '' } { puts stdout 'BULK_UNSUPPORTED_CARDS exists' }
if it does not exists, you need to create it...
*cardcreate 'BULK_UNSUPPORTED_CARDS'
To get the names of the cards, see http://www.altairhyperworks.com/(S(3fu2zyrlbyi03xcofiue25jd))/hwhelp/Altair/hw11.0/help/hwd/hwd.htm?control_cards.htm
Get the number of unsupported cards
set numOfUnsupportedCards [ hm_getentityvalue cards 'BULK_UNSUPPORTED_CARDS' '\$Bulk_NumUnsupportedCards' 0 ]
then you loop thru all the lines that the card have
for { set i 1 } { $i <= $numOfUnsupportedCards } { incr i } { set line [ hm_attributearrayvalue cards BULK_UNSUPPORTED_CARDS Bulk_UnsupportedCards $i ] # you may want to append to a list; }
to write to the card, you need to tell HM how many unsupported cards you have as an integer attribute update and also, you need to update a string array attribute of the card. It think is as follows
set bulk_unsupported_id [ hm_getentityvalue cards 'BULK_UNSUPPORTED_CARDS' id 0 -byname ] set num_unsupported_lines [ llength $data_list ] *attributeupdateint cards $bulk_unsupported_id 4080 1 0 0 $num_unsupported_lines eval *createstringarray $num_unsupported_lines $data_list *attributeupdatestringarray cards $bulk_unsupported_id 4081 1 2 0 1 $num_unsupported_lines
the list data_list includes the data you want to add to the unsupported card.
Hope this help. Some time a Altair AE explained me how to edit the cards. Aren't the Altair AE awesome?
Thank you so much, cesar.rivas !
Join us for a community conversation on how High-Performance Computing (HPC) and Simcenter PSIM work together to meet the increasing demands of modern power electronics simulation. During this one-hour technical session, you'll discover how leveraging HPC can speed up simulations, improve scalability, and empower engineers…
Join us for a community conversation on accelerating your motor simulation workflow with Simcenter Simlab. In this beginner-friendly session, we'll introduce the platform's automated model-building capabilities and show how easy it is to set up your first electric motor analysis. You'll see the basic steps of geometry…
Join us for a Community Conversation where we'll discuss practical approaches to analyzing complex electromagnetic models using hybrid solver techniques. This session will provide a general overview of how different computational methods can be combined within a single simulation to address models containing varied…