How change width factor of a text style

How change width factor of a text style

mehdi_aghdam
Explorer Explorer
206 Views
2 Replies
Message 1 of 3

How change width factor of a text style

mehdi_aghdam
Explorer
Explorer

Hi,

How can I width factor of a text style by .NET ?

0 Likes
Accepted solutions (1)
207 Views
2 Replies
Replies (2)
Message 2 of 3

ActivistInvestor
Mentor
Mentor
Accepted solution
void SetTextStyleWidthFactor(Database db, string styleName, double newWidthFactor)
{
   using(var tr = new OpenCloseTransaction())
   {
      var textStyleTable = (TextStyleTable)tr.GetObject(db.TextStyleTableId, OpenMode.ForRead);
      if(textStyleTable.Has(styleName))
      {
         var tsr = (TextStyleTableRecord)tr.GetObject(textStyleTable[styleName], OpenMode.ForWrite);
         tsr.XScale = newWidthFactor;
      }
      tr.Commit();
   }
}
0 Likes
Message 3 of 3

mehdi_aghdam
Explorer
Explorer

Thank you so much 

0 Likes