Model text, in fact, is a bit tricky to determine its rotation value. I attempted to inspect its solids in the hope of finding any reference lines to grasp it, but I was unsuccessful. As I expanded my investigation to comprehend how model text functions, I discovered some hidden references. These references are visible on the user interface only when you attempt to align the model text or draw a line over it.

Which I couldn’t figure out how to identify these references. But wait, here comes the tricky part. When I attempted to obtain the geometry of this model text element, I got 2 solids. The first one has faces and edges, and the second one has zero faces and edges. I thought the second empty solid was indeed empty, but it turned out not to be. When I applied SolidUtil.SplitVolume to the empty solid, it produced 8 solids with actual volumes [ @jeremy_tammik , might be a bug? ].
Continuing with this account, the 8 returned solids are single-faced solids. These faces represent the references that I managed to select while hovering the mouse over. Through experimentation, I realized that the first solid returned always indicates the direction of the text.
Now the rest is just a couple of lines code to get the angle.


public IEnumerable<Solid> GetSolids(ModelText modelTextElement)
{
var op = new Options()
{
IncludeNonVisibleObjects = true
};
var geomCollection = modelTextElement.get_Geometry(op);
IEnumerable<Solid> solids = geomCollection.OfType<Solid>();
return solids;
}
public double? GetModelTextDirection(ModelText modelTextObject)
{
double? angleInDegree = null;
if (modelTextObject != null)
{
var solids = GetSolids(modelTextObject);
foreach (var solid in solids)
{
// we are keen to get the reference solids, hence ignore all above zero volume value
if (solid.Volume > 0)
continue;
var directedSolid = SolidUtils.SplitVolumes(solid).First();
var faces = directedSolid.Faces.Cast<Face>();
PlanarFace directedFace = faces.First() as PlanarFace;
var direction = directedFace.Normal();
double toDegree = 180 / Math.PI;
angleInDegree = Math.Round(XYZ.BasisX.AngleTo(direction) * toDegree, 2);
break;
}
}
return angleInDegree;
}
hope this helps
Moustafa Khalil