.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

GetBoundingBox is Returning 0

1 REPLY 1
Reply
Message 1 of 2
amitnkukanur
317 Views, 1 Reply

GetBoundingBox is Returning 0

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

Senior Software Engineer
1 REPLY 1
Message 2 of 2
Hallex
in reply to: amitnkukanur

See my last code here:

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

 

~'J'~

_____________________________________
C6309D9E0751D165D0934D0621DFF27919

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost