<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Getting co-ordinates from selection set entities in .NET Forum</title>
    <link>https://forums.autodesk.com/t5/net-forum/getting-co-ordinates-from-selection-set-entities/m-p/1339511#M84874</link>
    <description>Thanks Frank. I have tried to do that using this code which I thought would &lt;BR /&gt;
work but throws an error. I can get other info out such as layer, geometric &lt;BR /&gt;
extents etc Do you know where I could get a book or some better online code &lt;BR /&gt;
samples on this as I;m just guessing at the moment and documentation seems &lt;BR /&gt;
pretty thin on the ground.&lt;BR /&gt;
&lt;BR /&gt;
Cheers,&lt;BR /&gt;
&lt;BR /&gt;
Simon&lt;BR /&gt;
&lt;BR /&gt;
If TypeOf entity Is Autodesk.AutoCAD.DatabaseServices.Circle Then&lt;BR /&gt;
&lt;BR /&gt;
Dim Circ As Autodesk.AutoCAD.DatabaseServices.Circle = entity&lt;BR /&gt;
&lt;BR /&gt;
Dim k&lt;BR /&gt;
&lt;BR /&gt;
k = Circ.Center&lt;BR /&gt;
&lt;BR /&gt;
ed.WriteMessage((ControlChars.Lf + "CENT " &amp;amp; k))&lt;BR /&gt;
&lt;BR /&gt;
End If&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
"Frank Oquendo" &lt;FOQUENDO&gt; wrote in message &lt;BR /&gt;
news:4859625@discussion.autodesk.com...&lt;BR /&gt;
Simon wrote:&lt;BR /&gt;
&lt;BR /&gt;
&amp;gt; Dim entity As Entity = tm.GetObject(id, OpenMode.ForRead, True)&lt;BR /&gt;
&lt;BR /&gt;
If you want the center of a circle, you need to cast the object to a circle.&lt;/FOQUENDO&gt;</description>
    <pubDate>Sun, 29 May 2005 14:05:32 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2005-05-29T14:05:32Z</dc:date>
    <item>
      <title>Getting co-ordinates from selection set entities</title>
      <link>https://forums.autodesk.com/t5/net-forum/getting-co-ordinates-from-selection-set-entities/m-p/1339509#M84872</link>
      <description>Hi,&lt;BR /&gt;
&lt;BR /&gt;
I've been trying to get the co-ordinates of circles in a selection set as &lt;BR /&gt;
created in the ObjectArx demo code. I have tried every method O can think of &lt;BR /&gt;
but there doesn't seem to be a method of obtaining the value of the centres. &lt;BR /&gt;
Code from the demo posted below with notes to indicate what I am trying to &lt;BR /&gt;
do. I may be missing something obvious here as it should be a simple &lt;BR /&gt;
process.&lt;BR /&gt;
&lt;BR /&gt;
Thanks for any ideas.&lt;BR /&gt;
&lt;BR /&gt;
Simon&lt;BR /&gt;
&lt;BR /&gt;
Public Sub ssGetFilter()&lt;BR /&gt;
&lt;BR /&gt;
'Setup&lt;BR /&gt;
&lt;BR /&gt;
Dim ed As Editor = Application.DocumentManager.MdiActiveDocument.Editor&lt;BR /&gt;
&lt;BR /&gt;
'Declare our filter entries this way.&lt;BR /&gt;
&lt;BR /&gt;
'We build them the same way in ObjectARX.&lt;BR /&gt;
&lt;BR /&gt;
'DxfCode.Start (equal to 0) - This is for 'Entity Name'&lt;BR /&gt;
&lt;BR /&gt;
'DxfCode.Color is for ACI color - 1 = Red&lt;BR /&gt;
&lt;BR /&gt;
Dim values() As TypedValue = { _&lt;BR /&gt;
&lt;BR /&gt;
New TypedValue(DxfCode.Start, "CIRCLE"), _&lt;BR /&gt;
&lt;BR /&gt;
New TypedValue(DxfCode.Color, 1) _&lt;BR /&gt;
&lt;BR /&gt;
}&lt;BR /&gt;
&lt;BR /&gt;
Dim sfilter As New SelectionFilter(values) ' Create the filter using our &lt;BR /&gt;
values...&lt;BR /&gt;
&lt;BR /&gt;
'Set the selection options&lt;BR /&gt;
&lt;BR /&gt;
Dim SelOpts As New PromptSelectionOptions()&lt;BR /&gt;
&lt;BR /&gt;
SelOpts.MessageForAdding = "Select Red Circles:"&lt;BR /&gt;
&lt;BR /&gt;
SelOpts.AllowDuplicates = True&lt;BR /&gt;
&lt;BR /&gt;
'Make the selection:&lt;BR /&gt;
&lt;BR /&gt;
Dim res As PromptSelectionResult = ed.GetSelection(SelOpts, sfilter)&lt;BR /&gt;
&lt;BR /&gt;
If Not res.Status = PromptStatus.OK Then Return&lt;BR /&gt;
&lt;BR /&gt;
Dim SS As Autodesk.AutoCAD.EditorInput.SelectionSet = res.Value&lt;BR /&gt;
&lt;BR /&gt;
Dim idarray As ObjectId() = SS.GetObjectIds()&lt;BR /&gt;
&lt;BR /&gt;
Dim db As Database = Application.DocumentManager.MdiActiveDocument.Database&lt;BR /&gt;
&lt;BR /&gt;
Dim tm As Autodesk.AutoCAD.DatabaseServices.TransactionManager = &lt;BR /&gt;
db.TransactionManager&lt;BR /&gt;
&lt;BR /&gt;
'start a transaction&lt;BR /&gt;
&lt;BR /&gt;
Dim myT As Transaction = tm.StartTransaction()&lt;BR /&gt;
&lt;BR /&gt;
Try&lt;BR /&gt;
&lt;BR /&gt;
Dim id As ObjectId&lt;BR /&gt;
&lt;BR /&gt;
For Each id In idarray&lt;BR /&gt;
&lt;BR /&gt;
Dim entity As Entity = tm.GetObject(id, OpenMode.ForRead, True)&lt;BR /&gt;
&lt;BR /&gt;
ed.WriteMessage((ControlChars.Lf + "You selected: " + &lt;BR /&gt;
entity.GetType().FullName))&lt;BR /&gt;
&lt;BR /&gt;
' ********************************************Put something here along the &lt;BR /&gt;
lines of entity.value or id.value I can't find where the co-ords a re stored&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Next id&lt;BR /&gt;
&lt;BR /&gt;
Finally&lt;BR /&gt;
&lt;BR /&gt;
myT.Dispose()&lt;BR /&gt;
&lt;BR /&gt;
End Try&lt;BR /&gt;
&lt;BR /&gt;
End Sub</description>
      <pubDate>Sat, 28 May 2005 21:30:23 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/getting-co-ordinates-from-selection-set-entities/m-p/1339509#M84872</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2005-05-28T21:30:23Z</dc:date>
    </item>
    <item>
      <title>Re: Getting co-ordinates from selection set entities</title>
      <link>https://forums.autodesk.com/t5/net-forum/getting-co-ordinates-from-selection-set-entities/m-p/1339510#M84873</link>
      <description>Simon wrote:&lt;BR /&gt;
