.NET

Reply
Distinguished Contributor
177 Posts
0 Kudos
Registered: ‎09-05-2006
Post 1 of 4

How can I get text's location value?

101 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
Post 2 of 4

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
177 Posts
0 Kudos
Registered: ‎09-05-2006
Post 3 of 4

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
Post 4 of 4

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!
Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Announcements
Are you interested in helping shape the future of the Autodesk Community? To participate in this brief usability study, please click here. Your time and input is greatly appreciated!