<?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: Explode and Select Window in C# in Civil 3D Customization Forum</title>
    <link>https://forums.autodesk.com/t5/civil-3d-customization-forum/explode-and-select-window-in-c/m-p/11392451#M4979</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/32637"&gt;@Jeff_M&lt;/a&gt; and&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/6591997"&gt;@hosneyalaa&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Good day.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I attached the DWG File as reference.&amp;nbsp;&lt;/P&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="alexisgacia_0-1661935635259.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1110110i2AC4044A76A27EE7/image-size/medium?v=v2&amp;amp;px=400" role="button" title="alexisgacia_0-1661935635259.png" alt="alexisgacia_0-1661935635259.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;User Steps:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Select BlockReference as BlockSheet&lt;/P&gt;&lt;P&gt;Select Target Entities (&lt;EM&gt;Circle, Line, Polyline, SPLine&lt;/EM&gt;)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Desired Output:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Circle (Cyan): 053, 054, 060 &amp;amp; 061&lt;/P&gt;&lt;P&gt;Line(Green): 067&lt;/P&gt;&lt;P&gt;SPLine(Yellow): 056, 057, 061, 062 &amp;amp; 063&lt;/P&gt;&lt;P&gt;Polyline(White): 069, 070, 072, 073 &amp;amp; 074&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Block &amp;lt;BlockSheet&amp;gt;:&amp;nbsp;&lt;/STRONG&gt;Contains Polyline and Text&lt;/P&gt;&lt;P&gt;Polyline ("A-TITL-TXT2" &amp;amp; "&lt;STRONG&gt;Z_DWG_SHT&lt;/STRONG&gt;")&lt;/P&gt;&lt;P&gt;TEST ("&lt;STRONG&gt;Z_DWG_SHT_NO")&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;My idea on the process:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Explode the BlockSheet to SheetCollection&lt;/P&gt;&lt;P&gt;Remove any objects except objects having layer ("&lt;STRONG&gt;Z_DWG_SHT&lt;/STRONG&gt;" &amp;amp;&amp;nbsp;"&lt;STRONG&gt;Z_DWG_SHT_NO"&lt;/STRONG&gt;)&lt;/P&gt;&lt;P&gt;Loop through to Selected Entities&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;(SelectCrossing&lt;/STRONG&gt;&amp;nbsp;or Alternative function) using boundingbox of the entity as &lt;STRONG&gt;Crv1&lt;/STRONG&gt; to identify the objects in&amp;nbsp;SheetCollection.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;(SelectCrossing&lt;/STRONG&gt;&amp;nbsp;or Alternative function) Using the boundary of the entity as &lt;STRONG&gt;Sheet&lt;/STRONG&gt; having layer "&lt;STRONG&gt;Z_DWG_SHT"&lt;/STRONG&gt; from the sheetCollection to check if &lt;STRONG&gt;Crv1&lt;/STRONG&gt;&amp;nbsp;exist in the selection&lt;/P&gt;&lt;P&gt;Once &lt;STRONG&gt;Crv1&lt;/STRONG&gt; exist grab the Text with layer "&lt;STRONG&gt;Z_DWG_SHT_NO"&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Currently I don't have an alternative function that can SelectCrossing in the Collection.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Below is the sample code that I did&lt;/P&gt;&lt;LI-CODE lang="general"&gt;private void _SelectObjectsFromExploded(object sender, EventArgs e)
        {
            Autodesk.Civil.ApplicationServices.CivilDocument civilDoc = Autodesk.Civil.ApplicationServices.CivilApplication.ActiveDocument;
            var doc = Application.DocumentManager.MdiActiveDocument;
            var db = doc.Database;
            var ed = doc.Editor;
            listBox1.Items.Clear();
            string mSheetBlockName = "SheetBlock";
            string mSheetLayerName = "Z_DWG_SHT";
            string mLabelLayerLName = "Z_DWG_SHT_NO";

            cSelection mSel = new cSelection();
            ObjectId mSheetBlockId = mSel.Select_SingeEntity("Select Sheet Block");

            // Set up our selection to only select 2D solids
            var pso = new PromptSelectionOptions();
            pso.MessageForAdding = "\nSelect Curve";

            //var sf = new SelectionFilter(new TypedValue[] { new TypedValue((int)DxfCode.Start, "3DSOLID") });

            //var psr = ed.GetSelection(pso, sf);
            var psr = ed.GetSelection(pso);

            if (psr.Status != PromptStatus.OK) return;
            using (doc.LockDocument())
            {
                DBObjectCollection mSheets = new DBObjectCollection();
                DBObjectCollection mValidSheets = new DBObjectCollection();
                BlockReference oSheet = null;

                doc.TransactionManager.EnableGraphicsFlush(true);
                using (Transaction tr = doc.TransactionManager.StartTransaction())
                {
                    var oBlk = tr.GetObject(mSheetBlockId, OpenMode.ForWrite);

                    if (oBlk is BlockReference)
                    {
                        oSheet = oBlk as BlockReference;
                        if (oSheet.Name.ToUpper() != mSheetBlockName.ToUpper())
                        {
                            ed.WriteMessage("\nSelected block is not recognize as Block Sheet.");
                            return;
                        }


                        // Create Temp Sheets
                        oSheet.Explode(mSheets);
                        mValidSheets = GetValidSheets(tr, mSheets);

                    }
                    tr.Commit();
                }
                using (Transaction tr = doc.TransactionManager.StartTransaction())
                {
                    if(oSheet != null) 
                    { 
                        foreach (ObjectId oID in psr.Value.GetObjectIds())
                        {
                            var o = tr.GetObject(oID, OpenMode.ForRead);

                            if (o is Curve)
                            { 
                                Curve mCurve = o as Curve;

                                CreateLine(tr, mCurve.GeometricExtents.MinPoint, mCurve.GeometricExtents.MaxPoint);

                                string mSheetCnt = GetSheetNumber(mValidSheets, mCurve);
                                listBox1.Items.Add(mSheetCnt);
                            }
                        }

                        // Clear Temporary Sheets
                        foreach (Entity ent in mValidSheets) 
                        {
                            Entity ForDel = tr.GetObject(ent.ObjectId, OpenMode.ForWrite) as Entity;
                            ForDel.Erase(); 
                        }
                    }
                    else
                    {
                        ed.WriteMessage("\nInvalid Block Selected.");
                    }

                    tr.Commit();
                }
            }


        }
 
        DBObjectCollection GetValidSheets(Transaction tr, DBObjectCollection mSheets, string LayerSheet="Z_DWG_SHT", string LayerSheetNo= "Z_DWG_SHT_NO")
        {
            BlockTable acBlkTbl = tr.GetObject(Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument.Database.BlockTableId, OpenMode.ForRead) as BlockTable;
            BlockTableRecord acBlkTblRec = tr.GetObject(acBlkTbl[BlockTableRecord.ModelSpace], OpenMode.ForWrite) as BlockTableRecord;
            DBObjectCollection mValidSheets = new DBObjectCollection();
            foreach (Entity oEnt in mSheets) 
            {
                if (oEnt.Layer == LayerSheet || oEnt.Layer == LayerSheetNo)
                {
                    mValidSheets.Add(oEnt);

                    acBlkTblRec.AppendEntity(oEnt);
                    tr.AddNewlyCreatedDBObject(oEnt, true);
                }
            }
            return mValidSheets;
        }
                 string GetSheetNumber(DBObjectCollection mSheets, Curve mCurve, string LayerSheet = "Z_DWG_SHT", string LayerSheetNo = "Z_DWG_SHT_NO")
        {
            dynamic acadApp = Application.AcadApplication;

            var doc = Application.DocumentManager.MdiActiveDocument;
            var db = doc.Database;
            var ed = doc.Editor;
            string mSheetCnt = "";
             
            PromptSelectionResult mRes = ed.SelectCrossingWindow(mCurve.GeometricExtents.MaxPoint, mCurve.GeometricExtents.MinPoint);
             

            using (SelectionSet ss = mRes.Value)
            {
                if (ss is null) return "No Selection";
                foreach (ObjectId oId in ss.GetObjectIds())
                {
                    Entity obj = oId.GetObject(OpenMode.ForRead) as Entity;
                    //if (mSheets.Contains(obj))
                    //System.Diagnostics.Debug.Print(obj.GetType().Name + " - " + obj.Layer);
                    listBox1.Items.Add(" - " + obj.GetType().Name + " - " + obj.Layer);
                    if(CollectionHas(mSheets, obj))
                    {
                        if (obj.Layer == LayerSheet)    // Sheet Box
                        {
                            // Select using box
                            PromptSelectionResult mBoxSelect = ed.SelectCrossingWindow(obj.GeometricExtents.MaxPoint, obj.GeometricExtents.MinPoint);

                            bool HasCurveId = false;
                            bool HasSheetCnt = false;
                            Entity oSheetCnt = null;
                            foreach (ObjectId oInBoxId  in mBoxSelect.Value.GetObjectIds())
                            {
                                if (mCurve.ObjectId == oInBoxId) HasCurveId = true;

                                Entity oBoxObj = oInBoxId.GetObject(OpenMode.ForRead) as Entity;

                                if(oBoxObj.Layer == LayerSheetNo)
                                {
                                    HasSheetCnt = true;
                                    oSheetCnt = oBoxObj;
                                }

                            }

                            // If curve and sheetcnt exist add the sheet number
                            if (HasSheetCnt &amp;amp;&amp;amp; HasCurveId) 
                            {
                                if (oSheetCnt is DBText) mSheetCnt = mSheetCnt +", " + ((DBText)oSheetCnt).TextString;
                                if (oSheetCnt is MText) mSheetCnt = mSheetCnt + ", " + ((MText)oSheetCnt).Text;
                            }
                        }

                    }
                } 
            }

            return mSheetCnt;
        }&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 31 Aug 2022 09:16:41 GMT</pubDate>
    <dc:creator>alexisgacia</dc:creator>
    <dc:date>2022-08-31T09:16:41Z</dc:date>
    <item>
      <title>Explode and Select Window in C#</title>
      <link>https://forums.autodesk.com/t5/civil-3d-customization-forum/explode-and-select-window-in-c/m-p/11388285#M4970</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is it possible to select exploded objects using the select window?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying to explode and select certain area base on the selected objects. Then those selected object will be save and the rest will be ignored.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;</description>
      <pubDate>Mon, 29 Aug 2022 16:41:57 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/civil-3d-customization-forum/explode-and-select-window-in-c/m-p/11388285#M4970</guid>
      <dc:creator>alexisgacia</dc:creator>
      <dc:date>2022-08-29T16:41:57Z</dc:date>
    </item>
    <item>
      <title>Re: Explode and Select Window in C#</title>
      <link>https://forums.autodesk.com/t5/civil-3d-customization-forum/explode-and-select-window-in-c/m-p/11388354#M4971</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;/P&gt;&lt;P&gt;Anther way ,&amp;nbsp;&amp;nbsp;&lt;SPAN&gt;Example of Explode Region&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;var region = (Region)tr.GetObject(id, OpenMode.ForWrite, false, true);&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var objects = new DBObjectCollection();&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; region.Explode(objects);&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; foreach (Entity ent in objects)&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/P&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;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 29 Aug 2022 17:18:27 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/civil-3d-customization-forum/explode-and-select-window-in-c/m-p/11388354#M4971</guid>
      <dc:creator>hosneyalaa</dc:creator>
      <dc:date>2022-08-29T17:18:27Z</dc:date>
    </item>
    <item>
      <title>Re: Explode and Select Window in C#</title>
      <link>https://forums.autodesk.com/t5/civil-3d-customization-forum/explode-and-select-window-in-c/m-p/11389451#M4972</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/6591997"&gt;@hosneyalaa&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for the reply.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What I mean is like this.&lt;/P&gt;&lt;LI-CODE lang="general"&gt;var region = (Region)tr.GetObject(id, OpenMode.ForWrite, false, true);
