<?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 Custom Table coming out with garbled text ?? in Inventor Programming Forum</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-forum/custom-table-coming-out-with-garbled-text/m-p/3627694#M134337</link>
    <description>&lt;P&gt;I am using VB.net to generate a custom table in my .idw files to make a plot stamp.&amp;nbsp; The table is showing up, however, the text is garbled.&amp;nbsp; When you open the .idw, the table properties show the text correctly but the display is coming out messed up.&amp;nbsp; I have attached a picture of what each looks like.&amp;nbsp; I moved the table off the sheet for clarity.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Public Sub PlotStamp()

        Dim oDrawDoc As DrawingDocument
        oDrawDoc = _invApp.ActiveDocument
        Dim oInvSheet As Sheet
        oInvSheet = oDrawDoc.ActiveSheet

        Dim oTitles_Plot(0) As String
        oTitles_Plot(0) = CurrentFilename

        Dim position_Plot As Point2d = _invApp.TransientGeometry.CreatePoint2d((oInvSheet.Border.RangeBox.MinPoint.X), (oInvSheet.Border.RangeBox.MinPoint.Y - 0.125))

        Dim oCustomTable_Plot As CustomTable
        oCustomTable_Plot = oInvSheet.CustomTables.Add(" ", position_Plot, 1, 1, oTitles_Plot)

        oCustomTable_Plot.ShowTitle = False
        oCustomTable_Plot.Columns.Item(1).TitleHorizontalJustification = HorizontalTextAlignmentEnum.kAlignTextLeft
        oCustomTable_Plot.Columns.Item(1).ValueHorizontalJustification = HorizontalTextAlignmentEnum.kAlignTextLeft
        Dim oFormat_Plot As TableFormat
        oFormat_Plot = oInvSheet.CustomTables.CreateTableFormat
        oFormat_Plot.OutsideLineColor = _invApp.TransientObjects.CreateColor(255, 255, 255)
        oFormat_Plot.InsideLineColor = _invApp.TransientObjects.CreateColor(255, 255, 255)
        oCustomTable_Plot.OverrideFormat = oFormat_Plot

    End Sub&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;Where CurrentFilename is:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;CurrentFilename = (CurrentDirectory &amp;amp; "\Submittal_Sheet_" &amp;amp; drawing_count &amp;amp; ".pdf")&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 20 Sep 2012 15:30:51 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2012-09-20T15:30:51Z</dc:date>
    <item>
      <title>Custom Table coming out with garbled text ??</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/custom-table-coming-out-with-garbled-text/m-p/3627694#M134337</link>
      <description>&lt;P&gt;I am using VB.net to generate a custom table in my .idw files to make a plot stamp.&amp;nbsp; The table is showing up, however, the text is garbled.&amp;nbsp; When you open the .idw, the table properties show the text correctly but the display is coming out messed up.&amp;nbsp; I have attached a picture of what each looks like.&amp;nbsp; I moved the table off the sheet for clarity.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Public Sub PlotStamp()

        Dim oDrawDoc As DrawingDocument
        oDrawDoc = _invApp.ActiveDocument
        Dim oInvSheet As Sheet
        oInvSheet = oDrawDoc.ActiveSheet

        Dim oTitles_Plot(0) As String
        oTitles_Plot(0) = CurrentFilename

        Dim position_Plot As Point2d = _invApp.TransientGeometry.CreatePoint2d((oInvSheet.Border.RangeBox.MinPoint.X), (oInvSheet.Border.RangeBox.MinPoint.Y - 0.125))

        Dim oCustomTable_Plot As CustomTable
        oCustomTable_Plot = oInvSheet.CustomTables.Add(" ", position_Plot, 1, 1, oTitles_Plot)

        oCustomTable_Plot.ShowTitle = False
        oCustomTable_Plot.Columns.Item(1).TitleHorizontalJustification = HorizontalTextAlignmentEnum.kAlignTextLeft
        oCustomTable_Plot.Columns.Item(1).ValueHorizontalJustification = HorizontalTextAlignmentEnum.kAlignTextLeft
        Dim oFormat_Plot As TableFormat
        oFormat_Plot = oInvSheet.CustomTables.CreateTableFormat
        oFormat_Plot.OutsideLineColor = _invApp.TransientObjects.CreateColor(255, 255, 255)
        oFormat_Plot.InsideLineColor = _invApp.TransientObjects.CreateColor(255, 255, 255)
        oCustomTable_Plot.OverrideFormat = oFormat_Plot

    End Sub&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;Where CurrentFilename is:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;CurrentFilename = (CurrentDirectory &amp;amp; "\Submittal_Sheet_" &amp;amp; drawing_count &amp;amp; ".pdf")&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 20 Sep 2012 15:30:51 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/custom-table-coming-out-with-garbled-text/m-p/3627694#M134337</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-09-20T15:30:51Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Table coming out with garbled text ??</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/custom-table-coming-out-with-garbled-text/m-p/3632498#M134338</link>
      <description>&lt;P&gt;I can reproduce this problem in Inventor 2013.&lt;BR /&gt;You are right – strings with combinations of backslash “\” with some characters (e.g., \T, \S, etc.) are displayed with defects in custom table and column titles.&amp;nbsp; Sorry.&lt;BR /&gt;As a temporary workaround you may consider the following convertor for this kind of strings in column titles:&lt;/P&gt;
&lt;PRE&gt;Function TransformTitle(ByVal St As String) As String
  Dim ChArray() As Char = { _
        "A"c, "B"c, "C"c, "F"c, "G"c, "H"c, _
        "I"c, "L"c, "O"c, "S"c, "T"c, "W"c, _
        "X"c, "Y"c, "b"c, "c"c, "f"c, "i"c, _
        "l"c, "o"c, "q"c, "x"c, "y"c}
  For Each Ch As Char In ChArray
    St = St.Replace("\" &amp;amp; Ch, "\\" &amp;amp; Ch)
  Next
  Return St
End Function
&lt;/PRE&gt;
&lt;P&gt;Changes in your code:&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;Dim oTitles_Plot(0) As String&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;oTitles_Plot(0) = TransformTitle(CurrentFilename)&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you very much for this case.&lt;/P&gt;</description>
      <pubDate>Tue, 25 Sep 2012 11:01:28 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/custom-table-coming-out-with-garbled-text/m-p/3632498#M134338</guid>
      <dc:creator>Vladimir.Ananyev</dc:creator>
      <dc:date>2012-09-25T11:01:28Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Table coming out with garbled text ??</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/custom-table-coming-out-with-garbled-text/m-p/3632628#M134339</link>
      <description>&lt;P&gt;That fixed the garbled text.&amp;nbsp; Thank you for the solution !&lt;/P&gt;</description>
      <pubDate>Tue, 25 Sep 2012 12:40:24 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/custom-table-coming-out-with-garbled-text/m-p/3632628#M134339</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-09-25T12:40:24Z</dc:date>
    </item>
  </channel>
</rss>

