How To Check selected Components contains shell(2D) or solid(3D) elements

User: "Pandurang"
Altair Community Member
Updated by Pandurang

Hi All,

 

I am selecting component using   *createmarkpanel comps 1 ' ' ;

Now i want to know selected component contains 2d 0r 3d element;

 

Regards,

PD

Find more posts tagged with

Sort by:
1 - 7 of 71
    User: "tinh"
    Altair Community Member
    Updated by tinh

    Hi 

     *createmarkpanel comps 1 'you don't prompt anything ?'  *createmark elems 1 'by comp id' {*}[hm_getmark comps 1]  set Types [lsort -unique [string map {103 2d 104 2d 204 3d 206 3d 208 3d} [lsort -unique [hm_getvalue elems mark=1 dataname=config]]]] puts $Types

     

    User: "Pandurang"
    Altair Community Member
    OP
    Updated by Pandurang

    Hi 

      *createmarkpanel comps 1 'you don't prompt anything ?'  *createmark elems 1 'by comp id' {*}[hm_getmark comps 1]  set Types [lsort -unique [string map {103 2d 104 2d 204 3d 206 3d 208 3d} [lsort -unique [hm_getvalue elems mark=1 dataname=config]]]] puts $Types

     

    Thanks Tinh,

     

    one query...

    what is use of --> {*}

    User: "tinh"
    Altair Community Member
    Updated by tinh

    It is to expand a tcl list (from version 8.5), instead of using eval command

    so you provide IDs (multiple argument) to *createmark but not a list of them (one argument)

    User: "Mrunmaya M"
    Altair Community Member
    Updated by Mrunmaya M

    Hi,

     

    One query

     

    How do i interpret the return value of puts $Types.

     

    If it is printing 2 what does that mean ?

     

    Regards,

     

    Mrunmaya Mudigere.

    User: "tinh"
    Altair Community Member
    Updated by tinh

    1 is mass

    2 is plot

    User: "Mrunmaya M"
    Altair Community Member
    Updated by Mrunmaya M

    Hi,

     

    Thanks for the reply

     

    From knowing 2 is plot how can i make out whether the selected component contains 2d 0r 3d elements

     

    Regards,

     

    Mrunmaya Mudigere.

    User: "tinh"
    Altair Community Member
    Updated by tinh

    I think my script already returned '2d' or '3d' or both, depends on what you selected. Do you see it?