Jump to content
Anirudh12

Querying Assemblies and Components in Linux

Recommended Posts

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.

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites
On 3/11/2020 at 10:01 AM, Anirudh12 said:

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,

 

 

tinh likes this

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
You are posting as a guest. If you have an account, please sign in.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...