1 Reply Latest reply on Apr 25, 2014 4:41 AM by Samer Ghafour

    Position/plane issue for Annotation using SW API

    Samer Ghafour


      I'm using the SW API to write annotations in 3D parts. I'm facing some isues regarding the position and the display of the created annotations.

      In fact, to write an annotation, I firstly use the SelectByID2 to specify the attached point of the annotation (arrow of the Leader) then the setposition method of IAnnotation, with 3d coordinates XYZ, to define the position of the annotation.


      However, the created annotation is not well-positioned as defined by the XYZ coordinates, and is always placed in the XY plane, even If I create and activate another "Annotation View" before inserting the annotation.


      So I have two related questions:

      1) How can I attach a plane/Annotation View  to an annotation ?

      2) Does the setposition method require 3d coordinates or just 2D if a plane/annotation view is attached?



        • Re: Position/plane issue for Annotation using SW API
          Samer Ghafour

          A way to reproduce the problem is to create annotations using "macros" in SW.


          Actually, I've created a simple cube in 3d part and recorded a new macro while inserting manually a new annotation (note "Manual" in snapshot).


          Then I played the recorded macro to insert automatically another annotation (by just modifying its name to "Auto"). As shown in the enclosed screenshot, both notes have correctly the same leader attachment location, but weirdly don't have the same position, although the setposition coordinates are intact.



          The created cube "CubeWithFdtManuel.sldprt" and the recorded macro "Macro1.swp" are attached to this message.

          Thanks in advance for your reply.

          Best Regards,