.NET

Reply
Distinguished Contributor
gilseorin
Posts: 177
Registered: ‎09-05-2006
Message 1 of 4 (94 Views)

How can I get text's location value?

94 Views, 3 Replies
10-08-2006 04:24 AM
Hi!
I have an difficulty in getting text's location value.
Any help, I'll appreciate it.
Following code does'nt have any error.
Just add your appropriate code to my one,please.
Thank you in advance.

Public Class class1
_
Public Sub eras()
Try
Dim ed As Editor = Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument.Editor
Dim values() As TypedValue = {New TypedValue(0, "Text")}
Dim sfilter As New SelectionFilter(values)
Dim res As PromptSelectionResult = ed.SelectAll(sfilter)
Dim i As Integer
Dim SS As Autodesk.AutoCAD.EditorInput.SelectionSet = res.Value
Dim idarray As ObjectId() = SS.GetObjectIds()
Dim objIdColl As New ObjectIdCollection

For i = 0 To idarray.Length - 1
objIdColl.Add(idarray(i))
Next
Finally
End Try
End Sub
End Class
*Paul Richardson
Message 2 of 4 (94 Views)

Re: How can I get text's location value?

10-08-2006 06:16 AM in reply to: gilseorin
Try attached.

wrote in message news:5354518@discussion.autodesk.com...
Hi!
I have an difficulty in getting text's location value.
Any help, I'll appreciate it.
Following code does'nt have any error.
Just add your appropriate code to my one,please.
Thank you in advance.

Public Class class1
_
Public Sub eras()
Try
Dim ed As Editor =
Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument.Editor
Dim values() As TypedValue = {New TypedValue(0, "Text")}
Dim sfilter As New SelectionFilter(values)
Dim res As PromptSelectionResult = ed.SelectAll(sfilter)
Dim i As Integer
Dim SS As Autodesk.AutoCAD.EditorInput.SelectionSet = res.Value
Dim idarray As ObjectId() = SS.GetObjectIds()
Dim objIdColl As New ObjectIdCollection

For i = 0 To idarray.Length - 1
objIdColl.Add(idarray(i))
Next
Finally
End Try
End Sub
End Class
Distinguished Contributor
gilseorin
Posts: 177
Registered: ‎09-05-2006
Message 3 of 4 (94 Views)

Re: How can I get text's location value?

10-08-2006 06:23 AM in reply to: gilseorin
How happy I am!
I cant't thank you enough, Paul.
It really work well.
God bless you!
*Paul Richardson
Message 4 of 4 (94 Views)

Re: How can I get text's location value?

10-08-2006 07:08 AM in reply to: gilseorin
You're quite welcome. Glad it helped.
wrote in message news:5354493@discussion.autodesk.com...
How happy I am!
I cant't thank you enough, Paul.
It really work well.
God bless you!

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