<?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: I need advise about canceling object modification in .NET Forum</title>
    <link>https://forums.autodesk.com/t5/net-forum/i-need-advise-about-canceling-object-modification/m-p/5094156#M43812</link>
    <description>&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks for your the reply, but&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;this solution don't work with standard autocad command (strech for example)&lt;/P&gt;&lt;P&gt;is it a solution to intercept the modification of an object without depending of the modification solution choosed par the user ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;luc&lt;/P&gt;</description>
    <pubDate>Fri, 13 Jun 2014 15:07:12 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2014-06-13T15:07:12Z</dc:date>
    <item>
      <title>I need advise about canceling object modification</title>
      <link>https://forums.autodesk.com/t5/net-forum/i-need-advise-about-canceling-object-modification/m-p/5061302#M43809</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need an advise for the following problem&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;we use lwpolylines in our software.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;the users can modify this polylines using autocad commands like stretch or using grip edit or using properties palett&lt;/P&gt;&lt;P&gt;in some case , I want to control the resulting polyline (for exemple , a lwpolyline must have a least 4 vertices, and have 2 parallels segments spaced by a given value)&lt;/P&gt;&lt;P&gt;I know how to fire the control using a command , but my purpose is to automatcly execute the control&lt;/P&gt;&lt;P&gt;I know how to recognize&amp;nbsp;monitored polylines&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How can I produce an automated solution ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;by overrule ? but I don't know what ovverule using&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;by the object modified event ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;by commandended eent : no , the event is not fired then gripedit occurs&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need your advise on the best way to realize this, and any sample sould be apreciated&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks in advance&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Luc&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 28 May 2014 15:14:44 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/i-need-advise-about-canceling-object-modification/m-p/5061302#M43809</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-05-28T15:14:44Z</dc:date>
    </item>
    <item>
      <title>Re: I need advise about canceling object modification</title>
      <link>https://forums.autodesk.com/t5/net-forum/i-need-advise-about-canceling-object-modification/m-p/5061322#M43810</link>
      <description>&lt;P&gt;complement :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;when the control&amp;nbsp;will have&amp;nbsp;a negative result , the modification will be canceled&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Luc&lt;/P&gt;</description>
      <pubDate>Wed, 28 May 2014 15:17:42 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/i-need-advise-about-canceling-object-modification/m-p/5061322#M43810</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-05-28T15:17:42Z</dc:date>
    </item>
    <item>
      <title>Re: I need advise about canceling object modification</title>
      <link>https://forums.autodesk.com/t5/net-forum/i-need-advise-about-canceling-object-modification/m-p/5061768#M43811</link>
      <description>&lt;P&gt;Have a look at this as a start:&lt;/P&gt;&lt;P&gt;&lt;A target="_self" href="http://through-the-interface.typepad.com/through_the_interface/2009/08/knowing-when-an-autocad-object-is-grip-edited-using-overrules-in-net.html"&gt;http://through-the-interface.typepad.com/through_the_interface/2009/08/knowing-when-an-autocad-object-is-grip-edited-using-overrules-in-net.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Paavo&lt;/P&gt;</description>
      <pubDate>Wed, 28 May 2014 18:19:19 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/i-need-advise-about-canceling-object-modification/m-p/5061768#M43811</guid>
      <dc:creator>techsoft3d</dc:creator>
      <dc:date>2014-05-28T18:19:19Z</dc:date>
    </item>
    <item>
      <title>Re: I need advise about canceling object modification</title>
      <link>https://forums.autodesk.com/t5/net-forum/i-need-advise-about-canceling-object-modification/m-p/5094156#M43812</link>
      <description>&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks for your the reply, but&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;this solution don't work with standard autocad command (strech for example)&lt;/P&gt;&lt;P&gt;is it a solution to intercept the modification of an object without depending of the modification solution choosed par the user ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;luc&lt;/P&gt;</description>
      <pubDate>Fri, 13 Jun 2014 15:07:12 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/i-need-advise-about-canceling-object-modification/m-p/5094156#M43812</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-06-13T15:07:12Z</dc:date>
    </item>
    <item>
      <title>Re: I need advise about canceling object modification</title>
      <link>https://forums.autodesk.com/t5/net-forum/i-need-advise-about-canceling-object-modification/m-p/5094466#M43813</link>
      <description>&lt;P&gt;Luc -&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Do you want to override/hook into the standard STRETCH command and take care of specific lwpolylines within the selection set?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'd create a gripoverrule and override the GetStretchPoints() and MoveStretchPointsAt() functions where you do your specific editing for your lwpolylines. Pass all other entities in the selection set to base.MoveStretchPointsAt().&lt;/P&gt;&lt;P&gt;You need to be able to identify your lwpolylines by some property or add xdata to them upon creation.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You need cmdWillStart, cmdEnded and cmdCancelled to activate and deactivate your overrule for the STRETCH command.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I recall the STRETCH command behaves differently for certain entity types, depending on how they were selected (crossing, window, pickpoint, etc), maybe you'll end up having to keep track of that for the entities in the selection set. I wouldn't start with coding that, but keep it in mind while designing your functions if it applies to your lwpolylines.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope this gives you some ideas. I'd start writing the gripoverrule and reactors for monitoring the STRETCH command and see what happens in the StretchPoint functions mentioned.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Paavo&lt;/P&gt;</description>
      <pubDate>Fri, 13 Jun 2014 16:49:49 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/i-need-advise-about-canceling-object-modification/m-p/5094466#M43813</guid>
      <dc:creator>techsoft3d</dc:creator>
      <dc:date>2014-06-13T16:49:49Z</dc:date>
    </item>
    <item>
      <title>Re: I need advise about canceling object modification</title>
      <link>https://forums.autodesk.com/t5/net-forum/i-need-advise-about-canceling-object-modification/m-p/5094496#M43814</link>
      <description>&lt;P&gt;Just some thought how you could do this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1. At class/module level, create a collection (such as ObjectIdcollection) object;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;2. Handdle Document.CommandWillStart event: clearing the ObjectIdCollection to empty;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;3. Handle Database.ObjectModified event, save the modifed entity's ObjectId into the ObjectIdCollection&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;4. Handle Document.CommandEnded event: between CommandWilLStart and CommandEnded, there could be 0 or more entities being modified, which now have been tracked in the OBjectIdCollection. So, in this event handler, you can have code to loop through the modified entities to identfy if there are your targeting polylines among the modified entities. If found, you can then see if they meet your geometrical requirements. If not, you can prompt user to undo the change (well, it would also undo other non-target entities modified by the command, what ever it is).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It sounds easier saying it than actually coding it, though.&lt;/P&gt;</description>
      <pubDate>Fri, 13 Jun 2014 17:03:01 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/i-need-advise-about-canceling-object-modification/m-p/5094496#M43814</guid>
      <dc:creator>norman.yuan</dc:creator>
      <dc:date>2014-06-13T17:03:01Z</dc:date>
    </item>
    <item>
      <title>Re: I need advise about canceling object modification</title>
      <link>https://forums.autodesk.com/t5/net-forum/i-need-advise-about-canceling-object-modification/m-p/5095518#M43815</link>
      <description>&lt;P&gt;Norman -&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Maybe that'll work as well, it's hard to say exactly what Luc is after.&lt;/P&gt;&lt;P&gt;I assumed he wanted to control the grip editing and with my suggestion I reckon he'd be able to do that, also hook into the STRETCH command - all in one place, i.e. the grip overrule class he'd implement.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Btw, it's possible to monitor the grip editing too in commandWillStart, I think it's something like 'GRIP_STRETCH' (that'll be easy to check, though).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Paavo&lt;/P&gt;</description>
      <pubDate>Sat, 14 Jun 2014 13:03:34 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/i-need-advise-about-canceling-object-modification/m-p/5095518#M43815</guid>
      <dc:creator>techsoft3d</dc:creator>
      <dc:date>2014-06-14T13:03:34Z</dc:date>
    </item>
    <item>
      <title>Re: I need advise about canceling object modification</title>
      <link>https://forums.autodesk.com/t5/net-forum/i-need-advise-about-canceling-object-modification/m-p/5099116#M43816</link>
      <description>&lt;P&gt;In my opinion both method would work, but using the grip overruling is definitely more elegant and the user would see in real-time what's happening.&lt;/P&gt;&lt;P&gt;I published some code on Kean's blog forcing a polyline with fillets to remain always with valid fillets while user handled its grips.&lt;/P&gt;&lt;P&gt;It's not an easy way to go, a lot of things must be counted of, but the result is quite good and even user friendly.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is the link:&amp;nbsp;&lt;A href="http://through-the-interface.typepad.com/through_the_interface/2012/09/overriding-the-grips-of-an-autocad-polyline-to-maintain-fillet-segments-using-net.html" target="_self"&gt;http://through-the-interface.typepad.com/through_the_interface/2012/09/overriding-the-grips-of-an-autocad-polyline-to-maintain-fillet-segments-using-net.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also, if you search for 'overrule' inside that blog, you'll find a number of useful articles and code snippets.&lt;/P&gt;</description>
      <pubDate>Tue, 17 Jun 2014 07:39:18 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/i-need-advise-about-canceling-object-modification/m-p/5099116#M43816</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-06-17T07:39:18Z</dc:date>
    </item>
    <item>
      <title>Re: I need advise about canceling object modification</title>
      <link>https://forums.autodesk.com/t5/net-forum/i-need-advise-about-canceling-object-modification/m-p/5107036#M43817</link>
      <description>&lt;P&gt;That's one truly comprehensive sample. Thanks for sharing!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Paavo&lt;/P&gt;</description>
      <pubDate>Fri, 20 Jun 2014 12:12:22 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/i-need-advise-about-canceling-object-modification/m-p/5107036#M43817</guid>
      <dc:creator>techsoft3d</dc:creator>
      <dc:date>2014-06-20T12:12:22Z</dc:date>
    </item>
  </channel>
</rss>

