Transformation Matrix - How to apply multiple rotations to a component in assembly ?

I am trying to rotate a component successively about different axes. The transformation matrix gives correct results for first rotation. But it applies second rotation from initial position, not from first rotation result.

By adding the transformation matrix values also, I am not getting required result.

Can you suggest ?

SolidworksApi/macros