<?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: Select all in model space in .NET Forum</title>
    <link>https://forums.autodesk.com/t5/net-forum/select-all-in-model-space/m-p/12377391#M6630</link>
    <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/14726089"&gt;@gwhitcherQ98HZ&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;good,&lt;/P&gt;&lt;P&gt;I &lt;EM&gt;assumed&lt;/EM&gt; it would be an active document issue.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;</description>
    <pubDate>Tue, 14 Nov 2023 20:47:09 GMT</pubDate>
    <dc:creator>kerry_w_brown</dc:creator>
    <dc:date>2023-11-14T20:47:09Z</dc:date>
    <item>
      <title>Select all in model space</title>
      <link>https://forums.autodesk.com/t5/net-forum/select-all-in-model-space/m-p/12377247#M6623</link>
      <description>&lt;P&gt;How do I select all without a filter and iterate through all that has been selected in VB.Net?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Using this code generate an error at the ed.SelectAll() line&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;Try
Dim Res As PromptSelectionResult = ed.SelectAll()
If (Res.Status = PromptStatus.OK) Then
Dim selectedIds As ObjectId() = Res.Value.GetObjectIds()
Using lk As DocumentLock = doc.LockDocument()
Using tr As Transaction = db.TransactionManager.StartTransaction()
For j = 0 To selectedIds.Count - 1
Dim ent As Entity = DirectCast(GetObjectbyID(selectedIds(j)), Entity)
ent.UpgradeOpen()
ent.ColorIndex = 8
ent.DowngradeOpen()
Next
tr.Commit()
End Using

End Using

End If
Catch ex As Exception

