.NET

Reply
Mentor
amitk_189
Posts: 232
Registered: ‎12-15-2011
Message 1 of 2 (122 Views)

GetBoundingBox is Returning 0

122 Views, 1 Replies
07-26-2012 05:01 AM

This is a part of my code which i am using to calculate the locations of Texts using GetBoundingBox. The problem is GetBoundingBox is Returning 0 when i execute the code.

 

 

For index As Integer = 0 To100

' Get single item from selection
Dim AcEnt As Object = AcSpace.GetType.InvokeMember("Item", BindingFlags.InvokeMethod, Nothing, AcSpace, New Object() {index})
' Get Object name
Dim objName As String = AcEnt.GetType.InvokeMember("ObjectName", BindingFlags.GetProperty, Nothing, AcEnt, Nothing).ToString()

Dim textStr As String = String.Empty

If objName = "AcDbText" Then
textStr = AcEnt.GetType.InvokeMember("TextString", BindingFlags.GetProperty, Nothing, AcEnt, Nothing).ToString()

Dim aPoint1(2) As Double
Dim aPoint2(2) As Double

Dim params As Object
params = {aPoint1, aPoint2}
Dim DataParam As Double = AcEnt.GetType().InvokeMember("GetBoundingBox", BindingFlags.InvokeMethod, Nothing, AcEnt, params)
End If

Next

 

Can you suggest me how to get locations of Texts

*Expert Elite*
Hallex
Posts: 1,569
Registered: ‎10-08-2008
Message 2 of 2 (105 Views)

Re: GetBoundingBox is Returning 0

07-26-2012 12:25 PM in reply to: amitk_189

See my last code here:

http://forums.autodesk.com/t5/NET/Select-All/td-p/3551324

 

~'J'~

_____________________________________
C6309D9E0751D165D0934D0621DFF27919

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community