🎉Community Raffle - Win $25

An exclusive raffle opportunity for active members like you! Complete your profile, answer questions and get your first accepted badge to enter the raffle.
Join and Win

Querying Assemblies and Components in Linux

User: "Anirudh12"
New Altair Community Member
Updated by Anirudh12

Is it possible to query the list of assemblies and components in the terminal ?

I want to produce the output in terminal . 

Find more posts tagged with

Sort by:
1 - 9 of 91
    User: "QuyNguyenDai"
    Altair Community Member
    Updated by QuyNguyenDai

    Before talking about Linux 'terminal', can you do the same within command area of Hypermesh?

     

    User: "Anirudh12"
    New Altair Community Member
    OP
    Updated by Anirudh12

    Yeah it is . 

    *createmark comps 1 'all'

    hm_getmark comps 1

     

    This will produce the list of components present in the model right .

    User: "QuyNguyenDai"
    Altair Community Member
    Updated by QuyNguyenDai

    Write your TCL script (with above commands) and run it from command line.

    User: "Anirudh12"
    New Altair Community Member
    OP
    Updated by Anirudh12

    So how does it identify the model present in the hm  session ?

    Should i specify the model name or session name along with tcl script while running it from command line.

    User: "tinh"
    Altair Community Member
    Updated by tinh

    I think hm cannot return complist to console, hm (and executables) will return an exit code (integer).

    If you want to get complist, use tcl to get and write it to a text file and then read the file in console

    User: "Anirudh12"
    New Altair Community Member
    OP
    Updated by Anirudh12

    thanks a lot .Also is there a way to access the hm apis through terminal / use hm apis through any programming language using HM_EXTAPI()

    User: "tinh"
    Altair Community Member
    Updated by tinh

    Yes, you can find it in hm reference help (Ext API)

    There is an example.

    User: "QuyNguyenDai"
    Altair Community Member
    Updated by QuyNguyenDai

    Yeah it is . 

    *createmark comps 1 'all'

    hm_getmark comps 1

     

    This will produce the list of components present in the model right .

     

    Here's my test to get ID list of all comps:

     > ./cmd2.sh  21 22 23 24 31 32 33 34 35 36 37 38 3 4 1 2 5 39 42 44 46 47

    File cmd2.sh:

     #!/bin/bash HM='/opt/hw/2019.1/altair/scripts/hm' OPTS='-nocommand -nouserprofiledialog -batch -nobg' TCL='-tcl test2.tcl' export ALTAIR_LICENSE_PATH='6200@YOUR-LICENSE-SERVER' $HM $OPTS $TCL 2>/dev/null

    FIle test2.tcl:

     *templatefileset '/opt/hw/2019.1/altair/templates/feoutput/nastran/general' *readfile '/FULL/PATH/samcef_validation_hw2019.hm' *createmark comps 1 'all' set comp_list [hm_getmark comps 1] puts '$comp_list'

    HTH,

     

     

    User: "Anirudh12"
    New Altair Community Member
    OP
    Updated by Anirudh12

    Thank you @Q.Nguyen-Dai