End Try&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 14 Nov 2023 20:19:20 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/select-all-in-model-space/m-p/12377247#M6623</guid>
      <dc:creator>gwhitcherQ98HZ</dc:creator>
      <dc:date>2023-11-14T20:19:20Z</dc:date>
    </item>
    <item>
      <title>Re: Select all in model space</title>
      <link>https://forums.autodesk.com/t5/net-forum/select-all-in-model-space/m-p/12377287#M6624</link>
      <description>&lt;P&gt;What is the error message ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is it getting caught by in the catch block ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;// --&lt;/P&gt;&lt;P&gt;Please use the '&amp;lt;/&amp;gt;' button to post /format code&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 14 Nov 2023 20:06:36 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/select-all-in-model-space/m-p/12377287#M6624</guid>
      <dc:creator>kerry_w_brown</dc:creator>
      <dc:date>2023-11-14T20:06:36Z</dc:date>
    </item>
    <item>
      <title>Re: Select all in model space</title>
      <link>https://forums.autodesk.com/t5/net-forum/select-all-in-model-space/m-p/12377307#M6625</link>
      <description>&lt;P&gt;yes. the error says:&amp;nbsp;eNotApplicable&lt;/P&gt;</description>
      <pubDate>Tue, 14 Nov 2023 20:16:25 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/select-all-in-model-space/m-p/12377307#M6625</guid>
      <dc:creator>gwhitcherQ98HZ</dc:creator>
      <dc:date>2023-11-14T20:16:25Z</dc:date>
    </item>
    <item>
      <title>Re: Select all in model space</title>
      <link>https://forums.autodesk.com/t5/net-forum/select-all-in-model-space/m-p/12377321#M6626</link>
      <description>&lt;P&gt;Are you calling this code from a form. ?&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Is the document in a side database ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;is&amp;nbsp;&lt;SPAN&gt;CommandFlags.Session added to your&amp;nbsp; CommandMethod attribute ?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;(&amp;nbsp;Editor interactive methods (ed.&lt;EM&gt;Getxxx, ed.Selectxxx, etc&lt;/EM&gt;) can only be called on the active document&amp;nbsp;)&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, 14 Nov 2023 20:29:07 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/select-all-in-model-space/m-p/12377321#M6626</guid>
      <dc:creator>kerry_w_brown</dc:creator>
      <dc:date>2023-11-14T20:29:07Z</dc:date>
    </item>
    <item>
      <title>Re: Select all in model space</title>
      <link>https://forums.autodesk.com/t5/net-forum/select-all-in-model-space/m-p/12377343#M6627</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/529262"&gt;@kerry_w_brown&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Please use the '&amp;lt;/&amp;gt;' button to post /format code&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Hi &lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/529262"&gt;@kerry_w_brown&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can refer users to &lt;A href="https://forums.autodesk.com/t5/vba/post-your-code/td-p/12324653/jump-to/first-unread-message" target="_blank" rel="noopener"&gt;this sticky post&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Tue, 14 Nov 2023 20:30:06 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/select-all-in-model-space/m-p/12377343#M6627</guid>
      <dc:creator>Ed__Jobe</dc:creator>
      <dc:date>2023-11-14T20:30:06Z</dc:date>
    </item>
    <item>
      <title>Re: Select all in model space</title>
      <link>https://forums.autodesk.com/t5/net-forum/select-all-in-model-space/m-p/12377349#M6628</link>
      <description>&lt;P&gt;I just found out that issue. I wasn't setting the editor to the newly opened drawing. I am trying to change every entity to a specific color. I am at another error now.&lt;/P&gt;</description>
      <pubDate>Tue, 14 Nov 2023 20:31:10 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/select-all-in-model-space/m-p/12377349#M6628</guid>
      <dc:creator>gwhitcherQ98HZ</dc:creator>
      <dc:date>2023-11-14T20:31:10Z</dc:date>
    </item>
    <item>
      <title>Re: Select all in model space</title>
      <link>https://forums.autodesk.com/t5/net-forum/select-all-in-model-space/m-p/12377383#M6629</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/14801"&gt;@Ed__Jobe&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks Ed, I'll bookmark that.&lt;BR /&gt;I actually have one saved for C# code , but was in a hurry.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It also helps if the code is preformatted properly, but that's another issue &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;</description>
      <pubDate>Tue, 14 Nov 2023 20:44:09 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/select-all-in-model-space/m-p/12377383#M6629</guid>
      <dc:creator>kerry_w_brown</dc:creator>
      <dc:date>2023-11-14T20:44:09Z</dc:date>
    </item>
    <item>
      <title>Re: Select all in model space</title>
      <link>https://forums.autodesk.com/t5/net-forum/select-all-in-model-space/m-p/12377391#M6630</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/14726089"&gt;@gwhitcherQ98HZ&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;good,&lt;/P&gt;&lt;P&gt;I &lt;EM&gt;assumed&lt;/EM&gt; it would be an active document issue.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;</description>
      <pubDate>Tue, 14 Nov 2023 20:47:09 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/select-all-in-model-space/m-p/12377391#M6630</guid>
      <dc:creator>kerry_w_brown</dc:creator>
      <dc:date>2023-11-14T20:47:09Z</dc:date>
    </item>
    <item>
      <title>Re: Select all in model space</title>
      <link>https://forums.autodesk.com/t5/net-forum/select-all-in-model-space/m-p/12377422#M6631</link>
      <description>&lt;P&gt;Once I have the objectIds, I get each one as a DBObject .&amp;nbsp; I have opened each one Forwrite but I get an einvalidopenstate error&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 14 Nov 2023 20:55:46 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/select-all-in-model-space/m-p/12377422#M6631</guid>
      <dc:creator>gwhitcherQ98HZ</dc:creator>
      <dc:date>2023-11-14T20:55:46Z</dc:date>
    </item>
    <item>
      <title>Re: Select all in model space</title>
      <link>https://forums.autodesk.com/t5/net-forum/select-all-in-model-space/m-p/12377537#M6632</link>
      <description>&lt;P&gt;What is the exception that is thrown by the call to SelectAll()?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you are trying to select all objects in model space, there really isn't any point to calling SelectAll() when you can simply get the model space BlockTableRecord and enumerate its elements. There are hundreds of code examples posted here that demonstrate how to do that.&lt;/P&gt;</description>
      <pubDate>Tue, 14 Nov 2023 21:43:57 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/select-all-in-model-space/m-p/12377537#M6632</guid>
      <dc:creator>ActivistInvestor</dc:creator>
      <dc:date>2023-11-14T21:43:57Z</dc:date>
    </item>
    <item>
      <title>Re: Select all in model space</title>
      <link>https://forums.autodesk.com/t5/net-forum/select-all-in-model-space/m-p/12377539#M6633</link>
      <description>&lt;P&gt;I found the problem. I was not resetting the database or the editor when I opened a new drawing&lt;/P&gt;</description>
      <pubDate>Tue, 14 Nov 2023 21:45:02 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/select-all-in-model-space/m-p/12377539#M6633</guid>
      <dc:creator>gwhitcherQ98HZ</dc:creator>
      <dc:date>2023-11-14T21:45:02Z</dc:date>
    </item>
    <item>
      <title>Re: Select all in model space</title>
      <link>https://forums.autodesk.com/t5/net-forum/select-all-in-model-space/m-p/12377557#M6634</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/14726089"&gt;@gwhitcherQ98HZ&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Aside from Tony's excellent point&amp;nbsp; . . .&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The main thing to learn from this thread is to provide a good description of the problem conditions and to provide sufficient (readable and pre-formatted) code to allow deciphering the problem.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 14 Nov 2023 21:59:17 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/select-all-in-model-space/m-p/12377557#M6634</guid>
      <dc:creator>kerry_w_brown</dc:creator>
      <dc:date>2023-11-14T21:59:17Z</dc:date>
    </item>
  </channel>
</rss>

