Abaqus Card Editing

Altair Forum User
Altair Forum User
Altair Employee
edited October 2020 in Community Q&A

Does anyone know how to write a script that will go into a property or a material card and update it? For example, if I want to card edit my material 'STEEL' and enter in the density, Poisson's ratio, etc, how could I put that in a macro? Thanks.

Tagged:

Answers

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited February 2010

    Hi

    Try the below code for a simple model and check it will update all materials density to 111

    //Get material names

    set MatList [hm_entitylist mats name]

    // Updates all materials density to value 111

    foreach MatName $MatList {

    *createmark mats 1 $MatName

    *attributeupdatedoublemark materials 1 4 1 1 0 111.00

    }

    if you want to update only for steel then use the below code

    #Get material names

    set MatList [hm_entitylist mats name]

    #Updates steel material density to value 9200

    foreach MatName $MatList {

    if {$MatName == 'Steel'} {

    *createmark mats 1 $MatName

    *attributeupdatedoublemark materials 1 4 1 1 0 9200

    }

    }

    Check the code....

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited June 2010

    more generally spoken:

    1) clear your command.cmf file

    2) perform the actions you want to do automated by hand in HM GUI

    3) check the command.cmf file and replace the () and , in the *xxxxx commands to get the same commands via tcl;

    and finally: fill your parameters per tcl ...

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited June 2010

    more generally spoken:

    1) clear your command.cmf file

    2) perform the actions you want to do automated by hand in HM GUI

    3) check the command.cmf file and replace the () and , in the *xxxxx commands to get the same commands via tcl;

    and finally: fill your parameters per tcl ...

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited November 2015

    How can I import the card edit entities to an excel sheet?

     

    For Example)

     

         Young's modulus to a column in excel

  • tinh
    tinh Altair Community Member
    edited November 2015

    How can I import the card edit entities to an excel sheet?

     

    For Example)

     

         Young's modulus to a column in excel

     

    Hi

    open Utility tab and looking for 'material table'

    open material table and select File>export>csv

    you then can edit material properties in excel file