I am still very new to .NET so I am asking for some assitance to see if its possible to change the height of the text within the STYLE command. The issue is a mechanical/plumbing firm we are working with uses CAD-DUCT. We have to change the text style height to 2-1/2" for it to be even visible when we Xref their mechanical or plumbing or med-gas drawings into our electrical drawing. Since we up date our drawings from all the other disciplines we have to go throug this process everyday maually, each, one by one. Its an extremely labor intensive process. First is this even possible to do so without opening the drawing. Second are thier routines like that out there avaialble? Any help would be appreciated. Thanks.
I am not sure if your asking can change the text height of all the inserted text by changing the textstyle height, or mimic the the syle command?
This is a simple example that will Change the TextStyle Height
[CommandMethod("ChangeTextSize")] public static void ChangeTextSize() { Database db = HostApplicationServices.WorkingDatabase; using (Transaction trx = db.TransactionManager.StartTransaction()) { try { TextStyleTable txtStyTbl = db.TextStyleTableId.GetObject(OpenMode.ForRead) as TextStyleTable; if (txtStyTbl.Has("TestText")) { TextStyleTableRecord txtStyTblRec = txtStyTbl["TestText"].GetObject(OpenMode.ForWrite) as TextStyleTableRecord; txtStyTblRec.TextSize = 2.5; } } catch (System.Exception ex) { System.Windows.Forms.MessageBox.Show(ex.Message); } trx.Commit(); } }
You could modify it to change closed drawings
Take a look at this example
http://through-the-interface.typepad.com/through_the_interface/2007/07/updating-a-sp-1.html
You can go the same way for batch changing the height of text style
(use Jeff_H's routine for example, say convert it to function before)
~'J'~
Sorry, I don't like off-top in here, but what I can say
I respect him, despite all his prickles, but this is his personal opinion
I have created 2 quite the equipment design for my friends,
based on this example, these projects work without problems in А2008-2009,
as they said me about
FYI,
Regards,
~'J'~
Cool! Modifying a selected folder of (closed drawings) is what I am ultimately after. Some of the code makes sense and this definately gives me something to work with. Thanks. I appreciate the push.