<?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 DrawingNote position (Point2d) behaviour. in Inventor Programming - iLogic, Macros, AddIns &amp; Apprentice</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/drawingnote-position-point2d-behaviour/m-p/9011842#M101087</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;When trying to add a DrawingNote object, I've encountered some strange behaviour related to the positioning (Point2D) of it. At least that's what I think, but maybe there's some logic behind it? Does anyone have an explaination? Or is it a bug?&lt;/P&gt;&lt;P&gt;See code below, where the last line of code does position the text how I want it, but when commented out places it differently. I have not changed the Point2d as you can see, I've just set the GeneralNote position to the same Point2d as I did when initially placing it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;        private void insertSheetNote(Sheet sheet)
        {
            TransientGeometry transientGeometry = InventorApp.TransientGeometry;
            GeneralNotes generalNotes = sheet.DrawingNotes.GeneralNotes;

            string noteText = "NOTE: This is \n" +
                "my multiline \n" +
                "test text.";

            double textPositionY = sheet.Border.RangeBox.MaxPoint.Y - 0.35 - 1;
            double textPositionX = sheet.Border.RangeBox.MinPoint.X + 0.35 + 2;
            Point2d textPosition = transientGeometry.CreatePoint2d(textPositionX, textPositionY);

            GeneralNote generalNote = generalNotes.AddFitted(textPosition, noteText);
            generalNote.TextStyle.HorizontalJustification = HorizontalTextAlignmentEnum.kAlignTextLeft;
            
            //generalNote.Position = textPosition;
        }&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This picture shows the note with the last line of code commented out:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="TextPosBefore.PNG" style="width: 316px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/674951iEE75AA0B08DDD179/image-dimensions/316x270?v=v2" width="316" height="270" role="button" title="TextPosBefore.PNG" alt="TextPosBefore.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This picture shows the note whit the last line of code active:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="TextPosAfter.PNG" style="width: 312px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/674952i91AC6186CF43FAA5/image-dimensions/312x270?v=v2" width="312" height="270" role="button" title="TextPosAfter.PNG" alt="TextPosAfter.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Anyone knows what's happening, or if it's a bug or something?&lt;/P&gt;</description>
    <pubDate>Sat, 07 Sep 2019 10:31:29 GMT</pubDate>
    <dc:creator>catot</dc:creator>
    <dc:date>2019-09-07T10:31:29Z</dc:date>
    <item>
      <title>DrawingNote position (Point2d) behaviour.</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/drawingnote-position-point2d-behaviour/m-p/9011842#M101087</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;When trying to add a DrawingNote object, I've encountered some strange behaviour related to the positioning (Point2D) of it. At least that's what I think, but maybe there's some logic behind it? Does anyone have an explaination? Or is it a bug?&lt;/P&gt;&lt;P&gt;See code below, where the last line of code does position the text how I want it, but when commented out places it differently. I have not changed the Point2d as you can see, I've just set the GeneralNote position to the same Point2d as I did when initially placing it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;        private void insertSheetNote(Sheet sheet)
        {
            TransientGeometry transientGeometry = InventorApp.TransientGeometry;
            GeneralNotes generalNotes = sheet.DrawingNotes.GeneralNotes;

            string noteText = "NOTE: This is \n" +
                "my multiline \n" +
                "test text.";

            double textPositionY = sheet.Border.RangeBox.MaxPoint.Y - 0.35 - 1;
            double textPositionX = sheet.Border.RangeBox.MinPoint.X + 0.35 + 2;
            Point2d textPosition = transientGeometry.CreatePoint2d(textPositionX, textPositionY);

            GeneralNote generalNote = generalNotes.AddFitted(textPosition, noteText);
            generalNote.TextStyle.HorizontalJustification = HorizontalTextAlignmentEnum.kAlignTextLeft;
            
            //generalNote.Position = textPosition;
        }&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This picture shows the note with the last line of code commented out:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="TextPosBefore.PNG" style="width: 316px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/674951iEE75AA0B08DDD179/image-dimensions/316x270?v=v2" width="316" height="270" role="button" title="TextPosBefore.PNG" alt="TextPosBefore.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This picture shows the note whit the last line of code active:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="TextPosAfter.PNG" style="width: 312px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/674952i91AC6186CF43FAA5/image-dimensions/312x270?v=v2" width="312" height="270" role="button" title="TextPosAfter.PNG" alt="TextPosAfter.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Anyone knows what's happening, or if it's a bug or something?&lt;/P&gt;</description>
      <pubDate>Sat, 07 Sep 2019 10:31:29 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/drawingnote-position-point2d-behaviour/m-p/9011842#M101087</guid>
      <dc:creator>catot</dc:creator>
      <dc:date>2019-09-07T10:31:29Z</dc:date>
    </item>
    <item>
      <title>Re: DrawingNote position (Point2d) behaviour.</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/drawingnote-position-point2d-behaviour/m-p/9011927#M101088</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;I have not changed the Point2d as you can see, I've just set the GeneralNote position to the same Point2d as I did when initially placing it.&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;you have not, but the insertion point of the note have changed when you changed the horizontal justification. it was probably horizontally centered before.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.autodesk.com/view/INVNTOR/2018/ENU/?guid=GUID-A3EB3728-83FC-42FA-83DA-9CC892867458" target="_blank" rel="noopener"&gt;generalnotes.addfitted&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 07 Sep 2019 12:40:02 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/drawingnote-position-point2d-behaviour/m-p/9011927#M101088</guid>
      <dc:creator>bshbsh</dc:creator>
      <dc:date>2019-09-07T12:40:02Z</dc:date>
    </item>
    <item>
      <title>Re: DrawingNote position (Point2d) behaviour.</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/drawingnote-position-point2d-behaviour/m-p/9022292#M101217</link>
      <description>&lt;P&gt;Yes, that seems to explain it, thanks.&lt;/P&gt;</description>
      <pubDate>Thu, 12 Sep 2019 19:39:33 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/drawingnote-position-point2d-behaviour/m-p/9022292#M101217</guid>
      <dc:creator>catot</dc:creator>
      <dc:date>2019-09-12T19:39:33Z</dc:date>
    </item>
  </channel>
</rss>