&lt;BR /&gt;
&amp;gt; Dim entity As Entity = tm.GetObject(id, OpenMode.ForRead, True)&lt;BR /&gt;
&lt;BR /&gt;
If you want the center of a circle, you need to cast the object to a circle.</description>
      <pubDate>Sun, 29 May 2005 00:50:00 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/getting-co-ordinates-from-selection-set-entities/m-p/1339510#M84873</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2005-05-29T00:50:00Z</dc:date>
    </item>
    <item>
      <title>Re: Getting co-ordinates from selection set entities</title>
      <link>https://forums.autodesk.com/t5/net-forum/getting-co-ordinates-from-selection-set-entities/m-p/1339511#M84874</link>
      <description>Thanks Frank. I have tried to do that using this code which I thought would &lt;BR /&gt;
work but throws an error. I can get other info out such as layer, geometric &lt;BR /&gt;
extents etc Do you know where I could get a book or some better online code &lt;BR /&gt;
samples on this as I;m just guessing at the moment and documentation seems &lt;BR /&gt;
pretty thin on the ground.&lt;BR /&gt;
&lt;BR /&gt;
Cheers,&lt;BR /&gt;
&lt;BR /&gt;
Simon&lt;BR /&gt;
&lt;BR /&gt;
If TypeOf entity Is Autodesk.AutoCAD.DatabaseServices.Circle Then&lt;BR /&gt;
&lt;BR /&gt;
Dim Circ As Autodesk.AutoCAD.DatabaseServices.Circle = entity&lt;BR /&gt;
&lt;BR /&gt;
Dim k&lt;BR /&gt;
&lt;BR /&gt;
k = Circ.Center&lt;BR /&gt;
&lt;BR /&gt;
ed.WriteMessage((ControlChars.Lf + "CENT " &amp;amp; k))&lt;BR /&gt;
&lt;BR /&gt;
End If&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
"Frank Oquendo" &lt;FOQUENDO&gt; wrote in message &lt;BR /&gt;
news:4859625@discussion.autodesk.com...&lt;BR /&gt;
Simon wrote:&lt;BR /&gt;
&lt;BR /&gt;
&amp;gt; Dim entity As Entity = tm.GetObject(id, OpenMode.ForRead, True)&lt;BR /&gt;
&lt;BR /&gt;
If you want the center of a circle, you need to cast the object to a circle.&lt;/FOQUENDO&gt;</description>
      <pubDate>Sun, 29 May 2005 14:05:32 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/getting-co-ordinates-from-selection-set-entities/m-p/1339511#M84874</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2005-05-29T14:05:32Z</dc:date>
    </item>
    <item>
      <title>Re: Getting co-ordinates from selection set entities</title>
      <link>https://forums.autodesk.com/t5/net-forum/getting-co-ordinates-from-selection-set-entities/m-p/1339512#M84875</link>
      <description>Can you post a complete example that shows the problem? This is very much &lt;BR /&gt;
