<?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 Set Border With Font Size Through API in Inventor Programming - iLogic, Macros, AddIns &amp; Apprentice</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/set-border-with-font-size-through-api/m-p/8988016#M100725</link>
    <description>&lt;P&gt;The font size for borders in the&amp;nbsp;Active Standard Style in my drawing document is set to 0.120.&lt;/P&gt;&lt;P&gt;When I add a default border manually through the browser by right-clicking 'Default Border' and choosing 'Insert Drawing Border...', the new border has the correct font size.&lt;/P&gt;&lt;P&gt;However, when I add a default border through the api using the code below, the new border's font size is much too large.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;ThisDrawing.Document.ActiveSheet.AddDefaultBorder()&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Added Manually" style="width: 400px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/670888i1BDAB033CCE9FB5C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="image.png" alt="Added Manually" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Added Manually&lt;/span&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Added Through API" style="width: 400px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/670891iF2045EC8D1EC2D8E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="image.png" alt="Added Through API" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Added Through API&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Seems like this should be simple to do, but I'm stuck. When I try reading the documentation, I can't get the sample code for AddDefaultBorder() with arguments included to work, so I'm not sure if it is properly documented. I just need to get the correct font size. If there's a way to change it after inserting the border, that would be a good enough solution as far as I'm concerned.&lt;/P&gt;</description>
    <pubDate>Mon, 26 Aug 2019 16:01:45 GMT</pubDate>
    <dc:creator>richard.joseph.pollak</dc:creator>
    <dc:date>2019-08-26T16:01:45Z</dc:date>
    <item>
      <title>Set Border With Font Size Through API</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/set-border-with-font-size-through-api/m-p/8988016#M100725</link>
      <description>&lt;P&gt;The font size for borders in the&amp;nbsp;Active Standard Style in my drawing document is set to 0.120.&lt;/P&gt;&lt;P&gt;When I add a default border manually through the browser by right-clicking 'Default Border' and choosing 'Insert Drawing Border...', the new border has the correct font size.&lt;/P&gt;&lt;P&gt;However, when I add a default border through the api using the code below, the new border's font size is much too large.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;ThisDrawing.Document.ActiveSheet.AddDefaultBorder()&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Added Manually" style="width: 400px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/670888i1BDAB033CCE9FB5C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="image.png" alt="Added Manually" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Added Manually&lt;/span&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Added Through API" style="width: 400px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/670891iF2045EC8D1EC2D8E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="image.png" alt="Added Through API" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Added Through API&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Seems like this should be simple to do, but I'm stuck. When I try reading the documentation, I can't get the sample code for AddDefaultBorder() with arguments included to work, so I'm not sure if it is properly documented. I just need to get the correct font size. If there's a way to change it after inserting the border, that would be a good enough solution as far as I'm concerned.&lt;/P&gt;</description>
      <pubDate>Mon, 26 Aug 2019 16:01:45 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/set-border-with-font-size-through-api/m-p/8988016#M100725</guid>
      <dc:creator>richard.joseph.pollak</dc:creator>
      <dc:date>2019-08-26T16:01:45Z</dc:date>
    </item>
    <item>
      <title>Re: Set Border With Font Size Through API</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/set-border-with-font-size-through-api/m-p/8988164#M100729</link>
      <description>&lt;P&gt;I finally figured it out. Here's the solution in case anyone with a similar problem finds this post:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;oTextStyle = ThisDrawing.Document.StylesManager.TextStyles("Text Style Name")

ThisDrawing.Document.ActiveSheet.AddDefaultBorder(TextStyle:= oTextStyle)&lt;/PRE&gt;</description>
      <pubDate>Mon, 26 Aug 2019 17:31:10 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/set-border-with-font-size-through-api/m-p/8988164#M100729</guid>
      <dc:creator>richard.joseph.pollak</dc:creator>
      <dc:date>2019-08-26T17:31:10Z</dc:date>
    </item>
  </channel>
</rss>

