🎉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

Difficulty selecting by box in *createmark

User: "etrud011"
Altair Community Member
Updated by etrud011

Hello,

 

I am trying to select elements and nodes by box, however the function does not return anything. My code to select elements is as follows;

 

set X0 -20
set Y0 -20
set Z0 -20
set X1 20
set Y1 20
set Z1 20
set syst 1
*createmark elems 1 {'by box'} $X0 $Y0 $Z0 $X1 $Y1 $Z1 $syst inside 0 1 0
set elem_ids [hm_getmark elems 1]

 

It works on some models, and does not work in others. I have also made sure that the limits of selection is within the models dimensions.

 

Thanks

 

Find more posts tagged with

Sort by:
1 - 4 of 41
    User: "tinh"
    Altair Community Member
    Updated by tinh

    Hi

    Please show the models that above script does not work.

    why did you set syst equal 1?

    User: "Pandurang"
    Altair Community Member
    Updated by Pandurang

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

     

    When i used your script by changing variable  values i got this error: unknown entity type found.

    so i wrote same code..it worked...

    So i compared both file...as you can see..in your code at beginning of elems .. unrecognisable error...

    please rectify this and try again...hope it will work:)/emoticons/default_smile.png' srcset='/emoticons/smile@2x.png 2x' title=':)' width='20' />

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

    Hello,

     

    Thank you for the replies, it turns out that the problem was incorrectly specifying the coordinate system. 'syst' should have been set to zero in my case.

     

    Thanks again

    User: "tinh"
    Altair Community Member
    Updated by tinh

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

     

    When i used your script by changing variable  values i got this error: unknown entity type found.

    so i wrote same code..it worked...

    So i compared both file...as you can see..in your code at beginning of elems .. unrecognisable error...

    please rectify this and try again...hope it will work:)/emoticons/default_smile.png' srcset='/emoticons/smile@2x.png 2x' title=':)' width='20' />

     

    just an encoding problem of some web browsers (you copied code from forum then pasted, didn't you?)

     

    and don't brace 'by box'

    {'by box'}  ==> type 'by box'  only