possible and in fact fairly simple to do so I'd like to look at your code to &lt;BR /&gt;
diagnose the problem.&lt;BR /&gt;
&lt;BR /&gt;
Albert&lt;BR /&gt;
"Simon" &lt;SIMON.WOOD&gt; wrote in message &lt;BR /&gt;
news:4859602@discussion.autodesk.com...&lt;BR /&gt;
Hi,&lt;BR /&gt;
&lt;BR /&gt;
I've been trying to get the co-ordinates of circles in a selection set as&lt;BR /&gt;
created in the ObjectArx demo code. I have tried every method O can think of&lt;BR /&gt;
but there doesn't seem to be a method of obtaining the value of the centres.&lt;BR /&gt;
Code from the demo posted below with notes to indicate what I am trying to&lt;BR /&gt;
do. I may be missing something obvious here as it should be a simple&lt;BR /&gt;
process.&lt;BR /&gt;
&lt;BR /&gt;
Thanks for any ideas.&lt;BR /&gt;
&lt;BR /&gt;
Simon&lt;BR /&gt;
&lt;BR /&gt;
Public Sub ssGetFilter()&lt;BR /&gt;
&lt;BR /&gt;
'Setup&lt;BR /&gt;
&lt;BR /&gt;
Dim ed As Editor = Application.DocumentManager.MdiActiveDocument.Editor&lt;BR /&gt;
&lt;BR /&gt;
'Declare our filter entries this way.&lt;BR /&gt;
&lt;BR /&gt;
'We build them the same way in ObjectARX.&lt;BR /&gt;
&lt;BR /&gt;
'DxfCode.Start (equal to 0) - This is for 'Entity Name'&lt;BR /&gt;
&lt;BR /&gt;
'DxfCode.Color is for ACI color - 1 = Red&lt;BR /&gt;
&lt;BR /&gt;
Dim values() As TypedValue = { _&lt;BR /&gt;
&lt;BR /&gt;
New TypedValue(DxfCode.Start, "CIRCLE"), _&lt;BR /&gt;
&lt;BR /&gt;
New TypedValue(DxfCode.Color, 1) _&lt;BR /&gt;
&lt;BR /&gt;
}&lt;BR /&gt;
&lt;BR /&gt;
Dim sfilter As New SelectionFilter(values) ' Create the filter using our&lt;BR /&gt;
values...&lt;BR /&gt;
&lt;BR /&gt;
'Set the selection options&lt;BR /&gt;
&lt;BR /&gt;
Dim SelOpts As New PromptSelectionOptions()&lt;BR /&gt;
&lt;BR /&gt;
SelOpts.MessageForAdding = "Select Red Circles:"&lt;BR /&gt;
&lt;BR /&gt;
SelOpts.AllowDuplicates = True&lt;BR /&gt;
&lt;BR /&gt;
'Make the selection:&lt;BR /&gt;
&lt;BR /&gt;
Dim res As PromptSelectionResult = ed.GetSelection(SelOpts, sfilter)&lt;BR /&gt;
&lt;BR /&gt;
If Not res.Status = PromptStatus.OK Then Return&lt;BR /&gt;
&lt;BR /&gt;
Dim SS As Autodesk.AutoCAD.EditorInput.SelectionSet = res.Value&lt;BR /&gt;
&lt;BR /&gt;
Dim idarray As ObjectId() = SS.GetObjectIds()&lt;BR /&gt;
&lt;BR /&gt;
Dim db As Database = Application.DocumentManager.MdiActiveDocument.Database&lt;BR /&gt;
&lt;BR /&gt;
Dim tm As Autodesk.AutoCAD.DatabaseServices.TransactionManager =&lt;BR /&gt;
db.TransactionManager&lt;BR /&gt;
&lt;BR /&gt;
'start a transaction&lt;BR /&gt;
&lt;BR /&gt;
Dim myT As Transaction = tm.StartTransaction()&lt;BR /&gt;
&lt;BR /&gt;
Try&lt;BR /&gt;
&lt;BR /&gt;
Dim id As ObjectId&lt;BR /&gt;
&lt;BR /&gt;
For Each id In idarray&lt;BR /&gt;
&lt;BR /&gt;
Dim entity As Entity = tm.GetObject(id, OpenMode.ForRead, True)&lt;BR /&gt;
&lt;BR /&gt;
ed.WriteMessage((ControlChars.Lf + "You selected: " +&lt;BR /&gt;
entity.GetType().FullName))&lt;BR /&gt;
&lt;BR /&gt;
' ********************************************Put something here along the&lt;BR /&gt;
lines of entity.value or id.value I can't find where the co-ords a re stored&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Next id&lt;BR /&gt;
&lt;BR /&gt;
Finally&lt;BR /&gt;
&lt;BR /&gt;
myT.Dispose()&lt;BR /&gt;
&lt;BR /&gt;
End Try&lt;BR /&gt;
&lt;BR /&gt;
End Sub&lt;/SIMON.WOOD&gt;</description>
      <pubDate>Sun, 29 May 2005 17:46:26 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/getting-co-ordinates-from-selection-set-entities/m-p/1339512#M84875</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2005-05-29T17:46:26Z</dc:date>
    </item>
    <item>
      <title>Re: Getting co-ordinates from selection set entities</title>
      <link>https://forums.autodesk.com/t5/net-forum/getting-co-ordinates-from-selection-set-entities/m-p/1339513#M84876</link>
      <description>Albert,&lt;BR /&gt;
