TheSwamp
Code Red => .NET => Topic started by: A_LOTA_NOTA on April 05, 2011, 04:34:33 PM
-
Once I have selected the block, how do I read it's scale factor?
Edit:
I think I found what I was wanting
BlockReference myBRef = (BlockReference)tr.GetObject(acDb.BlockTableId, OpenMode.ForRead);
double ScaleX = myBRef.ScaleFactors.X;
double ScaleY = myBRef.ScaleFactors.Y;
double ScaleZ = myBRef.ScaleFactors.Z;
-
BlockReference myBRef = (BlockReference)tr.GetObject(acDb.BlockTableId, OpenMode.ForRead);
double ScaleX = myBRef.ScaleFactors.X;
double ScaleY = myBRef.ScaleFactors.Y;
double ScaleZ = myBRef.ScaleFactors.Z;
So these are read only properties? How would I change the scale if I wanted?
Thank for your help
-
Hi,
br.ScaleFactors = new Scale3d(scaleX, scaleY, scaleZ);
If you want to play with block insertions, take a look to the samples in this thread (http://www.theswamp.org/index.php?topic=37686.0).
-
Thank you for your help Gile.