the 1st question:
$A.pos = [1,2,3]
$C.pos = [4,5,6]
--the distance between a and c is 5.19615
--B is a child of A.
in coordsys world $B.pos = [1,2,8.19615]
--or
in coordsys parent $B.pos = [0,0,5.19615]
how to make the poses of B and C coincidednt by rotating A?
how to calculate accurately the amount of A.rotation?
the 2nd question:
when I set the pos and the rotation of an object by maxscript there will be different results if I change the sequence of setting pos and rotation.
for example, there are 2 boxes called A and B.
if the pos is set first, B.pos will be changed when B.rotation is set.

Code:
$B.pos = $A.pos
$B.rotation = $A.rotation
else B.pos will coincide with C.pos.

Code:
$B.rotation = $A.rotation
$B.pos = $A.pos
Why this happend? and How to get the right result while the pos is set first.