&lt;BR /&gt;
Here's the code, much of it is as the sample from the sdk. I thought this &lt;BR /&gt;
would be simple and it probably is once you know how.&lt;BR /&gt;
&lt;BR /&gt;
Cheers,&lt;BR /&gt;
&lt;BR /&gt;
Simon&lt;BR /&gt;
&lt;BR /&gt;
Public Sub ssGetFilter()&lt;BR /&gt;
&lt;BR /&gt;
'Setup&lt;BR /&gt;
&lt;BR /&gt;
Dim ed As Editor = Application.DocumentManager.MdiActiveDocument.Editor&lt;BR /&gt;
&lt;BR /&gt;
'Declare our filter entries this way.&lt;BR /&gt;
&lt;BR /&gt;
'We build them the same way in ObjectARX.&lt;BR /&gt;
&lt;BR /&gt;
'DxfCode.Start (equal to 0) - This is for 'Entity Name'&lt;BR /&gt;
&lt;BR /&gt;
'DxfCode.Color is for ACI color - 1 = Red&lt;BR /&gt;
&lt;BR /&gt;
Dim values() As TypedValue = { _&lt;BR /&gt;
&lt;BR /&gt;
New TypedValue(DxfCode.Start, "CIRCLE"), _&lt;BR /&gt;
&lt;BR /&gt;
New TypedValue(DxfCode.Color, 1) _&lt;BR /&gt;
&lt;BR /&gt;
}&lt;BR /&gt;
&lt;BR /&gt;
Dim sfilter As New SelectionFilter(values) ' Create the filter using our &lt;BR /&gt;
values...&lt;BR /&gt;
&lt;BR /&gt;
'Set the selection options&lt;BR /&gt;
&lt;BR /&gt;
Dim SelOpts As New PromptSelectionOptions()&lt;BR /&gt;
&lt;BR /&gt;
SelOpts.MessageForAdding = "Select Red Circles:"&lt;BR /&gt;
&lt;BR /&gt;
SelOpts.AllowDuplicates = True&lt;BR /&gt;
&lt;BR /&gt;
'Make the selection:&lt;BR /&gt;
&lt;BR /&gt;
Dim res As PromptSelectionResult = ed.GetSelection(SelOpts, sfilter)&lt;BR /&gt;
&lt;BR /&gt;
If Not res.Status = PromptStatus.OK Then Return&lt;BR /&gt;
&lt;BR /&gt;
Dim SS As Autodesk.AutoCAD.EditorInput.SelectionSet = res.Value&lt;BR /&gt;
&lt;BR /&gt;
Dim idarray As ObjectId() = SS.GetObjectIds()&lt;BR /&gt;
&lt;BR /&gt;
Dim db As Database = Application.DocumentManager.MdiActiveDocument.Database&lt;BR /&gt;
&lt;BR /&gt;
Dim tm As Autodesk.AutoCAD.DatabaseServices.TransactionManager = &lt;BR /&gt;
db.TransactionManager&lt;BR /&gt;
&lt;BR /&gt;
'start a transaction&lt;BR /&gt;
&lt;BR /&gt;
Dim myT As Transaction = tm.StartTransaction()&lt;BR /&gt;
&lt;BR /&gt;
Try&lt;BR /&gt;
&lt;BR /&gt;
Dim id As ObjectId&lt;BR /&gt;
&lt;BR /&gt;
For Each id In idarray&lt;BR /&gt;
&lt;BR /&gt;
'Dim entity As Entity = tm.GetObject(id, OpenMode.ForRead, True)&lt;BR /&gt;
&lt;BR /&gt;
Dim entity As Entity = tm.GetObject(id, OpenMode.ForRead, True)&lt;BR /&gt;
&lt;BR /&gt;
ed.WriteMessage((ControlChars.Lf + "You selected: " + &lt;BR /&gt;
entity.GetType().FullName))&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
If TypeOf entity Is Autodesk.AutoCAD.DatabaseServices.Circle Then&lt;BR /&gt;
&lt;BR /&gt;
Dim Circ As Autodesk.AutoCAD.DatabaseServices.Circle = entity&lt;BR /&gt;
&lt;BR /&gt;
Dim k&lt;BR /&gt;
&lt;BR /&gt;
k = Circ.Center&lt;BR /&gt;
&lt;BR /&gt;
ed.WriteMessage((ControlChars.Lf + "CENT " &amp;amp; k))&lt;BR /&gt;
&lt;BR /&gt;
End If&lt;BR /&gt;
&lt;BR /&gt;
Next id&lt;BR /&gt;
&lt;BR /&gt;
Finally&lt;BR /&gt;
&lt;BR /&gt;
myT.Dispose()&lt;BR /&gt;
&lt;BR /&gt;
End Try&lt;BR /&gt;
&lt;BR /&gt;
End Sub&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
"Albert Szilvasy" &lt;NOT_PROVIDED&gt; wrote in message &lt;BR /&gt;
news:4859720@discussion.autodesk.com...&lt;BR /&gt;
Can you post a complete example that shows the problem? This is very much&lt;BR /&gt;
possible and in fact fairly simple to do so I'd like to look at your code to&lt;BR /&gt;
diagnose the problem.&lt;BR /&gt;
&lt;BR /&gt;
Albert&lt;BR /&gt;
"Simon" &lt;SIMON.WOOD&gt; wrote in message&lt;BR /&gt;
news:4859602@discussion.autodesk.com...&lt;BR /&gt;
Hi,&lt;BR /&gt;
&lt;BR /&gt;
I've been trying to get the co-ordinates of circles in a selection set as&lt;BR /&gt;
created in the ObjectArx demo code. I have tried every method O can think of&lt;BR /&gt;
but there doesn't seem to be a method of obtaining the value of the centres.&lt;BR /&gt;
Code from the demo posted below with notes to indicate what I am trying to&lt;BR /&gt;
do. I may be missing something obvious here as it should be a simple&lt;BR /&gt;
process.&lt;BR /&gt;
&lt;BR /&gt;
Thanks for any ideas.&lt;BR /&gt;
&lt;BR /&gt;
Simon&lt;BR /&gt;
&lt;BR /&gt;
Public Sub ssGetFilter()&lt;BR /&gt;
&lt;BR /&gt;
'Setup&lt;BR /&gt;
&lt;BR /&gt;
Dim ed As Editor = Application.DocumentManager.MdiActiveDocument.Editor&lt;BR /&gt;
&lt;BR /&gt;
'Declare our filter entries this way.&lt;BR /&gt;
&lt;BR /&gt;
'We build them the same way in ObjectARX.&lt;BR /&gt;
&lt;BR /&gt;
'DxfCode.Start (equal to 0) - This is for 'Entity Name'&lt;BR /&gt;
&lt;BR /&gt;
'DxfCode.Color is for ACI color - 1 = Red&lt;BR /&gt;
&lt;BR /&gt;
Dim values() As TypedValue = { _&lt;BR /&gt;
&lt;BR /&gt;
New TypedValue(DxfCode.Start, "CIRCLE"), _&lt;BR /&gt;
&lt;BR /&gt;
New TypedValue(DxfCode.Color, 1) _&lt;BR /&gt;
&lt;BR /&gt;
}&lt;BR /&gt;
&lt;BR /&gt;
Dim sfilter As New SelectionFilter(values) ' Create the filter using our&lt;BR /&gt;
values...&lt;BR /&gt;
&lt;BR /&gt;
'Set the selection options&lt;BR /&gt;
&lt;BR /&gt;
Dim SelOpts As New PromptSelectionOptions()&lt;BR /&gt;
&lt;BR /&gt;
SelOpts.MessageForAdding = "Select Red Circles:"&lt;BR /&gt;
&lt;BR /&gt;
SelOpts.AllowDuplicates = True&lt;BR /&gt;
&lt;BR /&gt;
'Make the selection:&lt;BR /&gt;
&lt;BR /&gt;
Dim res As PromptSelectionResult = ed.GetSelection(SelOpts, sfilter)&lt;BR /&gt;
&lt;BR /&gt;
If Not res.Status = PromptStatus.OK Then Return&lt;BR /&gt;
&lt;BR /&gt;
Dim SS As Autodesk.AutoCAD.EditorInput.SelectionSet = res.Value&lt;BR /&gt;
&lt;BR /&gt;
Dim idarray As ObjectId() = SS.GetObjectIds()&lt;BR /&gt;
&lt;BR /&gt;
Dim db As Database = Application.DocumentManager.MdiActiveDocument.Database&lt;BR /&gt;
&lt;BR /&gt;
Dim tm As Autodesk.AutoCAD.DatabaseServices.TransactionManager =&lt;BR /&gt;
db.TransactionManager&lt;BR /&gt;
&lt;BR /&gt;
'start a transaction&lt;BR /&gt;
&lt;BR /&gt;
Dim myT As Transaction = tm.StartTransaction()&lt;BR /&gt;
&lt;BR /&gt;
Try&lt;BR /&gt;
&lt;BR /&gt;
Dim id As ObjectId&lt;BR /&gt;
&lt;BR /&gt;
For Each id In idarray&lt;BR /&gt;
&lt;BR /&gt;
Dim entity As Entity = tm.GetObject(id, OpenMode.ForRead, True)&lt;BR /&gt;
&lt;BR /&gt;
ed.WriteMessage((ControlChars.Lf + "You selected: " +&lt;BR /&gt;
entity.GetType().FullName))&lt;BR /&gt;
&lt;BR /&gt;
' ********************************************Put something here along the&lt;BR /&gt;
lines of entity.value or id.value I can't find where the co-ords a re stored&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Next id&lt;BR /&gt;
&lt;BR /&gt;
Finally&lt;BR /&gt;
&lt;BR /&gt;
myT.Dispose()&lt;BR /&gt;
&lt;BR /&gt;
End Try&lt;BR /&gt;
&lt;BR /&gt;
End Sub&lt;/SIMON.WOOD&gt;&lt;/NOT_PROVIDED&gt;</description>
      <pubDate>Sun, 29 May 2005 22:08:01 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/getting-co-ordinates-from-selection-set-entities/m-p/1339513#M84876</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2005-05-29T22:08:01Z</dc:date>
    </item>
    <item>
      <title>Re: Getting co-ordinates from selection set entities</title>
      <link>https://forums.autodesk.com/t5/net-forum/getting-co-ordinates-from-selection-set-entities/m-p/1339514#M84877</link>
      <description>The problem is simple: you are trying to cast a Point3d to a String (the &lt;BR /&gt;
exception thrown actually says that.)&lt;BR /&gt;
&lt;BR /&gt;
You need to modify this:&lt;BR /&gt;
------------------&lt;BR /&gt;
Dim k&lt;BR /&gt;
k = Circ.Center&lt;BR /&gt;
ed.WriteMessage((ControlChars.Lf + "CENT " &amp;amp; k))&lt;BR /&gt;
-----------------&lt;BR /&gt;
To this:&lt;BR /&gt;
----------------&lt;BR /&gt;
Dim k&lt;BR /&gt;
k = Circ.Center&lt;BR /&gt;
ed.WriteMessage((ControlChars.Lf + "CENT " &amp;amp; k.ToString()))&lt;BR /&gt;
-----------&lt;BR /&gt;
I could've spotted this in first post if I was a bit more versed in VB.&lt;BR /&gt;
&lt;BR /&gt;
Albert&lt;BR /&gt;
&lt;BR /&gt;
"Simon" &lt;SIMON.WOOD&gt; wrote in message &lt;BR /&gt;
news:4859733@discussion.autodesk.com...&lt;BR /&gt;
Albert,&lt;BR /&gt;
&lt;BR /&gt;
Here's the code, much of it is as the sample from the sdk. I thought this&lt;BR /&gt;
would be simple and it probably is once you know how.&lt;BR /&gt;
&lt;BR /&gt;
Cheers,&lt;BR /&gt;
&lt;BR /&gt;
Simon&lt;BR /&gt;
&lt;BR /&gt;
Public Sub ssGetFilter()&lt;BR /&gt;
&lt;BR /&gt;
'Setup&lt;BR /&gt;
&lt;BR /&gt;
Dim ed As Editor = Application.DocumentManager.MdiActiveDocument.Editor&lt;BR /&gt;
&lt;BR /&gt;
'Declare our filter entries this way.&lt;BR /&gt;
&lt;BR /&gt;
'We build them the same way in ObjectARX.&lt;BR /&gt;
&lt;BR /&gt;
'DxfCode.Start (equal to 0) - This is for 'Entity Name'&lt;BR /&gt;
&lt;BR /&gt;
'DxfCode.Color is for ACI color - 1 = Red&lt;BR /&gt;
&lt;BR /&gt;
Dim values() As TypedValue = { _&lt;BR /&gt;
&lt;BR /&gt;
New TypedValue(DxfCode.Start, "CIRCLE"), _&lt;BR /&gt;
&lt;BR /&gt;
New TypedValue(DxfCode.Color, 1) _&lt;BR /&gt;
&lt;BR /&gt;
}&lt;BR /&gt;
&lt;BR /&gt;
Dim sfilter As New SelectionFilter(values) ' Create the filter using our&lt;BR /&gt;
values...&lt;BR /&gt;
&lt;BR /&gt;
'Set the selection options&lt;BR /&gt;
&lt;BR /&gt;
Dim SelOpts As New PromptSelectionOptions()&lt;BR /&gt;
&lt;BR /&gt;
SelOpts.MessageForAdding = "Select Red Circles:"&lt;BR /&gt;
&lt;BR /&gt;
SelOpts.AllowDuplicates = True&lt;BR /&gt;
&lt;BR /&gt;
'Make the selection:&lt;BR /&gt;
&lt;BR /&gt;
Dim res As PromptSelectionResult = ed.GetSelection(SelOpts, sfilter)&lt;BR /&gt;
&lt;BR /&gt;
If Not res.Status = PromptStatus.OK Then Return&lt;BR /&gt;
&lt;BR /&gt;
Dim SS As Autodesk.AutoCAD.EditorInput.SelectionSet = res.Value&lt;BR /&gt;
&lt;BR /&gt;
Dim idarray As ObjectId() = SS.GetObjectIds()&lt;BR /&gt;
&lt;BR /&gt;
Dim db As Database = Application.DocumentManager.MdiActiveDocument.Database&lt;BR /&gt;
&lt;BR /&gt;
Dim tm As Autodesk.AutoCAD.DatabaseServices.TransactionManager =&lt;BR /&gt;
db.TransactionManager&lt;BR /&gt;
&lt;BR /&gt;
'start a transaction&lt;BR /&gt;
&lt;BR /&gt;
Dim myT As Transaction = tm.StartTransaction()&lt;BR /&gt;
&lt;BR /&gt;
Try&lt;BR /&gt;
&lt;BR /&gt;
Dim id As ObjectId&lt;BR /&gt;
&lt;BR /&gt;
For Each id In idarray&lt;BR /&gt;
&lt;BR /&gt;
'Dim entity As Entity = tm.GetObject(id, OpenMode.ForRead, True)&lt;BR /&gt;
&lt;BR /&gt;
Dim entity As Entity = tm.GetObject(id, OpenMode.ForRead, True)&lt;BR /&gt;
&lt;BR /&gt;
ed.WriteMessage((ControlChars.Lf + "You selected: " +&lt;BR /&gt;
entity.GetType().FullName))&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
If TypeOf entity Is Autodesk.AutoCAD.DatabaseServices.Circle Then&lt;BR /&gt;
&lt;BR /&gt;
Dim Circ As Autodesk.AutoCAD.DatabaseServices.Circle = entity&lt;BR /&gt;
&lt;BR /&gt;
Dim k&lt;BR /&gt;
&lt;BR /&gt;
k = Circ.Center&lt;BR /&gt;
&lt;BR /&gt;
ed.WriteMessage((ControlChars.Lf + "CENT " &amp;amp; k))&lt;BR /&gt;
&lt;BR /&gt;
End If&lt;BR /&gt;
&lt;BR /&gt;
Next id&lt;BR /&gt;
&lt;BR /&gt;
Finally&lt;BR /&gt;
&lt;BR /&gt;
myT.Dispose()&lt;BR /&gt;
&lt;BR /&gt;
End Try&lt;BR /&gt;
&lt;BR /&gt;
End Sub&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
"Albert Szilvasy" &lt;NOT_PROVIDED&gt; wrote in message&lt;BR /&gt;
news:4859720@discussion.autodesk.com...&lt;BR /&gt;
Can you post a complete example that shows the problem? This is very much&lt;BR /&gt;
possible and in fact fairly simple to do so I'd like to look at your code to&lt;BR /&gt;
diagnose the problem.&lt;BR /&gt;
&lt;BR /&gt;
Albert&lt;BR /&gt;
"Simon" &lt;SIMON.WOOD&gt; wrote in message&lt;BR /&gt;
news:4859602@discussion.autodesk.com...&lt;BR /&gt;
Hi,&lt;BR /&gt;
&lt;BR /&gt;
I've been trying to get the co-ordinates of circles in a selection set as&lt;BR /&gt;
created in the ObjectArx demo code. I have tried every method O can think of&lt;BR /&gt;
but there doesn't seem to be a method of obtaining the value of the centres.&lt;BR /&gt;
Code from the demo posted below with notes to indicate what I am trying to&lt;BR /&gt;
do. I may be missing something obvious here as it should be a simple&lt;BR /&gt;
process.&lt;BR /&gt;
&lt;BR /&gt;
Thanks for any ideas.&lt;BR /&gt;
&lt;BR /&gt;
Simon&lt;BR /&gt;
&lt;BR /&gt;
Public Sub ssGetFilter()&lt;BR /&gt;
&lt;BR /&gt;
'Setup&lt;BR /&gt;
&lt;BR /&gt;
Dim ed As Editor = Application.DocumentManager.MdiActiveDocument.Editor&lt;BR /&gt;
&lt;BR /&gt;
'Declare our filter entries this way.&lt;BR /&gt;
&lt;BR /&gt;
'We build them the same way in ObjectARX.&lt;BR /&gt;
&lt;BR /&gt;
'DxfCode.Start (equal to 0) - This is for 'Entity Name'&lt;BR /&gt;
&lt;BR /&gt;
'DxfCode.Color is for ACI color - 1 = Red&lt;BR /&gt;
&lt;BR /&gt;
Dim values() As TypedValue = { _&lt;BR /&gt;
&lt;BR /&gt;
New TypedValue(DxfCode.Start, "CIRCLE"), _&lt;BR /&gt;
&lt;BR /&gt;
New TypedValue(DxfCode.Color, 1) _&lt;BR /&gt;
&lt;BR /&gt;
}&lt;BR /&gt;
&lt;BR /&gt;
Dim sfilter As New SelectionFilter(values) ' Create the filter using our&lt;BR /&gt;
values...&lt;BR /&gt;
&lt;BR /&gt;
'Set the selection options&lt;BR /&gt;
&lt;BR /&gt;
Dim SelOpts As New PromptSelectionOptions()&lt;BR /&gt;
&lt;BR /&gt;
SelOpts.MessageForAdding = "Select Red Circles:"&lt;BR /&gt;
&lt;BR /&gt;
SelOpts.AllowDuplicates = True&lt;BR /&gt;
&lt;BR /&gt;
'Make the selection:&lt;BR /&gt;
&lt;BR /&gt;
Dim res As PromptSelectionResult = ed.GetSelection(SelOpts, sfilter)&lt;BR /&gt;
&lt;BR /&gt;
If Not res.Status = PromptStatus.OK Then Return&lt;BR /&gt;
&lt;BR /&gt;
Dim SS As Autodesk.AutoCAD.EditorInput.SelectionSet = res.Value&lt;BR /&gt;
&lt;BR /&gt;
Dim idarray As ObjectId() = SS.GetObjectIds()&lt;BR /&gt;
&lt;BR /&gt;
Dim db As Database = Application.DocumentManager.MdiActiveDocument.Database&lt;BR /&gt;
&lt;BR /&gt;
Dim tm As Autodesk.AutoCAD.DatabaseServices.TransactionManager =&lt;BR /&gt;
db.TransactionManager&lt;BR /&gt;
&lt;BR /&gt;
'start a transaction&lt;BR /&gt;
&lt;BR /&gt;
Dim myT As Transaction = tm.StartTransaction()&lt;BR /&gt;
&lt;BR /&gt;
Try&lt;BR /&gt;
&lt;BR /&gt;
Dim id As ObjectId&lt;BR /&gt;
&lt;BR /&gt;
For Each id In idarray&lt;BR /&gt;
&lt;BR /&gt;
Dim entity As Entity = tm.GetObject(id, OpenMode.ForRead, True)&lt;BR /&gt;
&lt;BR /&gt;
ed.WriteMessage((ControlChars.Lf + "You selected: " +&lt;BR /&gt;
entity.GetType().FullName))&lt;BR /&gt;
&lt;BR /&gt;
' ********************************************Put something here along the&lt;BR /&gt;
lines of entity.value or id.value I can't find where the co-ords a re stored&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Next id&lt;BR /&gt;
&lt;BR /&gt;
Finally&lt;BR /&gt;
&lt;BR /&gt;
myT.Dispose()&lt;BR /&gt;
&lt;BR /&gt;
End Try&lt;BR /&gt;
&lt;BR /&gt;
End Sub&lt;/SIMON.WOOD&gt;&lt;/NOT_PROVIDED&gt;&lt;/SIMON.WOOD&gt;</description>
      <pubDate>Thu, 02 Jun 2005 02:23:09 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/getting-co-ordinates-from-selection-set-entities/m-p/1339514#M84877</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2005-06-02T02:23:09Z</dc:date>
    </item>
    <item>
      <title>Re: Getting co-ordinates from selection set entities</title>
      <link>https://forums.autodesk.com/t5/net-forum/getting-co-ordinates-from-selection-set-entities/m-p/1339515#M84878</link>
      <description>Albert,&lt;BR /&gt;