var objects = new DBObjectCollection();
region.Explode(objects);

// Here I will select base window mPt1 and mPt2. I tried this but it didnt get the objects from the exploded

PromptSelectionResult mBoxSelect = ed.SelectWindow(mPt1, mPt2);

foreach (ObjectId oInBoxId  in mBoxSelect.Value.GetObjectIds())
{                            
  ..
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 30 Aug 2022 05:24:39 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/civil-3d-customization-forum/explode-and-select-window-in-c/m-p/11389451#M4972</guid>
      <dc:creator>alexisgacia</dc:creator>
      <dc:date>2022-08-30T05:24:39Z</dc:date>
    </item>
    <item>
      <title>Re: Explode and Select Window in C#</title>
      <link>https://forums.autodesk.com/t5/civil-3d-customization-forum/explode-and-select-window-in-c/m-p/11389703#M4973</link>
      <description>&lt;P&gt;hi &lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/6321778"&gt;@alexisgacia&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;my language is not good&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you share an Autocad drawing?&lt;BR /&gt;Explain if you want to reach&lt;/P&gt;</description>
      <pubDate>Tue, 30 Aug 2022 07:43:56 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/civil-3d-customization-forum/explode-and-select-window-in-c/m-p/11389703#M4973</guid>
      <dc:creator>hosneyalaa</dc:creator>
      <dc:date>2022-08-30T07:43:56Z</dc:date>
    </item>
    <item>
      <title>Re: Explode and Select Window in C#</title>
      <link>https://forums.autodesk.com/t5/civil-3d-customization-forum/explode-and-select-window-in-c/m-p/11389909#M4974</link>
      <description>&lt;P&gt;I'm trying to identify the label inside the sheet. Using the boundary of the line, I will able to select the object and Identify the label that I marked. In this case (063, 064, 067, 068, 069)&lt;/P&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="alexisgacia_1-1661850603719.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1109642i1645B73DB93E80D2/image-size/medium?v=v2&amp;amp;px=400" role="button" title="alexisgacia_1-1661850603719.png" alt="alexisgacia_1-1661850603719.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 30 Aug 2022 09:11:44 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/civil-3d-customization-forum/explode-and-select-window-in-c/m-p/11389909#M4974</guid>
      <dc:creator>alexisgacia</dc:creator>
      <dc:date>2022-08-30T09:11:44Z</dc:date>
    </item>
    <item>
      <title>Re: Explode and Select Window in C#</title>
      <link>https://forums.autodesk.com/t5/civil-3d-customization-forum/explode-and-select-window-in-c/m-p/11390078#M4975</link>
      <description>&lt;P&gt;hi &lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/6321778"&gt;@alexisgacia&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;reading code&amp;nbsp; from gile&lt;/P&gt;&lt;P&gt;you have to add reference to acdbmgdbrep.dll and Import Autodesk.AutoCAD.BoundaryRepresentation namespace&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;  https://forums.autodesk.com/t5/net/spatial-query-in-autocad-2010/m-p/5304535/highlight/true#M42041

 [CommandMethod("TEST")]
        public void Test()
        {
            Document doc = Application.DocumentManager.MdiActiveDocument;
            Database db = doc.Database;
            Editor ed = doc.Editor;

            PromptEntityOptions peo = new PromptEntityOptions("\nSelect a polyline: ");
            peo.SetRejectMessage("Only a polyline !");
            peo.AddAllowedClass(typeof(Polyline), true);
            PromptEntityResult per = ed.GetEntity(peo);
            if (per.Status != PromptStatus.OK)
                return;

            using (Transaction tr = db.TransactionManager.StartOpenCloseTransaction())
            {
                Polyline pline = (Polyline)tr.GetObject(per.ObjectId, OpenMode.ForRead);
                if (!pline.Closed)
                {
                    ed.WriteMessage("\nPolyline must be closed.");
                    return;
                }
                DBObjectCollection curves = new DBObjectCollection();
                curves.Add(pline);
                try
                {
                    using (DBObjectCollection regions = Region.CreateFromCurves(curves))
                    using (Region region = (Region)regions[0])
                    {
                        PromptPointOptions ppo = new PromptPointOptions("\nPick a point &amp;lt;quit&amp;gt;: ");
                        ppo.AllowNone = true;
                        while (true)
                        {
                            PromptPointResult ppr = ed.GetPoint(ppo);
                            if (ppr.Status != PromptStatus.OK)
                                break;
                            Application.ShowAlertDialog(
                                GetPointContainment(region, ppr.Value).ToString());
                        }
                    }
                }
                catch (System.Exception exn)
                {
                    ed.WriteMessage("\nError: " + exn.Message);
                }
            }
        }

        private PointContainment GetPointContainment(Region region, Point3d point)
        {
            PointContainment result = PointContainment.Outside;
            using (Brep brep = new Brep(region))
            {
                if (brep != null)
                {
                    using (BrepEntity ent = brep.GetPointContainment(point, out result))
                    {
                        if (ent is Autodesk.AutoCAD.BoundaryRepresentation.Face)
                        {
                            result = PointContainment.Inside;
                        }
                    }
                }
            }
            return result;
        }&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 30 Aug 2022 10:33:52 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/civil-3d-customization-forum/explode-and-select-window-in-c/m-p/11390078#M4975</guid>
      <dc:creator>hosneyalaa</dc:creator>
      <dc:date>2022-08-30T10:33:52Z</dc:date>
    </item>
    <item>
      <title>Re: Explode and Select Window in C#</title>
      <link>https://forums.autodesk.com/t5/civil-3d-customization-forum/explode-and-select-window-in-c/m-p/11390098#M4976</link>
      <description>&lt;P&gt;OR&amp;nbsp; can you using&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;                    TypedValue[] tvs = new TypedValue[]

                        {new TypedValue(0, "text")

                              };

                    SelectionFilter filter = new SelectionFilter(tvs);

                    PromptSelectionResult result = ed.SelectCrossingWindow(p1, p2, filter);

                    if (result.Status != PromptStatus.OK) return;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&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="Screenshot 2022-08-29 101349.png" style="width: 460px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1109677iBD948DC216DAA7DA/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot 2022-08-29 101349.png" alt="Screenshot 2022-08-29 101349.png" /&gt;&lt;/span&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 30 Aug 2022 10:41:32 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/civil-3d-customization-forum/explode-and-select-window-in-c/m-p/11390098#M4976</guid>
      <dc:creator>hosneyalaa</dc:creator>
      <dc:date>2022-08-30T10:41:32Z</dc:date>
    </item>
    <item>
      <title>Re: Explode and Select Window in C#</title>
      <link>https://forums.autodesk.com/t5/civil-3d-customization-forum/explode-and-select-window-in-c/m-p/11390708#M4977</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/6321778"&gt;@alexisgacia&lt;/a&gt;&amp;nbsp;The Explode method does not add the objects to the database so selection won't find anything. If you post a small dwg along with the code you are using to the select the region(s) we could probably get this sorted out for you.&lt;/P&gt;</description>
      <pubDate>Tue, 30 Aug 2022 14:39:11 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/civil-3d-customization-forum/explode-and-select-window-in-c/m-p/11390708#M4977</guid>
      <dc:creator>Jeff_M</dc:creator>
      <dc:date>2022-08-30T14:39:11Z</dc:date>
    </item>
    <item>
      <title>Re: Explode and Select Window in C#</title>
      <link>https://forums.autodesk.com/t5/civil-3d-customization-forum/explode-and-select-window-in-c/m-p/11391222#M4978</link>
      <description>&lt;P&gt;Anther way to check&amp;nbsp; inside closed polyline&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://forums.autodesk.com/t5/net/selecte-close-polylines-and-texts-inside/m-p/10829707" target="_blank"&gt;https://forums.autodesk.com/t5/net/selecte-close-polylines-and-texts-inside/m-p/10829707&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 30 Aug 2022 18:54:56 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/civil-3d-customization-forum/explode-and-select-window-in-c/m-p/11391222#M4978</guid>
      <dc:creator>hosneyalaa</dc:creator>
      <dc:date>2022-08-30T18:54:56Z</dc:date>
    </item>
    <item>
      <title>Re: Explode and Select Window in C#</title>
      <link>https://forums.autodesk.com/t5/civil-3d-customization-forum/explode-and-select-window-in-c/m-p/11392451#M4979</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/32637"&gt;@Jeff_M&lt;/a&gt; and&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/6591997"&gt;@hosneyalaa&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Good day.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I attached the DWG File as reference.&amp;nbsp;&lt;/P&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="alexisgacia_0-1661935635259.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1110110i2AC4044A76A27EE7/image-size/medium?v=v2&amp;amp;px=400" role="button" title="alexisgacia_0-1661935635259.png" alt="alexisgacia_0-1661935635259.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;User Steps:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Select BlockReference as BlockSheet&lt;/P&gt;&lt;P&gt;Select Target Entities (&lt;EM&gt;Circle, Line, Polyline, SPLine&lt;/EM&gt;)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Desired Output:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Circle (Cyan): 053, 054, 060 &amp;amp; 061&lt;/P&gt;&lt;P&gt;Line(Green): 067&lt;/P&gt;&lt;P&gt;SPLine(Yellow): 056, 057, 061, 062 &amp;amp; 063&lt;/P&gt;&lt;P&gt;Polyline(White): 069, 070, 072, 073 &amp;amp; 074&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Block &amp;lt;BlockSheet&amp;gt;:&amp;nbsp;&lt;/STRONG&gt;Contains Polyline and Text&lt;/P&gt;&lt;P&gt;Polyline ("A-TITL-TXT2" &amp;amp; "&lt;STRONG&gt;Z_DWG_SHT&lt;/STRONG&gt;")&lt;/P&gt;&lt;P&gt;TEST ("&lt;STRONG&gt;Z_DWG_SHT_NO")&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;My idea on the process:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Explode the BlockSheet to SheetCollection&lt;/P&gt;&lt;P&gt;Remove any objects except objects having layer ("&lt;STRONG&gt;Z_DWG_SHT&lt;/STRONG&gt;" &amp;amp;&amp;nbsp;"&lt;STRONG&gt;Z_DWG_SHT_NO"&lt;/STRONG&gt;)&lt;/P&gt;&lt;P&gt;Loop through to Selected Entities&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;(SelectCrossing&lt;/STRONG&gt;&amp;nbsp;or Alternative function) using boundingbox of the entity as &lt;STRONG&gt;Crv1&lt;/STRONG&gt; to identify the objects in&amp;nbsp;SheetCollection.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;(SelectCrossing&lt;/STRONG&gt;&amp;nbsp;or Alternative function) Using the boundary of the entity as &lt;STRONG&gt;Sheet&lt;/STRONG&gt; having layer "&lt;STRONG&gt;Z_DWG_SHT"&lt;/STRONG&gt; from the sheetCollection to check if &lt;STRONG&gt;Crv1&lt;/STRONG&gt;&amp;nbsp;exist in the selection&lt;/P&gt;&lt;P&gt;Once &lt;STRONG&gt;Crv1&lt;/STRONG&gt; exist grab the Text with layer "&lt;STRONG&gt;Z_DWG_SHT_NO"&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Currently I don't have an alternative function that can SelectCrossing in the Collection.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Below is the sample code that I did&lt;/P&gt;&lt;LI-CODE lang="general"&gt;private void _SelectObjectsFromExploded(object sender, EventArgs e)
        {
            Autodesk.Civil.ApplicationServices.CivilDocument civilDoc = Autodesk.Civil.ApplicationServices.CivilApplication.ActiveDocument;
            var doc = Application.DocumentManager.MdiActiveDocument;
            var db = doc.Database;
            var ed = doc.Editor;
            listBox1.Items.Clear();
            string mSheetBlockName = "SheetBlock";
            string mSheetLayerName = "Z_DWG_SHT";
            string mLabelLayerLName = "Z_DWG_SHT_NO";

            cSelection mSel = new cSelection();
            ObjectId mSheetBlockId = mSel.Select_SingeEntity("Select Sheet Block");

            // Set up our selection to only select 2D solids
            var pso = new PromptSelectionOptions();
            pso.MessageForAdding = "\nSelect Curve";

            //var sf = new SelectionFilter(new TypedValue[] { new TypedValue((int)DxfCode.Start, "3DSOLID") });

            //var psr = ed.GetSelection(pso, sf);
            var psr = ed.GetSelection(pso);

            if (psr.Status != PromptStatus.OK) return;
            using (doc.LockDocument())
            {
                DBObjectCollection mSheets = new DBObjectCollection();
                DBObjectCollection mValidSheets = new DBObjectCollection();
                BlockReference oSheet = null;

                doc.TransactionManager.EnableGraphicsFlush(true);
                using (Transaction tr = doc.TransactionManager.StartTransaction())
                {
                    var oBlk = tr.GetObject(mSheetBlockId, OpenMode.ForWrite);

                    if (oBlk is BlockReference)
                    {
                        oSheet = oBlk as BlockReference;
                        if (oSheet.Name.ToUpper() != mSheetBlockName.ToUpper())
                        {
                            ed.WriteMessage("\nSelected block is not recognize as Block Sheet.");
                            return;
                        }


                        // Create Temp Sheets
                        oSheet.Explode(mSheets);
                        mValidSheets = GetValidSheets(tr, mSheets);

                    }
                    tr.Commit();
                }
                using (Transaction tr = doc.TransactionManager.StartTransaction())
                {
                    if(oSheet != null) 
                    { 
                        foreach (ObjectId oID in psr.Value.GetObjectIds())
                        {
                            var o = tr.GetObject(oID, OpenMode.ForRead);

                            if (o is Curve)
                            { 
                                Curve mCurve = o as Curve;

                                CreateLine(tr, mCurve.GeometricExtents.MinPoint, mCurve.GeometricExtents.MaxPoint);

                                string mSheetCnt = GetSheetNumber(mValidSheets, mCurve);
                                listBox1.Items.Add(mSheetCnt);
                            }
                        }

                        // Clear Temporary Sheets
                        foreach (Entity ent in mValidSheets) 
                        {
                            Entity ForDel = tr.GetObject(ent.ObjectId, OpenMode.ForWrite) as Entity;
                            ForDel.Erase(); 
                        }
                    }
                    else
                    {
                        ed.WriteMessage("\nInvalid Block Selected.");
                    }

                    tr.Commit();
                }
            }


        }
 
        DBObjectCollection GetValidSheets(Transaction tr, DBObjectCollection mSheets, string LayerSheet="Z_DWG_SHT", string LayerSheetNo= "Z_DWG_SHT_NO")
        {
            BlockTable acBlkTbl = tr.GetObject(Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument.Database.BlockTableId, OpenMode.ForRead) as BlockTable;
            BlockTableRecord acBlkTblRec = tr.GetObject(acBlkTbl[BlockTableRecord.ModelSpace], OpenMode.ForWrite) as BlockTableRecord;
            DBObjectCollection mValidSheets = new DBObjectCollection();
            foreach (Entity oEnt in mSheets) 
            {
                if (oEnt.Layer == LayerSheet || oEnt.Layer == LayerSheetNo)
                {
                    mValidSheets.Add(oEnt);

                    acBlkTblRec.AppendEntity(oEnt);
                    tr.AddNewlyCreatedDBObject(oEnt, true);
                }
            }
            return mValidSheets;
        }
                 string GetSheetNumber(DBObjectCollection mSheets, Curve mCurve, string LayerSheet = "Z_DWG_SHT", string LayerSheetNo = "Z_DWG_SHT_NO")
        {
            dynamic acadApp = Application.AcadApplication;

            var doc = Application.DocumentManager.MdiActiveDocument;
            var db = doc.Database;
            var ed = doc.Editor;
            string mSheetCnt = "";
             
            PromptSelectionResult mRes = ed.SelectCrossingWindow(mCurve.GeometricExtents.MaxPoint, mCurve.GeometricExtents.MinPoint);
             

            using (SelectionSet ss = mRes.Value)
            {
                if (ss is null) return "No Selection";
                foreach (ObjectId oId in ss.GetObjectIds())
                {
                    Entity obj = oId.GetObject(OpenMode.ForRead) as Entity;
                    //if (mSheets.Contains(obj))
                    //System.Diagnostics.Debug.Print(obj.GetType().Name + " - " + obj.Layer);
                    listBox1.Items.Add(" - " + obj.GetType().Name + " - " + obj.Layer);
                    if(CollectionHas(mSheets, obj))
                    {
                        if (obj.Layer == LayerSheet)    // Sheet Box
                        {
                            // Select using box
                            PromptSelectionResult mBoxSelect = ed.SelectCrossingWindow(obj.GeometricExtents.MaxPoint, obj.GeometricExtents.MinPoint);

                            bool HasCurveId = false;
                            bool HasSheetCnt = false;
                            Entity oSheetCnt = null;
                            foreach (ObjectId oInBoxId  in mBoxSelect.Value.GetObjectIds())
                            {
                                if (mCurve.ObjectId == oInBoxId) HasCurveId = true;

                                Entity oBoxObj = oInBoxId.GetObject(OpenMode.ForRead) as Entity;

                                if(oBoxObj.Layer == LayerSheetNo)
                                {
                                    HasSheetCnt = true;
                                    oSheetCnt = oBoxObj;
                                }

                            }

                            // If curve and sheetcnt exist add the sheet number
                            if (HasSheetCnt &amp;amp;&amp;amp; HasCurveId) 
                            {
                                if (oSheetCnt is DBText) mSheetCnt = mSheetCnt +", " + ((DBText)oSheetCnt).TextString;
                                if (oSheetCnt is MText) mSheetCnt = mSheetCnt + ", " + ((MText)oSheetCnt).Text;
                            }
                        }

                    }
                } 
            }

            return mSheetCnt;
        }&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 31 Aug 2022 09:16:41 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/civil-3d-customization-forum/explode-and-select-window-in-c/m-p/11392451#M4979</guid>
      <dc:creator>alexisgacia</dc:creator>
      <dc:date>2022-08-31T09:16:41Z</dc:date>
    </item>
    <item>
      <title>Re: Explode and Select Window in C#</title>
      <link>https://forums.autodesk.com/t5/civil-3d-customization-forum/explode-and-select-window-in-c/m-p/11394474#M4980</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I changed my code with the new one below.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What I did here is to detect the intersection between &lt;STRONG&gt;Curve&lt;/STRONG&gt; and the &lt;STRONG&gt;Sheet,&amp;nbsp;&lt;/STRONG&gt;If not check again if Curve.Startpoint is in the Sheet.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;private void _SelectObjectsFromExploded(object sender, EventArgs e)
        {
            Autodesk.Civil.ApplicationServices.CivilDocument civilDoc = Autodesk.Civil.ApplicationServices.CivilApplication.ActiveDocument;
            var doc = Application.DocumentManager.MdiActiveDocument;
            var db = doc.Database;
            var ed = doc.Editor;
            listBox1.Items.Clear();
            string mSheetBlockName = "SheetBlock";
            string mSheetLayerName = "Z_DWG_SHT";
            string mLabelLayerLName = "Z_DWG_SHT_NO";

            cSelection mSel = new cSelection();
            ObjectId mSheetBlockId = mSel.Select_SingeEntity("Select Sheet Block");

            // Set up our selection to only select 2D solids
            var pso = new PromptSelectionOptions();
            pso.MessageForAdding = "\nSelect Curve";

            //var sf = new SelectionFilter(new TypedValue[] { new TypedValue((int)DxfCode.Start, "3DSOLID") });

            //var psr = ed.GetSelection(pso, sf);
            var psr = ed.GetSelection(pso);

            if (psr.Status != PromptStatus.OK) return;
            using (doc.LockDocument())
            {
                DBObjectCollection mSheets = new DBObjectCollection();
                DBObjectCollection mValidSheets = new DBObjectCollection();
                BlockReference oSheet = null;

                doc.TransactionManager.EnableGraphicsFlush(true);
                using (Transaction tr = doc.TransactionManager.StartTransaction())
                {
                    var oBlk = tr.GetObject(mSheetBlockId, OpenMode.ForWrite);


                    // Preparing all sheets having valid layers
                    if (oBlk is BlockReference)
                    {
                        oSheet = oBlk as BlockReference;
                        if (oSheet.Name.ToUpper() != mSheetBlockName.ToUpper())
                        {
                            ed.WriteMessage("\nSelected block is not recognize as Block Sheet.");
                            return;
                        }

                        // Create Temp Sheets
                        oSheet.Explode(mSheets);
                        mValidSheets = GetValidSheetsOnly(tr, mSheets);

                    }
                      

                    // Check all selected Entities
                    if(oSheet != null) 
                    { 
                        foreach (ObjectId oID in psr.Value.GetObjectIds())
                        {
                            var o = tr.GetObject(oID, OpenMode.ForRead);

                            if (o is Curve)
                            { 
                                Curve mCurve = o as Curve;

                                //CreateLine(tr, mCurve.GeometricExtents.MinPoint, mCurve.GeometricExtents.MaxPoint);

                                string mSheetCnt = GetSheetNumberFromCollection(mValidSheets, mCurve);
                                listBox1.Items.Add(mSheetCnt);
                            }
                        }

                        // Clear Temporary Sheets
                        foreach (Entity ent in mValidSheets) 
                        {
                            //Entity ForDel = tr.GetObject(ent.ObjectId, OpenMode.ForWrite) as Entity;
                            //ForDel.Erase(); 
                            if(!ent.IsDisposed)ent.Dispose();
                        }
                    }
                    else
                    {
                        ed.WriteMessage("\nInvalid Block Selected.");
                    }

                    tr.Commit();
                }
            }


        }

string GetSheetNumberFromCollection(DBObjectCollection mSheets, Curve mCurve, string LayerSheet = "Z_DWG_SHT", string LayerSheetNo = "Z_DWG_SHT_NO")
        {
            dynamic acadApp = Application.AcadApplication;

            var doc = Application.DocumentManager.MdiActiveDocument;
            var db = doc.Database;
            var ed = doc.Editor;
            string mSheetCnt = "";

            // Get Sheets that Intersect the Curve or Containing the Curve
            DBObjectCollection TargetSheets = getIntersectCurveFromCollection(mSheets, mCurve);

            // Select Valid label then check if inside in 1 of the TargetSheets
            foreach(var oTrg in mSheets)
            {
                if(oTrg is DBText || oTrg is MText)
                {
                    Point3d mPosition = new Point3d();
                    bool IsValid = false;
                    string mSheetNo = "";
                    // Check Text Validity
                    if(oTrg is DBText)
                    {
                        mPosition = ((DBText)oTrg).Position;
                        if (((DBText)oTrg).Layer == "Z_DWG_SHT_NO") IsValid = true;
                        mSheetNo = ((DBText)oTrg).TextString;
                    }
                    else
                    {
                        mPosition = ((MText)oTrg).Location;
                        if (((MText)oTrg).Layer == "Z_DWG_SHT_NO") IsValid = true;
                        mSheetNo = ((MText)oTrg).Text;
                    }

                    // Check if Inside in 1 of the Sheet
                    foreach(var oSht in TargetSheets) 
                    {
                        if(oSht is Polyline)
                        {
                            Polyline mPL_Sheet = oSht as Polyline;
                            if (mPL_Sheet.Closed)
                            {
                                if(IsPointInside(mPosition, mPL_Sheet))
                                {
                                    mSheetCnt = mSheetCnt + "," + mSheetNo;
                                }
                            }
                        }
                    }
                }
            }
 
            return mSheetCnt;
        }

        DBObjectCollection getIntersectCurveFromCollection(DBObjectCollection oCol, Curve mCurve, string mValidLayerInCollection = "Z_DWG_SHT")
        {
            DBObjectCollection iSectObjs = new DBObjectCollection();
            foreach(var o in oCol)  // Loop all 
            {
                Point3dCollection iPts = new Point3dCollection();

                if(o is Curve)
                {
                    Curve mTrgCrv = o as Curve;

                    if (mTrgCrv.Layer == mValidLayerInCollection)
                    {                        
                        mTrgCrv.IntersectWith(mCurve, Intersect.OnBothOperands, iPts, IntPtr.Zero, IntPtr.Zero);
                        if (iPts.Count &amp;gt; 0) // Detected or intersecting objects
                        {
                            iSectObjs.Add(mTrgCrv);
                        }
                        else // Not intersecting
                        {
                            if (mTrgCrv.Closed &amp;amp;&amp;amp; mTrgCrv is Polyline)
                            {
                                if(IsPointInside(mCurve.StartPoint, (Polyline)mTrgCrv))
                                {
                                    iSectObjs.Add(mTrgCrv);
                                }
                            }
                        }
                    }
                }
            }

            return iSectObjs;
        }
        private static bool IsPointInside(Point3d point, Polyline pline)
        {
            double tolerance = Tolerance.Global.EqualPoint;
            using (MPolygon mpg = new MPolygon())
            {
                mpg.AppendLoopFromBoundary(pline, true, tolerance);
                return mpg.IsPointInsideMPolygon(point, tolerance).Count == 1;
            }
        }&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Sep 2022 05:46:02 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/civil-3d-customization-forum/explode-and-select-window-in-c/m-p/11394474#M4980</guid>
      <dc:creator>alexisgacia</dc:creator>
      <dc:date>2022-09-01T05:46:02Z</dc:date>
    </item>
    <item>
      <title>Re: Explode and Select Window in C#</title>
      <link>https://forums.autodesk.com/t5/civil-3d-customization-forum/explode-and-select-window-in-c/m-p/11396158#M4981</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/6321778"&gt;@alexisgacia&lt;/a&gt;&amp;nbsp;Is the new code doing what you want? I got called away for a family emergency so have not had a chance to look into this further. Your new code is doing pretty much what I was going to attempt. The last step for the text would just loop through the text objects and see if the insertion point is inside the 'selected' sheets.&lt;/P&gt;</description>
      <pubDate>Thu, 01 Sep 2022 19:48:50 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/civil-3d-customization-forum/explode-and-select-window-in-c/m-p/11396158#M4981</guid>
      <dc:creator>Jeff_M</dc:creator>
      <dc:date>2022-09-01T19:48:50Z</dc:date>
    </item>
    <item>
      <title>Re: Explode and Select Window in C#</title>
      <link>https://forums.autodesk.com/t5/civil-3d-customization-forum/explode-and-select-window-in-c/m-p/11399823#M4982</link>
      <description>&lt;P&gt;Hi &lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/32637"&gt;@Jeff_M&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Good day.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sorry for the late reply. It works well for me.&lt;/P&gt;&lt;P&gt;"&lt;EM&gt;The last step for the text would just loop through the text objects and see if the insertion point is inside the 'selected' sheets." &lt;/EM&gt;Yes this is what I did.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you very much&lt;EM&gt;.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 04 Sep 2022 06:23:12 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/civil-3d-customization-forum/explode-and-select-window-in-c/m-p/11399823#M4982</guid>
      <dc:creator>alexisgacia</dc:creator>
      <dc:date>2022-09-04T06:23:12Z</dc:date>
    </item>
  </channel>
</rss>

