<?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 Ynt: Select structure by coordinate in Civil 3D Customization Forum</title>
    <link>https://forums.autodesk.com/t5/civil-3d-customization-forum/select-structure-by-coordinate/m-p/10281177#M6773</link>
    <description>&lt;P&gt;Good morning hosneyalaa, I didn’t understand how to explain how to do it?&lt;/P&gt;&lt;P&gt;I tried to make a lisp function with 4 arguments that would be to set up a start and end point and use (ssget "_F" '(ptstart ptend)) to get the entity, but when I call it with .NET I get the message "; error: bad point argument".&lt;/P&gt;</description>
    <pubDate>Fri, 30 Apr 2021 10:49:46 GMT</pubDate>
    <dc:creator>luiz.silvaNDFA2</dc:creator>
    <dc:date>2021-04-30T10:49:46Z</dc:date>
    <item>
      <title>Select structure by coordinate</title>
      <link>https://forums.autodesk.com/t5/civil-3d-customization-forum/select-structure-by-coordinate/m-p/10281011#M6771</link>
      <description>&lt;P&gt;Good Morning, first I'm sorry for English because I don't know how to speak. I am developing a routine in C # to build a network from data that is in .txt. The big problem is that I need to check if there is a structure before inserting a new one, if I have to pick it up. I've tried to use all forms of selection such as: SelectFence, electCrossingWindow ... and I can't get the structure that has already been launched. Does anybody know how to solve this?&lt;/P&gt;</description>
      <pubDate>Fri, 30 Apr 2021 09:24:00 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/civil-3d-customization-forum/select-structure-by-coordinate/m-p/10281011#M6771</guid>
      <dc:creator>luiz.silvaNDFA2</dc:creator>
      <dc:date>2021-04-30T09:24:00Z</dc:date>
    </item>
    <item>
      <title>Ynt: Select structure by coordinate</title>
      <link>https://forums.autodesk.com/t5/civil-3d-customization-forum/select-structure-by-coordinate/m-p/10281155#M6772</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Is this possible highlighting Each network operates in a loop&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Then confirm the names of the manholes&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="http://docs.autodesk.com/CIV3D/2016/ENU/API_Reference_Guide/?topic=html/dbed0efc-c3f0-5727-ad82-84d382dfed29.htm&amp;amp;_ga=2.259464264.373031988.1617334020-1550426060.1578165718" target="_blank"&gt;http://docs.autodesk.com/CIV3D/2016/ENU/API_Reference_Guide/?topic=html/dbed0efc-c3f0-5727-ad82-84d382dfed29.htm&amp;amp;_ga=2.259464264.373031988.1617334020-1550426060.1578165718&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 30 Apr 2021 10:37:26 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/civil-3d-customization-forum/select-structure-by-coordinate/m-p/10281155#M6772</guid>
      <dc:creator>hosneyalaa</dc:creator>
      <dc:date>2021-04-30T10:37:26Z</dc:date>
    </item>
    <item>
      <title>Ynt: Select structure by coordinate</title>
      <link>https://forums.autodesk.com/t5/civil-3d-customization-forum/select-structure-by-coordinate/m-p/10281177#M6773</link>
      <description>&lt;P&gt;Good morning hosneyalaa, I didn’t understand how to explain how to do it?&lt;/P&gt;&lt;P&gt;I tried to make a lisp function with 4 arguments that would be to set up a start and end point and use (ssget "_F" '(ptstart ptend)) to get the entity, but when I call it with .NET I get the message "; error: bad point argument".&lt;/P&gt;</description>
      <pubDate>Fri, 30 Apr 2021 10:49:46 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/civil-3d-customization-forum/select-structure-by-coordinate/m-p/10281177#M6773</guid>
      <dc:creator>luiz.silvaNDFA2</dc:creator>
      <dc:date>2021-04-30T10:49:46Z</dc:date>
    </item>
    <item>
      <title>Ynt: Select structure by coordinate</title>
      <link>https://forums.autodesk.com/t5/civil-3d-customization-forum/select-structure-by-coordinate/m-p/10281189#M6774</link>
      <description>&lt;P&gt;Using c# to check manhole&amp;nbsp;&lt;/P&gt;&lt;P&gt;From page&lt;/P&gt;&lt;P&gt;&lt;A href="http://docs.autodesk.com/CIV3D/2016/ENU/API_Reference_Guide/?topic=html/dbed0efc-c3f0-5727-ad82-84d382dfed29.htm&amp;amp;_ga=2.225768792.373031988.1617334020-1550426060.1578165718" target="_blank"&gt;http://docs.autodesk.com/CIV3D/2016/ENU/API_Reference_Guide/?topic=html/dbed0efc-c3f0-5727-ad82-84d382dfed29.htm&amp;amp;_ga=2.225768792.373031988.1617334020-1550426060.1578165718&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Lisp not working to building network pipe&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For better help&amp;nbsp;&lt;/P&gt;&lt;P&gt;Attached codes&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 30 Apr 2021 10:57:23 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/civil-3d-customization-forum/select-structure-by-coordinate/m-p/10281189#M6774</guid>
      <dc:creator>hosneyalaa</dc:creator>
      <dc:date>2021-04-30T10:57:23Z</dc:date>
    </item>
    <item>
      <title>Ynt: Select structure by coordinate</title>
      <link>https://forums.autodesk.com/t5/civil-3d-customization-forum/select-structure-by-coordinate/m-p/10281243#M6775</link>
      <description>&lt;P&gt;In fact the lisp function would be to check if you have a structure at the point and if you have to return that entity.&lt;/P&gt;&lt;P&gt;How would you send a snippet of code showing how to use this function that you informed?&lt;/P&gt;</description>
      <pubDate>Fri, 30 Apr 2021 11:23:25 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/civil-3d-customization-forum/select-structure-by-coordinate/m-p/10281243#M6775</guid>
      <dc:creator>luiz.silvaNDFA2</dc:creator>
      <dc:date>2021-04-30T11:23:25Z</dc:date>
    </item>
    <item>
      <title>Ynt: Select structure by coordinate</title>
      <link>https://forums.autodesk.com/t5/civil-3d-customization-forum/select-structure-by-coordinate/m-p/10281293#M6776</link>
      <description>&lt;P&gt;See this page can help you&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;///https://forums.autodesk.com/t5/civil-3d-customization/select-multiple-structures-by-name/td-p/7987765

 'db = Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.CurrentDocument.Database
        Public Function GetStructureSelectionByNames(networkId As ObjectId, names As List(Of String)) As ObjectIdCollection
            Dim ids As New ObjectIdCollection
            Using tr As Transaction = db.TransactionManager.StartTransaction
                Dim network As Network = tr.GetObject(networkId, OpenMode.ForRead)
                Dim structids As ObjectIdCollection = network.GetStructureIds()
                For Each id As ObjectId In structids
                    Dim struct As Autodesk.Civil.DatabaseServices.Structure = tr.GetObject(id, OpenMode.ForRead)
                    If names.Contains(struct.Name) Then
                        ids.Add(id)
                    End If
                Next
                tr.Commit()
            End Using
            Return ids
        End Function&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 30 Apr 2021 11:44:11 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/civil-3d-customization-forum/select-structure-by-coordinate/m-p/10281293#M6776</guid>
      <dc:creator>hosneyalaa</dc:creator>
      <dc:date>2021-04-30T11:44:11Z</dc:date>
    </item>
    <item>
      <title>Ynt: Select structure by coordinate</title>
      <link>https://forums.autodesk.com/t5/civil-3d-customization-forum/select-structure-by-coordinate/m-p/10281307#M6777</link>
      <description>&lt;LI-CODE lang="general"&gt;http://docs.autodesk.com/CIV3D/2016/ENU/API_Reference_Guide/?topic=html/dbed0efc-c3f0-5727-ad82-84d382dfed29.htm&amp;amp;_ga=2.264522319.1168093511.1619474711-1722462025.1618516829&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="12.PNG" style="width: 931px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/913720i7E08DEFFE6057FD3/image-size/large?v=v2&amp;amp;px=999" role="button" title="12.PNG" alt="12.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 30 Apr 2021 11:48:08 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/civil-3d-customization-forum/select-structure-by-coordinate/m-p/10281307#M6777</guid>
      <dc:creator>hosneyalaa</dc:creator>
      <dc:date>2021-04-30T11:48:08Z</dc:date>
    </item>
    <item>
      <title>Ynt: Select structure by coordinate</title>
      <link>https://forums.autodesk.com/t5/civil-3d-customization-forum/select-structure-by-coordinate/m-p/10281336#M6778</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;//https://spiderinnet1.typepad.com/blog/2012/09/autocad-net-editorselectfence-pointcollector.html

[CommandMethod("FenceSelectionAndPointCollector", CommandFlags.Modal)]
public static void FenceSelectionAndPointCollector_Method()
{
    Editor ed = MgdAcApplication.DocumentManager.MdiActiveDocument.Editor;
    try
    {
        using (PointCollector pc = new PointCollector(PointCollector.Shape.Fence))
        {
            Point3dCollection points = pc.Collect();
            PromptSelectionResult prSelRes = ed.SelectFence(points);
            if (prSelRes.Status == PromptStatus.OK)
            {
                using (SelectionSet ss = prSelRes.Value)
                {
                    if (ss != null)
                        ed.WriteMessage("\nThe SS is good and has {0} entities.", ss.Count);
                    else
                        ed.WriteMessage("\nThe SS is bad!");
                }
            }
            else
                ed.WriteMessage("\nFence selection failed!");
        }
    }
    catch (System.Exception ex)
    {
        ed.WriteMessage(Environment.NewLine + ex.ToString());
    }
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;//http://docs.autodesk.com/ACD/2010/ENU/AutoCAD%20.NET%20Developer's%20Guide/index.html?url=WS1a9193826455f5ff-3859b43c1209703a838778b.htm,topicNumber=d0e17554&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 30 Apr 2021 11:59:21 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/civil-3d-customization-forum/select-structure-by-coordinate/m-p/10281336#M6778</guid>
      <dc:creator>hosneyalaa</dc:creator>
      <dc:date>2021-04-30T11:59:21Z</dc:date>
    </item>
    <item>
      <title>Ynt: Select structure by coordinate</title>
      <link>https://forums.autodesk.com/t5/civil-3d-customization-forum/select-structure-by-coordinate/m-p/10281424#M6779</link>
      <description>&lt;P&gt;I already tried the solution "&lt;A href="https://spiderinnet1.typepad.com/blog/2012/09/autocad-net-editorselectfence-pointcollector.html" target="_blank"&gt;https://spiderinnet1.typepad.com/blog/2012/09/autocad-net-editorselectfence-pointcollector.html&lt;/A&gt;" but for some reason I don't know he doesn't select the element of Civil only cad entity , for me it would be the best solution since I don't need a lot of interaction and the intention is to create 150km of network. I will try the solution "&lt;A href="https://forums.autodesk.com/t5/civil-3d-customization/select-multiple-structures-by-name/td-p/7987765" target="_blank"&gt;https://forums.autodesk.com/t5/civil-3d-customization/select-multiple-structures-by-name/td-p/7987765&lt;/A&gt;" and give feedback if it worked.&lt;/P&gt;</description>
      <pubDate>Fri, 30 Apr 2021 12:28:11 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/civil-3d-customization-forum/select-structure-by-coordinate/m-p/10281424#M6779</guid>
      <dc:creator>luiz.silvaNDFA2</dc:creator>
      <dc:date>2021-04-30T12:28:11Z</dc:date>
    </item>
    <item>
      <title>Ynt: Select structure by coordinate</title>
      <link>https://forums.autodesk.com/t5/civil-3d-customization-forum/select-structure-by-coordinate/m-p/10281889#M6780</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/9208202"&gt;@luiz.silvaNDFA2&lt;/a&gt;&amp;nbsp;as&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/6591997"&gt;@hosneyalaa&lt;/a&gt;&amp;nbsp;has been describing, do not try to use a selection (I'm not sure why it's not working, but it is inefficient anyway). Instead, get all of the existing structures and check against those. I suggest not mixing lisp and c# code, do everything in c#.&lt;/P&gt;
&lt;P&gt;I would create a list of Point2d, loop through the existing structures and add the 2d location to that list. Then when creating structures from the Excel file, see if the list contains the location of the structure to insert, if so, skip that point. I would actually have a small function that checks if the 2 points are the same within a specified tolerance, say 0.5 feet. When you add a structure, be sure to add it's location to the Point2d list.&lt;/P&gt;</description>
      <pubDate>Fri, 30 Apr 2021 15:16:01 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/civil-3d-customization-forum/select-structure-by-coordinate/m-p/10281889#M6780</guid>
      <dc:creator>Jeff_M</dc:creator>
      <dc:date>2021-04-30T15:16:01Z</dc:date>
    </item>
    <item>
      <title>Re: Select structure by coordinate</title>
      <link>https://forums.autodesk.com/t5/civil-3d-customization-forum/select-structure-by-coordinate/m-p/10282692#M6781</link>
      <description>&lt;P&gt;hosneyalaa and Jeff thanks for the help, the function worked perfectly. Thank you very much.&lt;/P&gt;</description>
      <pubDate>Fri, 30 Apr 2021 20:25:38 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/civil-3d-customization-forum/select-structure-by-coordinate/m-p/10282692#M6781</guid>
      <dc:creator>luiz.silvaNDFA2</dc:creator>
      <dc:date>2021-04-30T20:25:38Z</dc:date>
    </item>
  </channel>
</rss>