&lt;BR /&gt;
Thanks for that. I had thought to do that but .ToString doesn't come up in &lt;BR /&gt;
intellisense so I didn't try it. If you type it in it works fine. Thanks &lt;BR /&gt;
very much.&lt;BR /&gt;
&lt;BR /&gt;
Simon&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
"Albert Szilvasy" &lt;NOT_PROVIDED&gt; wrote in message &lt;BR /&gt;
news:4862797@discussion.autodesk.com...&lt;BR /&gt;
The problem is simple: you are trying to cast a Point3d to a String (the&lt;BR /&gt;
exception thrown actually says that.)&lt;BR /&gt;
&lt;BR /&gt;
You need to modify this:&lt;BR /&gt;
------------------&lt;BR /&gt;
Dim k&lt;BR /&gt;
k = Circ.Center&lt;BR /&gt;
ed.WriteMessage((ControlChars.Lf + "CENT " &amp;amp; k))&lt;BR /&gt;
-----------------&lt;BR /&gt;
To this:&lt;BR /&gt;
----------------&lt;BR /&gt;
Dim k&lt;BR /&gt;
k = Circ.Center&lt;BR /&gt;
ed.WriteMessage((ControlChars.Lf + "CENT " &amp;amp; k.ToString()))&lt;BR /&gt;
-----------&lt;BR /&gt;
I could've spotted this in first post if I was a bit more versed in VB.&lt;BR /&gt;
&lt;BR /&gt;
Albert&lt;BR /&gt;
&lt;BR /&gt;
"Simon" &lt;SIMON.WOOD&gt; wrote in message&lt;BR /&gt;
news:4859733@discussion.autodesk.com...&lt;BR /&gt;
Albert,&lt;BR /&gt;
&lt;BR /&gt;
Here's the code, much of it is as the sample from the sdk. I thought this&lt;BR /&gt;
would be simple and it probably is once you know how.&lt;BR /&gt;
&lt;BR /&gt;
Cheers,&lt;BR /&gt;
&lt;BR /&gt;
Simon&lt;BR /&gt;
&lt;BR /&gt;
Public Sub ssGetFilter()&lt;BR /&gt;
&lt;BR /&gt;
'Setup&lt;BR /&gt;
&lt;BR /&gt;
Dim ed As Editor = Application.DocumentManager.MdiActiveDocument.Editor&lt;BR /&gt;
&lt;BR /&gt;
'Declare our filter entries this way.&lt;BR /&gt;
&lt;BR /&gt;
'We build them the same way in ObjectARX.&lt;BR /&gt;
&lt;BR /&gt;
'DxfCode.Start (equal to 0) - This is for 'Entity Name'&lt;BR /&gt;
&lt;BR /&gt;
'DxfCode.Color is for ACI color - 1 = Red&lt;BR /&gt;
&lt;BR /&gt;
Dim values() As TypedValue = { _&lt;BR /&gt;
&lt;BR /&gt;
New TypedValue(DxfCode.Start, "CIRCLE"), _&lt;BR /&gt;
&lt;BR /&gt;
New TypedValue(DxfCode.Color, 1) _&lt;BR /&gt;
&lt;BR /&gt;
}&lt;BR /&gt;
&lt;BR /&gt;
Dim sfilter As New SelectionFilter(values) ' Create the filter using our&lt;BR /&gt;
values...&lt;BR /&gt;
&lt;BR /&gt;
'Set the selection options&lt;BR /&gt;
&lt;BR /&gt;
Dim SelOpts As New PromptSelectionOptions()&lt;BR /&gt;
&lt;BR /&gt;
SelOpts.MessageForAdding = "Select Red Circles:"&lt;BR /&gt;
&lt;BR /&gt;
SelOpts.AllowDuplicates = True&lt;BR /&gt;
&lt;BR /&gt;
'Make the selection:&lt;BR /&gt;
&lt;BR /&gt;
Dim res As PromptSelectionResult = ed.GetSelection(SelOpts, sfilter)&lt;BR /&gt;
&lt;BR /&gt;
If Not res.Status = PromptStatus.OK Then Return&lt;BR /&gt;
&lt;BR /&gt;
Dim SS As Autodesk.AutoCAD.EditorInput.SelectionSet = res.Value&lt;BR /&gt;
&lt;BR /&gt;
Dim idarray As ObjectId() = SS.GetObjectIds()&lt;BR /&gt;
&lt;BR /&gt;
Dim db As Database = Application.DocumentManager.MdiActiveDocument.Database&lt;BR /&gt;
&lt;BR /&gt;
Dim tm As Autodesk.AutoCAD.DatabaseServices.TransactionManager =&lt;BR /&gt;
db.TransactionManager&lt;BR /&gt;
&lt;BR /&gt;
'start a transaction&lt;BR /&gt;
&lt;BR /&gt;
Dim myT As Transaction = tm.StartTransaction()&lt;BR /&gt;
&lt;BR /&gt;
Try&lt;BR /&gt;
&lt;BR /&gt;
Dim id As ObjectId&lt;BR /&gt;
&lt;BR /&gt;
For Each id In idarray&lt;BR /&gt;
&lt;BR /&gt;
'Dim entity As Entity = tm.GetObject(id, OpenMode.ForRead, True)&lt;BR /&gt;
&lt;BR /&gt;
Dim entity As Entity = tm.GetObject(id, OpenMode.ForRead, True)&lt;BR /&gt;
&lt;BR /&gt;
ed.WriteMessage((ControlChars.Lf + "You selected: " +&lt;BR /&gt;
entity.GetType().FullName))&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
If TypeOf entity Is Autodesk.AutoCAD.DatabaseServices.Circle Then&lt;BR /&gt;
&lt;BR /&gt;
Dim Circ As Autodesk.AutoCAD.DatabaseServices.Circle = entity&lt;BR /&gt;
&lt;BR /&gt;
Dim k&lt;BR /&gt;
&lt;BR /&gt;
k = Circ.Center&lt;BR /&gt;
&lt;BR /&gt;
ed.WriteMessage((ControlChars.Lf + "CENT " &amp;amp; k))&lt;BR /&gt;
&lt;BR /&gt;
End If&lt;BR /&gt;
&lt;BR /&gt;
Next id&lt;BR /&gt;
&lt;BR /&gt;
Finally&lt;BR /&gt;
&lt;BR /&gt;
myT.Dispose()&lt;BR /&gt;
&lt;BR /&gt;
End Try&lt;BR /&gt;
&lt;BR /&gt;
End Sub&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
"Albert Szilvasy" &lt;NOT_PROVIDED&gt; wrote in message&lt;BR /&gt;
news:4859720@discussion.autodesk.com...&lt;BR /&gt;
Can you post a complete example that shows the problem? This is very much&lt;BR /&gt;
possible and in fact fairly simple to do so I'd like to look at your code to&lt;BR /&gt;
diagnose the problem.&lt;BR /&gt;
&lt;BR /&gt;
Albert&lt;BR /&gt;
"Simon" &lt;SIMON.WOOD&gt; wrote in message&lt;BR /&gt;
news:4859602@discussion.autodesk.com...&lt;BR /&gt;
Hi,&lt;BR /&gt;
&lt;BR /&gt;
I've been trying to get the co-ordinates of circles in a selection set as&lt;BR /&gt;
created in the ObjectArx demo code. I have tried every method O can think of&lt;BR /&gt;
but there doesn't seem to be a method of obtaining the value of the centres.&lt;BR /&gt;
Code from the demo posted below with notes to indicate what I am trying to&lt;BR /&gt;
do. I may be missing something obvious here as it should be a simple&lt;BR /&gt;
process.&lt;BR /&gt;
&lt;BR /&gt;
Thanks for any ideas.&lt;BR /&gt;
&lt;BR /&gt;
Simon&lt;BR /&gt;
&lt;BR /&gt;
Public Sub ssGetFilter()&lt;BR /&gt;
&lt;BR /&gt;
'Setup&lt;BR /&gt;
&lt;BR /&gt;
Dim ed As Editor = Application.DocumentManager.MdiActiveDocument.Editor&lt;BR /&gt;
&lt;BR /&gt;
'Declare our filter entries this way.&lt;BR /&gt;
&lt;BR /&gt;
'We build them the same way in ObjectARX.&lt;BR /&gt;
&lt;BR /&gt;
'DxfCode.Start (equal to 0) - This is for 'Entity Name'&lt;BR /&gt;
&lt;BR /&gt;
'DxfCode.Color is for ACI color - 1 = Red&lt;BR /&gt;
&lt;BR /&gt;
Dim values() As TypedValue = { _&lt;BR /&gt;
&lt;BR /&gt;
New TypedValue(DxfCode.Start, "CIRCLE"), _&lt;BR /&gt;
&lt;BR /&gt;
New TypedValue(DxfCode.Color, 1) _&lt;BR /&gt;
&lt;BR /&gt;
}&lt;BR /&gt;
&lt;BR /&gt;
Dim sfilter As New SelectionFilter(values) ' Create the filter using our&lt;BR /&gt;
values...&lt;BR /&gt;
&lt;BR /&gt;
'Set the selection options&lt;BR /&gt;
&lt;BR /&gt;
Dim SelOpts As New PromptSelectionOptions()&lt;BR /&gt;
&lt;BR /&gt;
SelOpts.MessageForAdding = "Select Red Circles:"&lt;BR /&gt;
&lt;BR /&gt;
SelOpts.AllowDuplicates = True&lt;BR /&gt;
&lt;BR /&gt;
'Make the selection:&lt;BR /&gt;
&lt;BR /&gt;
Dim res As PromptSelectionResult = ed.GetSelection(SelOpts, sfilter)&lt;BR /&gt;
&lt;BR /&gt;
If Not res.Status = PromptStatus.OK Then Return&lt;BR /&gt;
&lt;BR /&gt;
Dim SS As Autodesk.AutoCAD.EditorInput.SelectionSet = res.Value&lt;BR /&gt;
&lt;BR /&gt;
Dim idarray As ObjectId() = SS.GetObjectIds()&lt;BR /&gt;
&lt;BR /&gt;
Dim db As Database = Application.DocumentManager.MdiActiveDocument.Database&lt;BR /&gt;
&lt;BR /&gt;
Dim tm As Autodesk.AutoCAD.DatabaseServices.TransactionManager =&lt;BR /&gt;
db.TransactionManager&lt;BR /&gt;
&lt;BR /&gt;
'start a transaction&lt;BR /&gt;
&lt;BR /&gt;
Dim myT As Transaction = tm.StartTransaction()&lt;BR /&gt;
&lt;BR /&gt;
Try&lt;BR /&gt;
&lt;BR /&gt;
Dim id As ObjectId&lt;BR /&gt;
&lt;BR /&gt;
For Each id In idarray&lt;BR /&gt;
&lt;BR /&gt;
Dim entity As Entity = tm.GetObject(id, OpenMode.ForRead, True)&lt;BR /&gt;
&lt;BR /&gt;
ed.WriteMessage((ControlChars.Lf + "You selected: " +&lt;BR /&gt;
entity.GetType().FullName))&lt;BR /&gt;
&lt;BR /&gt;
' ********************************************Put something here along the&lt;BR /&gt;
lines of entity.value or id.value I can't find where the co-ords a re stored&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Next id&lt;BR /&gt;
&lt;BR /&gt;
Finally&lt;BR /&gt;
&lt;BR /&gt;
myT.Dispose()&lt;BR /&gt;
&lt;BR /&gt;
End Try&lt;BR /&gt;
&lt;BR /&gt;
End Sub&lt;/SIMON.WOOD&gt;&lt;/NOT_PROVIDED&gt;&lt;/SIMON.WOOD&gt;&lt;/NOT_PROVIDED&gt;</description>
      <pubDate>Thu, 02 Jun 2005 06:37:00 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/getting-co-ordinates-from-selection-set-entities/m-p/1339515#M84878</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2005-06-02T06:37:00Z</dc:date>
    </item>
  </channel>
</rss>

