<?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: Create Temporary Objects for Selection in .NET Forum</title>
    <link>https://forums.autodesk.com/t5/net-forum/create-temporary-objects-for-selection/m-p/9458046#M19794</link>
    <description>&lt;P&gt;Hi Yuan,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am new in C# for Autocad it may take a while to understand the code. It was a very good example and very helpful.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I think this the one that I'm looking for.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you very much.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Alex&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 21 Apr 2020 06:47:09 GMT</pubDate>
    <dc:creator>alexisgacia</dc:creator>
    <dc:date>2020-04-21T06:47:09Z</dc:date>
    <item>
      <title>Create Temporary Objects for Selection</title>
      <link>https://forums.autodesk.com/t5/net-forum/create-temporary-objects-for-selection/m-p/9453713#M19791</link>
      <description>&lt;P&gt;Hi,&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'm trying to create a temporary object base on my selected objects. Those temporary object will be part of the selection. After the temporary object was created, user will pick 1 of the object. Then after the selection it will remove all temporary object except the selected one.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Picture sample is for the selection of objects.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Selection.png" style="width: 801px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/756642i8432D43AE732A55D/image-size/large?v=v2&amp;amp;px=999" role="button" title="Selection.png" alt="Selection.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then after selected it will show Temporary Objects for selection&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Temp Objects Created.png" style="width: 605px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/756643i9E593F44C86AA21F/image-size/large?v=v2&amp;amp;px=999" role="button" title="Temp Objects Created.png" alt="Temp Objects Created.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;After selected 1 of the temporary objects it will erase the other temporary objects and remain the only object that is selected.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I don't know if that is possible in AutoCad.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you in advance&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 19 Apr 2020 08:11:41 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/create-temporary-objects-for-selection/m-p/9453713#M19791</guid>
      <dc:creator>alexisgacia</dc:creator>
      <dc:date>2020-04-19T08:11:41Z</dc:date>
    </item>
    <item>
      <title>Re: Create Temporary Objects for Selection</title>
      <link>https://forums.autodesk.com/t5/net-forum/create-temporary-objects-for-selection/m-p/9456674#M19792</link>
      <description>&lt;P&gt;Here are what I see of your requirements:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1.&amp;nbsp; certain existing entities in drawing could be used as base information to create new entities;&lt;/P&gt;
&lt;P&gt;2. When user select these entities, you want to show the possible new entities temporarily, as visual hint to help user to decide to choose one existing entity, from which a new entity would eventually be drawn permanently&lt;/P&gt;
&lt;P&gt;3. User then choose one existing entity from all previously selected entities (with associated temporary new entity visually shown).&lt;/P&gt;
&lt;P&gt;4. Once user makes the choice, a new entity is added to the drawing permanently and all other temporary new entities are gone.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There are at least 2 different way to do it, as I can see:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1. Use Transient Graphics in conjunction with handling Editor.SelectionAdded/Removed events. With this approach, you can draw temporary entities during the call of Editor.GetSelection().&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;2. Use DrawableOverrule. With this approach, you can enable your custom DrawOverrule during the call of Editor.GetSelection, so that the selected entities would be drawn with extra shape.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;While either approach would not be very difficult to code, it is somewhat advanced AutoCAD .NET API topic, which I am not sure whether you are up to. I might be able to put some code together later (late today or early tomorrow) and post back, using one of aforementioned approaches (not sure if I have enough time for both).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 20 Apr 2020 16:04:52 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/create-temporary-objects-for-selection/m-p/9456674#M19792</guid>
      <dc:creator>norman.yuan</dc:creator>
      <dc:date>2020-04-20T16:04:52Z</dc:date>
    </item>
    <item>
      <title>Re: Create Temporary Objects for Selection</title>
      <link>https://forums.autodesk.com/t5/net-forum/create-temporary-objects-for-selection/m-p/9457274#M19793</link>
      <description>&lt;P&gt;I completed coding the first approach - handling Editor.SelectionAdded/Removed event in conjunction with Transient Graphics. As usual, in order to make the sample code easier to read, it is posted in my blog here:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://drive-cad-with-code.blogspot.com/2020/04/show-temporary-entityshape-during-user.html" target="_blank" rel="noopener"&gt;https://drive-cad-with-code.blogspot.com/2020/04/show-temporary-entityshape-during-user.html&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;HTH&lt;/P&gt;</description>
      <pubDate>Mon, 20 Apr 2020 21:21:34 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/create-temporary-objects-for-selection/m-p/9457274#M19793</guid>
      <dc:creator>norman.yuan</dc:creator>
      <dc:date>2020-04-20T21:21:34Z</dc:date>
    </item>
    <item>
      <title>Re: Create Temporary Objects for Selection</title>
      <link>https://forums.autodesk.com/t5/net-forum/create-temporary-objects-for-selection/m-p/9458046#M19794</link>
      <description>&lt;P&gt;Hi Yuan,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am new in C# for Autocad it may take a while to understand the code. It was a very good example and very helpful.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I think this the one that I'm looking for.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you very much.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Alex&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 21 Apr 2020 06:47:09 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/create-temporary-objects-for-selection/m-p/9458046#M19794</guid>
      <dc:creator>alexisgacia</dc:creator>
      <dc:date>2020-04-21T06:47:09Z</dc:date>
    </item>
    <item>
      <title>Re: Create Temporary Objects for Selection</title>
      <link>https://forums.autodesk.com/t5/net-forum/create-temporary-objects-for-selection/m-p/9460469#M19795</link>
      <description>&lt;P&gt;I just posted second article on this topic where using DrawableOverrule is demonstrated:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://drive-cad-with-code.blogspot.com/2020/04/show-temporary-entityshape-during-user_21.html" target="_blank" rel="noopener"&gt;https://drive-cad-with-code.blogspot.com/2020/04/show-temporary-entityshape-during-user_21.html&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 21 Apr 2020 20:35:46 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/create-temporary-objects-for-selection/m-p/9460469#M19795</guid>
      <dc:creator>norman.yuan</dc:creator>
      <dc:date>2020-04-21T20:35:46Z</dc:date>
    </item>
    <item>
      <title>Re: Create Temporary Objects for Selection</title>
      <link>https://forums.autodesk.com/t5/net-forum/create-temporary-objects-for-selection/m-p/9475819#M19796</link>
      <description>&lt;P&gt;This is very helpful.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you again Yuan.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 28 Apr 2020 09:20:00 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/create-temporary-objects-for-selection/m-p/9475819#M19796</guid>
      <dc:creator>alexisgacia</dc:creator>
      <dc:date>2020-04-28T09:20:00Z</dc:date>
    </item>
  </channel>
</rss>

