Difficulty selecting by box in *createmark
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
Answers
-
Hi
Please show the models that above script does not work.
why did you set syst equal 1?
0 -
<?xml version="1.0" encoding="UTF-8"?>
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' />
0 -
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
0 -
Altair Forum User said:
<?xml version="1.0" encoding="UTF-8"?>
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
0