Hello all,
In a part of my script the vector coordinates are pulled for a later use. When I execute I have the following error message
---------------------------------------------------------------------------------------
Error:
can't read 'vx1': no such variable
while executing '*createvector 1 $vx1 $vy1 $vz1'
---------------------------------------------------------------------------------------
Code:
*vectorcreate_twonode $x $y
set vectorList [ hm_getmark vectors 1 ];
foreach vct $vectorList {
set vx1 [ hm_getentityvalue vectors $vct 'xcomp' 0 ]
set vy1 [ hm_getentityvalue vectors $vct 'ycomp' 0 ]
set vz1 [ hm_getentityvalue vectors $vct 'zcomp' 0 ]
return '{ $vx1 } { $vy1 } { $vz1 }'
}
*createmark nodes 1 $x
*duplicatemark nodes 1 25
set r [hm_entitymaxid nodes 1]
*createvector 1 $vx1 $vy1 $vz1
*translatemark nodes 1 1 10
-------------------------------------------------------------------------------------------------------------
Would be great if someone could tell how to reference the coordinates vx1, vy1 and vz1 in the other parts of the code.
Thanks in advance