Jump to content
  • Announcements

    • Rahul Ponginan

      Please click here for a short but important announcement   03/26/17

      Dear Users Our Commercial and Academic users around the world can use these same forums here as before i.e. the Altair Support Forum , Commercial users from India with solver queries can go to the Solver Forum for India Commercial Users , Academic Users from India and AOC India Participants are requested to go to the Forum for India Academic Users and AOC India Participants , We will be tending to all queries in all the forums promptly as before, thank you for your understanding. 
Sign in to follow this  
Guest

get component name from a line or surface

Recommended Posts

Guest

hi, there!

how can I get the component name of a line or surface using tcl? is there a hm function that I could use.

example. If I select a surface with its number, how I could get its component name or ID

thanks!

Share this post


Link to post
Share on other sites
Guest

Try this:

*createmark surfaces 1 999

(where "999" is the id of the surface)

to get the component id use then:

hm_getentityvalue surfaces 1 "collector.id" 0

to get the component name use then:

hm_getentityvalue surfaces 1 "collector.name" 1

Regards,

Stefan

--

Stefan Hettel

Manager HyperWorks Support

Altair Engineering GmbH

Calwer Strasse 7

D-71034 Boeblingen, Germany

Tel.: +49 (0)7031 6208-46

Fax : +49 (0)7031 6208-99

mailto:hettel@altair.de

Share this post


Link to post
Share on other sites

Hi tinh,

 

I tried the following code:

 

    *createmarkpanel line 1 "Please select the Line on the SAME component";
    set line1 [hm_getmark line 1]
    set compId [hm_getentityvalue lines 1 "by comp id" 0]

    hm_usermessage $compId

 

When I run this, it gives 1 as the output which is not the component id. Can you please tell where I am going wrong

Share this post


Link to post
Share on other sites

 Sorry, the code is :  

 

   *createmarkpanel line 1 "Please select the Line on the SAME component";
    set line1 [hm_getmark line 1]
    set compId [hm_getentityvalue lines 1 "collector.id" 0]

    hm_usermessage $compId

Share this post


Link to post
Share on other sites
7 hours ago, Upadhyay said:

 Sorry, the code is :  

 

   *createmarkpanel line 1 "Please select the Line on the SAME component";
    set line1 [hm_getmark line 1]
    set compId [hm_getentityvalue lines 1 "collector.id" 0]

    hm_usermessage $compId

 

It should be:

*createmarkpanel line 1 "Please select the Line on the SAME component";
    set line1 [hm_getmark line 1]
    set compId [hm_getentityvalue lines $line1 "collector.id" 0]

    hm_usermessage $compId

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×