Changing the default chosen elements for HyperMesh (Abaqus)

Mickster
Mickster Altair Community Member
edited October 2020 in Community Q&A

Hi, is there any way I change change the default chosen elements for HyperWorks/HyperMesh Abaqus. As I generally use some specific ones like S4, C3D8i etc. 

 

<?xml version="1.0" encoding="UTF-8"?>image.thumb.png.d32fb6c9f3ca33c15c36a5e13d47ce45.png

 

Best regards

Mick

Tagged:

Answers

  • Simon Križnik
    Simon Križnik Altair Community Member
    edited August 2018

    Hi Mickster,

     

    the default element type can be reviewed by 1D/2D/3D > elem types (the panel you posted)

    To change the default element type simply click on the full name or abbreviation to access other options.

     

     

  • tinh
    tinh Altair Community Member
    edited August 2018

    Hi, is there any way I change change the default chosen elements for HyperWorks/HyperMesh Abaqus. As I generally use some specific ones like S4, C3D8i etc. 

     

    <?xml version="1.0" encoding="UTF-8"?>image.thumb.png.d32fb6c9f3ca33c15c36a5e13d47ce45.png

     

    Best regards

    Mick

     

    Hi,

    add below commands to file C:\Users\YourName\hmcustom.tcl

    if {[string match -nocase *abaqus* [hm_framework getuserprofile]]} {

    *elementtype 104 1

    *elementtype 205 5

    *elementtype 208 5

    }

  • Mickster
    Mickster Altair Community Member
    edited August 2018

     

    Hi,

    add below commands to file C:\Users\YourName\hmcustom.tcl

    if {[string match -nocase *abaqus* [hm_framework getuserprofile]]} {

    *elementtype 104 1

    *elementtype 205 5

    *elementtype 208 5

     

    Hi Tinh, is the file somehow protected, as I get this message, which prevents me from making changes:

     

    Can you also tell me, if there is somewhere where I can find information about the different element types.

     

    image.png.630221c6f04dc80d41ee97589ebdf5d9.png

     

    <?xml version="1.0" encoding="UTF-8"?>image.thumb.png.931d753e700b23aa83c74007816d8046.png

     

    Best regards

    Mick

  • tinh
    tinh Altair Community Member
    edited August 2018

    Please edit the file's properties and deactivate 'read-only' checkbox

  • Mickster
    Mickster Altair Community Member
    edited August 2018

    Please edit the file's properties and deactivate 'read-only' checkbox

     

    Hi Tinh, I have now gotten access to change the file. I have changed the script as you told. When I re-open HyperMesh it does not change the default set element-types. Can you see if I have inserted it wrong? 

    <?xml version="1.0" encoding="UTF-8"?>image.png

    <?xml version="1.0" encoding="UTF-8"?>image.png

  • tinh
    tinh Altair Community Member
    edited August 2018

    Hi, maybe initial profile was not abaqus

    try this code:

     

     hm_framework registerproc ::p_ChangeElemTypes after_userprofile proc ::p_ChangeElemTypes args {     if {[string match -nocase *abaqus* $args]} {         *elementtype 104 1         *elementtype 205 5         *elementtype 208 5     } } ::p_ChangeElemTypes [hm_framework getuserprofile]

     

  • Mickster
    Mickster Altair Community Member
    edited August 2018

    Hi, maybe initial profile was not abaqus

    try this code:

     

      hm_framework registerproc ::p_ChangeElemTypes after_userprofile proc ::p_ChangeElemTypes args {     if {[string match -nocase *abaqus* $args]} {         *elementtype 104 1         *elementtype 205 5         *elementtype 208 5     } } ::p_ChangeElemTypes [hm_framework getuserprofile]

     

     

    Hi again Tinh, I tried this code also and still same result. I always have to choose a user profile, when I open up HyperMesh, so it cannot be opened initially.

  • tinh
    tinh Altair Community Member
    edited August 2018

    It worked on my hypermesh.

    Please check it on other machine

  • Mickster
    Mickster Altair Community Member
    edited August 2018

    It worked on my hypermesh.

    Please check it on other machine

     

    Tinh, do you put in on same location as me i.e. the bottom of the script?

  • tinh
    tinh Altair Community Member
    edited August 2018

    I put it on C:/users/tinh/hmcustom.tcl

  • Mickster
    Mickster Altair Community Member
    edited June 2020

    Hi Mr. Tinh. I sitll have noget found a solution for this - I cannot find the file hmcustom.tcl anywhere.

     

    Also, if I create such a file I'd need to have a path to get this file into consideration.

  • Mickster
    Mickster Altair Community Member
    edited June 2020

    Also @tinh could you tell me where you found a list of all the elements? So I understand which elmenet type *elementtype 104 7 corresponds to.

  • Adriano A. Koga
    Adriano A. Koga
    Altair Employee
    edited June 2020

    you can create and save the hmcustom.tcl file into your 'Documents' folder.

     

    The easiest way of getting these commands and codes, would be to look into the command.tcl file, also found (tipically) in the 'Documents' folder.

    You can do the following:

    1- close all HM

    2- go to Documents, and delete command.tcl file

    3- launch HM, and change whatever element types you need (make sure to do the least operations possible

    4- once you hae what you want, open command.tcl in a good text editor, and check what commands have you changed manually 

    5- create a new text file, and save it as 'hmcustom.tcl' in 'Documents' and copy the script sent above and add the commands you've got from step 4, and paste them inside.

    6- launch HM 

     

    Tipically HM will have the start-in directory in 'Documents'.

    But you can also take a look at your HM shortcut, under properties, and it will show the start-in, if not 'Documents'.