How to get ON_Text's transform matrix

ON_Text* aText = const_cast<ON_Text*>(dynamic_cast<const ON_Text*>(geometry));
ON_Xform xform = ON_Xform::IdentityTransformation;
const ON_ModelComponentReference& dimStyleRef = onxModel.DimensionStyleFromId(aText->DimensionStyleId());
const ON_DimStyle* dimStyle = ON_DimStyle::Cast(dimStyleRef.ModelComponent());
aText->GetTextXform(&ON_Viewport::DefaultTopViewYUp, dimStyle, 1.0f, xform);

Am I doing right? I’m little confused about the parameters of function GetTextXform().
Thank you!


I exported a model using code above, and found that the transform matrix of the ON_Text object is wrong. Could anyone help me find out why? Thanks!