You need to reference the acCurDb.TextStyleTableId
Perhaps something like this ...
Code:
/// <summary>
///
/// </summary>
[CommandMethod("FTH")]
public static void FixTextHeight()
{
// Get the current document and database, and start a transaction
Document doc = AcadApp.DocumentManager.MdiActiveDocument;
Database db = doc.Database;
using(Transaction tr = db.TransactionManager.StartTransaction())
{
// Return the TextStyle table for the current database
TextStyleTable tsTbl = tr.GetObject(db.TextStyleTableId, OpenMode.ForRead) as TextStyleTable;
// Step through the TextStyle table
foreach(ObjectId objId in tsTbl)
{
TextStyleTableRecord tsTblRec = tr.GetObject(objId, OpenMode.ForWrite) as TextStyleTableRecord;
string textStyleName = tsTblRec.Name;
// If the StyleNAme matches, change the TextSize.
switch(textStyleName)
{
case "L70" :
tsTblRec.TextSize = Convert.ToDouble(AcadApp.GetSystemVariable("DIMSCALE")) * 0.07;
break;
case "L80":
tsTblRec.TextSize = Convert.ToDouble(AcadApp.GetSystemVariable("DIMSCALE")) * 0.08;
break;
default:
break;
}
}
tr.Commit();
// Dispose of the transaction via the 'using' statement
}
}