Loading ...
Sorry, an error occurred while loading the content.

846RE: [cc2-dev-l] How to get the selection point of an entity ?

Expand Messages
  • L. Lee Saunders
    Aug 10, 2010
    • 0 Attachment

      Peter, will that work with the point selection modifiers like – get centerpoint of circle or get middle of path?

       

      From: cc2-dev-l@yahoogroups.com [mailto:cc2-dev-l@yahoogroups.com] On Behalf Of Peter Olsson
      Sent: Tuesday, August 10, 2010 10:23 AM
      To: cc2-dev-l@yahoogroups.com
      Subject: Re: [cc2-dev-l] How to get the selection point of an entity ?

       

       

      Try:

       

      GPOINT2 *pPickPt;

       

      __asm mov pPickPt, edi;

       

      You have to be a bit careful with __asm statements. I often have to turn off optimization for the these parts in the release build.

       

      You might be better off with asking for a point (RD_2DC) and then scan for the selected entity (if any).

      You will need the function SetEachPickView() or SetEachPickViewEx(&PickedPt);

      Do a DLScan and test interesting entities with if(EPick(pEntRec))

       

      Peter

       

       

      Från: cc2-dev-l@yahoogroups.com [mailto:cc2-dev-l@yahoogroups.com] För Joachim
      Skickat: den 9 augusti 2010 20:30
      Till: cc2-dev-l@yahoogroups.com
      Ämne: [cc2-dev-l] How to get the selection point of an entity ?

       

       

      Hi,

      I'm trying to create a command that breaks a line to insert some drawing and I need the coordinates of the selection point.

      I wrote a dynamic cursor that stores X and Y in global variables and it works fine except that it doesn't recognise midpoint etc modifiers.

      The RDATA.H says that with RD_Pick1 you get the entity at esi and the pk point at edi. I know that esi and edi are ASM registers but am at a loss at how to retrieve the info with C++.

      Thanks for any help...

      JdR

    • Show all 8 messages in this topic