TheSwamp
Code Red => .NET => Topic started by: Andrey Bushman on October 29, 2010, 08:23:27 AM
-
Hi all.
AutoCAD 2009 x86, .Net Framework 3.5 SP1, MS VS 2010, Windows XP SP3 x86
I create new Table, and set any text in it's cells. But I can't set text rotation in cell.
I try it:
...
//set cell's value (text)
table.SetValue(item.RowIndex, item.ColumnIndex, item.Value);
//it not set my angle value
table.SetRotation(item.RowIndex, item.ColumnIndex, 0, item.Angle);
//it not set my angle value too (and I can try set only fixed angles)
table.SetTextRotation(item.RowIndex, item.ColumnIndex, RotationAngle.Degrees270);
...
How can i do it?
-
Hi all.
AutoCAD 2009 x86, .Net Framework 3.5 SP1, MS VS 2010, Windows XP SP3 x86
I create new Table, and set any text in it's cells. But I can't set text rotation in cell.
Don't want to know how it is possible in 2009 and earlier, but with 2010 it's like this:
(http://Rotation.PNG)
F#:
let rnd = new System.Random()
for r = 0 to table.Rows.Count - 1 do
let row = CellRange.Create(table, r, 0, r, table.Columns.Count - 1)
for c = row.LeftColumn to row.RightColumn do
table.Cells.[r, c].TextString <- "foo"
for i = 0 to table.Cells.[r, c].Contents.Count - 1 do
table.Cells.[r, c].Contents.[i].Rotation <- rnd.NextDouble() * 2. * System.Math.PI
Have fun!
-
In AutoCAD 2009 "Table" class not have "Cells" property. (((
-
In AutoCAD 2009 "Table" class not have "Cells" property. (((
Hi Andrey,
the class was supposed to have a plethora of GetSomething/SetSomething members instead. See if especially the GetNumberOfContents property is of any help...
Use Table.Cells.Contents.Count instead.
Cheers, Thorsten