Message 1 of 6
Can't use function GetBoundingBox from C# application

Not applicable
01-29-2010
06:22 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi.
I work with Autocad from C# application using late binding.
After inserting block, i want to get its bounds.
double[] aMinPoint = new double[3], aMaxPoint = new double[3];
Params = new object[] { aMinPoint, aMaxPoint };
oBlock.GetType().InvokeMember("GetBoundingBox", BindingFlags.InvokeMethod, null, oBlock, Params);
But after execution this code aMaxPoint and aMinPoint had their default values - 0.
What do I do wrong?
By the way the same task in VB.NET (with built-in late binding) solves good.
Dim aMinPoint() As Double
Dim aMaxPoint() As Double
oBlock.GetBoundingBox(aMinPoint, aMaxPoint)
Thanks for help.
I work with Autocad from C# application using late binding.
After inserting block, i want to get its bounds.
double[] aMinPoint = new double[3], aMaxPoint = new double[3];
Params = new object[] { aMinPoint, aMaxPoint };
oBlock.GetType().InvokeMember("GetBoundingBox", BindingFlags.InvokeMethod, null, oBlock, Params);
But after execution this code aMaxPoint and aMinPoint had their default values - 0.
What do I do wrong?
By the way the same task in VB.NET (with built-in late binding) solves good.
Dim aMinPoint() As Double
Dim aMaxPoint() As Double
oBlock.GetBoundingBox(aMinPoint, aMaxPoint)
Thanks for help.