<?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 Re: Copy Revision table contents to Custom Table in Inventor Programming - iLogic, Macros, AddIns &amp; Apprentice</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/copy-revision-table-contents-to-custom-table/m-p/10195732#M122778</link>
    <description>&lt;P&gt;That was the ticket. You guys have been a great help!&amp;nbsp; Thanks!&lt;/P&gt;</description>
    <pubDate>Mon, 29 Mar 2021 12:45:01 GMT</pubDate>
    <dc:creator>f_calebh</dc:creator>
    <dc:date>2021-03-29T12:45:01Z</dc:date>
    <item>
      <title>Copy Revision table contents to Custom Table</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/copy-revision-table-contents-to-custom-table/m-p/10190021#M122736</link>
      <description>&lt;P&gt;I'm trying to create a work around for retaining legacy revision rows before populating with Vault Data. (populating old legacy revision tables with Vault Data deletes legacy revision rows)&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have iLogic Code to:&amp;nbsp; export revision tables out, and even Import them back in as a Custom Table, but I was wondering if there was Code that would instead just put the Revision table contents into a Custom Table without exporting?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I guess the first question should be, is this doable?&lt;/P&gt;</description>
      <pubDate>Fri, 26 Mar 2021 17:38:12 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/copy-revision-table-contents-to-custom-table/m-p/10190021#M122736</guid>
      <dc:creator>f_calebh</dc:creator>
      <dc:date>2021-03-26T17:38:12Z</dc:date>
    </item>
    <item>
      <title>Re: Copy Revision table contents to Custom Table</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/copy-revision-table-contents-to-custom-table/m-p/10190272#M122738</link>
      <description>&lt;P&gt;I have a code started for you, but it still has a bug (or few), so it still needs a little more work.&amp;nbsp; But, I'm headed home for the weekend, so I'm just going to post what I have so far.&amp;nbsp; I hope this helps.&amp;nbsp; Have a great weekend. &lt;img class="lia-deferred-image lia-image-emoji" src="https://forums.autodesk.com/html/@B4D44A73814D7FC0D950DEDFACB97081/emoticons/1f642.png" alt=":slightly_smiling_face:" title=":slightly_smiling_face:" /&gt;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;If ThisApplication.ActiveDocumentType &amp;lt;&amp;gt; DocumentTypeEnum.kDrawingDocumentObject Then
	MsgBox("A Drawing Document must be active for this rule (" &amp;amp; iLogicVb.RuleName &amp;amp; ") to work. Exiting.",vbOKOnly+vbCritical, "WRONG DOCUMENT TYPE")
	Exit Sub
End If
Dim oDDoc As DrawingDocument = ThisDrawing.Document
Dim oSheet As Inventor.Sheet = oDDoc.ActiveSheet
Dim oRevTbl As RevisionTable = oSheet.RevisionTables.Item(1)
Dim oTitle As String = oRevTbl.Title
Dim oPos As Point2d = oRevTbl.Position
Dim oRowCount As Integer = oRevTbl.RevisionTableRows.Count
Dim oColCount As Integer = oRevTbl.RevisionTableColumns.Count
Dim oCellCount As Integer = oRowCount * oColCount
Dim oColTitles(oColCount - 1) As String
Dim oColWidths(oColCount - 1) As Double
Dim oRowHeights(oRowCount-1) As Double
Dim oCellContents(oCellCount) As String
Dim oRow, oCol, oCell As Integer
oCell = 0
For oRow = 1 To oRowCount
	For oCol = 1 To oColCount
		For oCell = 1 To oCellCount - 1
			oCellContents(oCell) = oRevTbl.RevisionTableRows.Item(oRow).Item(oCol).FormattedText
			If oCell &amp;lt; (oCellCount - 1) Then oCell = oCell + 1
		Next
		oColTitles(oCol - 1) = oRevTbl.RevisionTableColumns.Item(oCol).Title
		oColWidths(oCol - 1) = oRevTbl.RevisionTableColumns.Item(oCol).Width
		If oCol &amp;lt; oColCount Then oCol = oCol + 1
	Next
	oRowHeights(oRow-1) = oRevTbl.RevisionTableRows.Item(oRow).Height
	If oRow &amp;lt; oRowCount Then oRow = oRow + 1
Next
Dim oTG As TransientGeometry = ThisApplication.TransientGeometry
Dim oCTable As CustomTable = oSheet.CustomTables.Add(oTitle, oPos, oColCount, oRowCount, oColTitles, oCellContents, oColWidths, oRowHeights)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If this solved your problem, or answered your question, please click &lt;SPAN style="background-color: green; color: white;"&gt;&lt;STRONG&gt;ACCEPT SOLUTION&lt;/STRONG&gt;&lt;/SPAN&gt;.&lt;BR /&gt;Or, if this helped you, please click (LIKE or KUDOS) &lt;SPAN&gt;&lt;img class="lia-deferred-image lia-image-emoji" src="https://forums.autodesk.com/html/@7401B55A0A518861312A0F851CD29320/emoticons/1f44d.png" alt=":thumbs_up:" title=":thumbs_up:" /&gt;&lt;/SPAN&gt;.&lt;/P&gt;&lt;P&gt;If you want and have time, I would appreciate your Vote(s) for &lt;A href="https://forums.autodesk.com/t5/forums/recentpostspage/post-type/message/interaction-style/idea/user-id/7812054/" target="_blank"&gt;My IDEAS &lt;SPAN&gt;&lt;img class="lia-deferred-image lia-image-emoji" src="https://forums.autodesk.com/html/@B166FEBB95D67CFA84899D32D8E17FC1/emoticons/1f4a1.png" alt=":light_bulb:" title=":light_bulb:" /&gt;&lt;/SPAN&gt;&lt;/A&gt;or you can Explore &lt;A href="https://knowledge.autodesk.com/profile/LTSUSR7HXMSAE/articles" target="_blank"&gt;My CONTRIBUTIONS &lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 26 Mar 2021 19:01:28 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/copy-revision-table-contents-to-custom-table/m-p/10190272#M122738</guid>
      <dc:creator>WCrihfield</dc:creator>
      <dc:date>2021-03-26T19:01:28Z</dc:date>
    </item>
    <item>
      <title>Re: Copy Revision table contents to Custom Table</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/copy-revision-table-contents-to-custom-table/m-p/10190561#M122742</link>
      <description>It looks like that's what I need. I wasn't sure how to approach problem solving the bug message, but the looks very promising.&lt;BR /&gt;&lt;BR /&gt;Hope you enjoy your weekend as well. Thanks!</description>
      <pubDate>Fri, 26 Mar 2021 21:35:14 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/copy-revision-table-contents-to-custom-table/m-p/10190561#M122742</guid>
      <dc:creator>f_calebh</dc:creator>
      <dc:date>2021-03-26T21:35:14Z</dc:date>
    </item>
    <item>
      <title>Betreff: Copy Revision table contents to Custom Table</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/copy-revision-table-contents-to-custom-table/m-p/10191319#M122749</link>
      <description>&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The loop "For oCell = 1 To oCellCount - 1" is not necessary. I've modified your code a little bit and it seems to work now.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;If ThisApplication.ActiveDocumentType &amp;lt;&amp;gt; DocumentTypeEnum.kDrawingDocumentObject Then
    MsgBox("A Drawing Document must be active for this rule (" &amp;amp; iLogicVb.RuleName &amp;amp; ") to work. Exiting.",vbOKOnly+vbCritical, "WRONG DOCUMENT TYPE")
    Exit Sub
End If
Dim oDDoc As DrawingDocument = ThisDrawing.Document
Dim oSheet As Inventor.Sheet = oDDoc.ActiveSheet
Dim oRevTbl As RevisionTable = oSheet.RevisionTables.Item(1)
Dim oTitle As String = oRevTbl.Title
Dim oPos As Point2d = oRevTbl.Position
Dim oRowCount As Integer = oRevTbl.RevisionTableRows.Count
Dim oColCount As Integer = oRevTbl.RevisionTableColumns.Count
Dim oCellCount As Integer = oRowCount * oColCount
Dim oColTitles(oColCount - 1) As String
Dim oColWidths(oColCount - 1) As Double
Dim oRowHeights(oRowCount - 1) As Double
Dim oCellContents(oCellCount-1) As String
Dim oRow, oCol, oCell As Integer

For oRow = 1 To oRowCount
	For oCol = 1 To oColCount
		oCellContents(oCell) = oRevTbl.RevisionTableRows.Item(oRow).Item(oCol).FormattedText
		oCell = oCell+1
		oColTitles(oCol - 1) = oRevTbl.RevisionTableColumns.Item(oCol).Title
		oColWidths(oCol - 1) = oRevTbl.RevisionTableColumns.Item(oCol).Width
	Next
	oRowHeights(oRow - 1) = oRevTbl.RevisionTableRows.Item(oRow).Height
Next

Dim oCTable As CustomTable = oSheet.CustomTables.Add(oTitle, oPos, oColCount, oRowCount, oColTitles, oCellContents, oColWidths, oRowHeights)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 27 Mar 2021 08:56:08 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/copy-revision-table-contents-to-custom-table/m-p/10191319#M122749</guid>
      <dc:creator>Ralf_Krieg</dc:creator>
      <dc:date>2021-03-27T08:56:08Z</dc:date>
    </item>
    <item>
      <title>Re: Copy Revision table contents to Custom Table</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/copy-revision-table-contents-to-custom-table/m-p/10195732#M122778</link>
      <description>&lt;P&gt;That was the ticket. You guys have been a great help!&amp;nbsp; Thanks!&lt;/P&gt;</description>
      <pubDate>Mon, 29 Mar 2021 12:45:01 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/copy-revision-table-contents-to-custom-table/m-p/10195732#M122778</guid>
      <dc:creator>f_calebh</dc:creator>
      <dc:date>2021-03-29T12:45:01Z</dc:date>
    </item>
    <item>
      <title>Re: Copy Revision table contents to Custom Table</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/copy-revision-table-contents-to-custom-table/m-p/10196535#M122794</link>
      <description>&lt;P&gt;I was thinking about making this run automatically after open.&amp;nbsp; For that I'd want to identify if my Custom Table already exists so I don't keep pasting over the top of it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm extremely new to ilogic so I may not even be on the right track here, but this is what I came up with.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;It'll recognize a named custom table if it has one, but if it doesn't have one, it'll error out.&amp;nbsp; If I run just the portion after the the if statement separately, it works.&amp;nbsp; I'm guessing it has to do with the declarations, but I'm stumped if this can be fixed?&amp;nbsp; (I made a few other changes to specify the sheet but that I don't think is the issue).&amp;nbsp; If I'm way off track, no worries, but I thought I would ask.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;If&lt;/SPAN&gt; &lt;SPAN&gt;ThisApplication&lt;/SPAN&gt;.&lt;SPAN&gt;ActiveDocumentType&lt;/SPAN&gt; &amp;lt;&amp;gt; &lt;SPAN&gt;DocumentTypeEnum&lt;/SPAN&gt;.&lt;SPAN&gt;kDrawingDocumentObject&lt;/SPAN&gt; &lt;SPAN&gt;Then&lt;/SPAN&gt;
    &lt;SPAN&gt;Exit&lt;/SPAN&gt; &lt;SPAN&gt;Sub&lt;/SPAN&gt;
&lt;SPAN&gt;End&lt;/SPAN&gt; &lt;SPAN&gt;If&lt;/SPAN&gt;

&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oDDoc&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;DrawingDocument&lt;/SPAN&gt; = &lt;SPAN&gt;ThisApplication&lt;/SPAN&gt;.&lt;SPAN&gt;ActiveDocument&lt;/SPAN&gt;

&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oSheet&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;Sheet&lt;/SPAN&gt;
&lt;SPAN&gt;oSheet&lt;/SPAN&gt; = &lt;SPAN&gt;oDDoc&lt;/SPAN&gt;.&lt;SPAN&gt;Sheets&lt;/SPAN&gt;(2)

&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oRevTable&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;CustomTable&lt;/SPAN&gt;
&lt;SPAN&gt;oRevTable&lt;/SPAN&gt; = &lt;SPAN&gt;oSheet&lt;/SPAN&gt;.&lt;SPAN&gt;CustomTables&lt;/SPAN&gt;.&lt;SPAN&gt;Item&lt;/SPAN&gt;(1)

&lt;SPAN&gt;If&lt;/SPAN&gt; &lt;SPAN&gt;oRevTable&lt;/SPAN&gt;.&lt;SPAN&gt;Title&lt;/SPAN&gt; = (&lt;SPAN&gt;"REVISION HISTORY - LEGACY"&lt;/SPAN&gt;) &lt;SPAN&gt;Then&lt;/SPAN&gt;
	&lt;SPAN&gt;Exit&lt;/SPAN&gt; &lt;SPAN&gt;Sub&lt;/SPAN&gt;	
&lt;SPAN&gt;End&lt;/SPAN&gt; &lt;SPAN&gt;If&lt;/SPAN&gt;


&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oRevTbl&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;RevisionTable&lt;/SPAN&gt; = &lt;SPAN&gt;oSheet&lt;/SPAN&gt;.&lt;SPAN&gt;RevisionTables&lt;/SPAN&gt;.&lt;SPAN&gt;Item&lt;/SPAN&gt;(1)
&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oTitle&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;String&lt;/SPAN&gt; = &lt;SPAN&gt;"REVISION HISTORY - LEGACY"&lt;/SPAN&gt;
&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oPos&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;Point2d&lt;/SPAN&gt; = &lt;SPAN&gt;ThisApplication&lt;/SPAN&gt;.&lt;SPAN&gt;TransientGeometry&lt;/SPAN&gt;.&lt;SPAN&gt;CreatePoint2d&lt;/SPAN&gt;(27.0815,27.145)
&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oRowCount&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;Integer&lt;/SPAN&gt; = &lt;SPAN&gt;oRevTbl&lt;/SPAN&gt;.&lt;SPAN&gt;RevisionTableRows&lt;/SPAN&gt;.&lt;SPAN&gt;Count&lt;/SPAN&gt;
&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oColCount&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;Integer&lt;/SPAN&gt; = &lt;SPAN&gt;oRevTbl&lt;/SPAN&gt;.&lt;SPAN&gt;RevisionTableColumns&lt;/SPAN&gt;.&lt;SPAN&gt;Count&lt;/SPAN&gt;
&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oCellCount&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;Integer&lt;/SPAN&gt; = &lt;SPAN&gt;oRowCount&lt;/SPAN&gt; * &lt;SPAN&gt;oColCount&lt;/SPAN&gt;
&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oColTitles&lt;/SPAN&gt;(&lt;SPAN&gt;oColCount&lt;/SPAN&gt; - 1) &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;String&lt;/SPAN&gt;
&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oColWidths&lt;/SPAN&gt;(&lt;SPAN&gt;oColCount&lt;/SPAN&gt; - 1) &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;Double&lt;/SPAN&gt;
&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oRowHeights&lt;/SPAN&gt;(&lt;SPAN&gt;oRowCount&lt;/SPAN&gt; - 1) &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;Double&lt;/SPAN&gt;
&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oCellContents&lt;/SPAN&gt;(&lt;SPAN&gt;oCellCount&lt;/SPAN&gt;-1) &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;String&lt;/SPAN&gt;
&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oRow&lt;/SPAN&gt;, &lt;SPAN&gt;oCol&lt;/SPAN&gt;, &lt;SPAN&gt;oCell&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;Integer&lt;/SPAN&gt;

&lt;SPAN&gt;For&lt;/SPAN&gt; &lt;SPAN&gt;oRow&lt;/SPAN&gt; = 1 &lt;SPAN&gt;To&lt;/SPAN&gt; &lt;SPAN&gt;oRowCount&lt;/SPAN&gt;
	&lt;SPAN&gt;For&lt;/SPAN&gt; &lt;SPAN&gt;oCol&lt;/SPAN&gt; = 1 &lt;SPAN&gt;To&lt;/SPAN&gt; &lt;SPAN&gt;oColCount&lt;/SPAN&gt;
		&lt;SPAN&gt;oCellContents&lt;/SPAN&gt;(&lt;SPAN&gt;oCell&lt;/SPAN&gt;) = &lt;SPAN&gt;oRevTbl&lt;/SPAN&gt;.&lt;SPAN&gt;RevisionTableRows&lt;/SPAN&gt;.&lt;SPAN&gt;Item&lt;/SPAN&gt;(&lt;SPAN&gt;oRow&lt;/SPAN&gt;).&lt;SPAN&gt;Item&lt;/SPAN&gt;(&lt;SPAN&gt;oCol&lt;/SPAN&gt;).&lt;SPAN&gt;FormattedText&lt;/SPAN&gt;
		&lt;SPAN&gt;oCell&lt;/SPAN&gt; = &lt;SPAN&gt;oCell&lt;/SPAN&gt;+1
		&lt;SPAN&gt;oColTitles&lt;/SPAN&gt;(&lt;SPAN&gt;oCol&lt;/SPAN&gt; - 1) = &lt;SPAN&gt;oRevTbl&lt;/SPAN&gt;.&lt;SPAN&gt;RevisionTableColumns&lt;/SPAN&gt;.&lt;SPAN&gt;Item&lt;/SPAN&gt;(&lt;SPAN&gt;oCol&lt;/SPAN&gt;).&lt;SPAN&gt;Title&lt;/SPAN&gt;
		&lt;SPAN&gt;oColWidths&lt;/SPAN&gt;(&lt;SPAN&gt;oCol&lt;/SPAN&gt; - 1) = &lt;SPAN&gt;oRevTbl&lt;/SPAN&gt;.&lt;SPAN&gt;RevisionTableColumns&lt;/SPAN&gt;.&lt;SPAN&gt;Item&lt;/SPAN&gt;(&lt;SPAN&gt;oCol&lt;/SPAN&gt;).&lt;SPAN&gt;Width&lt;/SPAN&gt;
	&lt;SPAN&gt;Next&lt;/SPAN&gt;
	&lt;SPAN&gt;oRowHeights&lt;/SPAN&gt;(&lt;SPAN&gt;oRow&lt;/SPAN&gt; - 1) = &lt;SPAN&gt;oRevTbl&lt;/SPAN&gt;.&lt;SPAN&gt;RevisionTableRows&lt;/SPAN&gt;.&lt;SPAN&gt;Item&lt;/SPAN&gt;(&lt;SPAN&gt;oRow&lt;/SPAN&gt;).&lt;SPAN&gt;Height&lt;/SPAN&gt;
&lt;SPAN&gt;Next&lt;/SPAN&gt;

&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oCTable&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;CustomTable&lt;/SPAN&gt;
&lt;SPAN&gt;oCTable&lt;/SPAN&gt; = &lt;SPAN&gt;oSheet&lt;/SPAN&gt;.&lt;SPAN&gt;CustomTables&lt;/SPAN&gt;.&lt;SPAN&gt;Add&lt;/SPAN&gt;(&lt;SPAN&gt;oTitle&lt;/SPAN&gt;, &lt;SPAN&gt;oPos&lt;/SPAN&gt;, &lt;SPAN&gt;oColCount&lt;/SPAN&gt;, &lt;SPAN&gt;oRowCount&lt;/SPAN&gt;, &lt;SPAN&gt;oColTitles&lt;/SPAN&gt;, &lt;SPAN&gt;oCellContents&lt;/SPAN&gt;, &lt;SPAN&gt;oColWidths&lt;/SPAN&gt;, &lt;SPAN&gt;oRowHeights&lt;/SPAN&gt;)&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 29 Mar 2021 16:52:17 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/copy-revision-table-contents-to-custom-table/m-p/10196535#M122794</guid>
      <dc:creator>f_calebh</dc:creator>
      <dc:date>2021-03-29T16:52:17Z</dc:date>
    </item>
    <item>
      <title>Re: Copy Revision table contents to Custom Table</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/copy-revision-table-contents-to-custom-table/m-p/10196676#M122799</link>
      <description>&lt;P&gt;You can insert this block of code in there right after defining the oSheet variable, to check for a pre-existing custom table.&amp;nbsp; If it finds it, it will let you know, and ask you if you want to replace the existing one.&amp;nbsp; If you say 'Yes', it will delete the existing one, then continue with the rest of the code to create a new one.&amp;nbsp; If you say 'No', it will exit the code.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;Dim oExists As Boolean 'false by default
If oSheet.CustomTables.Count &amp;gt; 0 Then
	For Each oCTbl As CustomTable In oSheet.CustomTables
		If oCTbl.Title = "REVISION HISTORY - LEGACY" Then
			oExists = True
			oAns = MsgBox("That Custom Table already exists." &amp;amp; vbCrLf &amp;amp; _
			"Do you want to replace it?", vbYesNo + vbQuestion, "Custom Table Exists")
			If oAns = vbYes Then
				oCTbl.Delete
			ElseIf oAns = vbNo Then
				Exit Sub
			End If
		End If
	Next
End If&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also, to make this work, change the following line lower in the main code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;Dim oTitle As String = oRevTbl.Title&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;Dim oTitle As String = "REVISION HISTORY - LEGACY"&lt;/LI-CODE&gt;&lt;P&gt;(which you already did)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If this solved your problem, or answered your question, please click &lt;SPAN style="background-color: green; color: white;"&gt;&lt;STRONG&gt;ACCEPT SOLUTION&lt;/STRONG&gt;&lt;/SPAN&gt;.&lt;BR /&gt;Or, if this helped you, please click (LIKE or KUDOS) &lt;SPAN&gt;&lt;img class="lia-deferred-image lia-image-emoji" src="https://forums.autodesk.com/html/@7401B55A0A518861312A0F851CD29320/emoticons/1f44d.png" alt=":thumbs_up:" title=":thumbs_up:" /&gt;&lt;/SPAN&gt;.&lt;/P&gt;&lt;P&gt;If you want and have time, I would appreciate your Vote(s) for &lt;A href="https://forums.autodesk.com/t5/forums/recentpostspage/post-type/message/interaction-style/idea/user-id/7812054/" target="_blank" rel="noopener"&gt;My IDEAS &lt;SPAN&gt;&lt;img class="lia-deferred-image lia-image-emoji" src="https://forums.autodesk.com/html/@B166FEBB95D67CFA84899D32D8E17FC1/emoticons/1f4a1.png" alt=":light_bulb:" title=":light_bulb:" /&gt;&lt;/SPAN&gt;&lt;/A&gt;or you can Explore &lt;A href="https://knowledge.autodesk.com/profile/LTSUSR7HXMSAE/articles" target="_blank" rel="noopener"&gt;My CONTRIBUTIONS &lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 29 Mar 2021 17:34:52 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/copy-revision-table-contents-to-custom-table/m-p/10196676#M122799</guid>
      <dc:creator>WCrihfield</dc:creator>
      <dc:date>2021-03-29T17:34:52Z</dc:date>
    </item>
    <item>
      <title>Re: Copy Revision table contents to Custom Table</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/copy-revision-table-contents-to-custom-table/m-p/10202907#M122899</link>
      <description>&lt;P&gt;It looks like if I specify another sheet other than the active sheet, I need to activate that sheet at least once before the code works.&amp;nbsp; Out of curiosity, would you know why that is?&amp;nbsp; I can write in the sheet activation in at the beginning and that fixes it, but I found this an odd behavior.&lt;/P&gt;</description>
      <pubDate>Wed, 31 Mar 2021 19:22:38 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/copy-revision-table-contents-to-custom-table/m-p/10202907#M122899</guid>
      <dc:creator>f_calebh</dc:creator>
      <dc:date>2021-03-31T19:22:38Z</dc:date>
    </item>
    <item>
      <title>Re: Copy Revision table contents to Custom Table</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/copy-revision-table-contents-to-custom-table/m-p/10207225#M122965</link>
      <description>&lt;P&gt;If you want, we could change the code so that it loops through each sheet in the drawing, checking if each sheet has a revision table in it, and if it does, create a duplicate of that revision table as a custom table, that way it wouldn't matter what sheet you specify in the code.&amp;nbsp; I believe that which ever sheet the code is going to be placing a new custom table on needs to be 'active' or 'activated', because we're physically placing that new custom table on it at a specific 2d location.&amp;nbsp; That simple 2d location doesn't know/care which sheet is active, so we have to set that part up as needed before that point in the code.&amp;nbsp; The &lt;A href="https://help.autodesk.com/view/INVNTOR/2021/ENU/?guid=GUID-7BCBBA98-FFBE-45CD-AEEE-00FFD9AC4AEA" target="_blank" rel="noopener"&gt;Sheet&lt;/A&gt; object has a method called '&lt;A href="https://help.autodesk.com/view/INVNTOR/2021/ENU/?guid=GUID-6125DCFB-BCCE-43BA-875C-DAE11288408B" target="_blank" rel="noopener"&gt;Activate&lt;/A&gt;', that we can use for that purpose as we loop through the sheets.&lt;/P&gt;&lt;P&gt;We could also put the bulk of the code that gathers data from the existing revision table and creates the new custom table into a separate, lower sub routine, then call that sub routine within the loop of the sheets, when it finds an existing revision block.&lt;/P&gt;</description>
      <pubDate>Fri, 02 Apr 2021 12:13:29 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/copy-revision-table-contents-to-custom-table/m-p/10207225#M122965</guid>
      <dc:creator>WCrihfield</dc:creator>
      <dc:date>2021-04-02T12:13:29Z</dc:date>
    </item>
    <item>
      <title>Re: Copy Revision table contents to Custom Table</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/copy-revision-table-contents-to-custom-table/m-p/10209556#M122981</link>
      <description>&lt;P&gt;This is my fix.&amp;nbsp; We have what we call a "revision history sheet" on all our drawings and it's always the last sheet, so this is how I handled it:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oDDoc&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;DrawingDocument&lt;/SPAN&gt; = &lt;SPAN&gt;ThisDrawing&lt;/SPAN&gt;.&lt;SPAN&gt;Document&lt;/SPAN&gt;
&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oSheet&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;Inventor&lt;/SPAN&gt;.&lt;SPAN&gt;Sheet&lt;/SPAN&gt;

&lt;SPAN&gt;'Activate All Sheets in Document&lt;/SPAN&gt;
&lt;SPAN&gt;For&lt;/SPAN&gt; &lt;SPAN&gt;Each&lt;/SPAN&gt; &lt;SPAN&gt;oSheet&lt;/SPAN&gt; &lt;SPAN&gt;In&lt;/SPAN&gt; &lt;SPAN&gt;oDDoc&lt;/SPAN&gt;.&lt;SPAN&gt;Sheets&lt;/SPAN&gt;
	&lt;SPAN&gt;oSheet&lt;/SPAN&gt;.&lt;SPAN&gt;Activate&lt;/SPAN&gt;
&lt;SPAN&gt;Next&lt;/SPAN&gt;

&lt;SPAN&gt;'set oSheet as the last sheet in a document&lt;/SPAN&gt;
&lt;SPAN&gt;oSheet&lt;/SPAN&gt; = &lt;SPAN&gt;oDDoc&lt;/SPAN&gt;.&lt;SPAN&gt;Sheets&lt;/SPAN&gt;(&lt;SPAN&gt;oDDoc&lt;/SPAN&gt;.&lt;SPAN&gt;Sheets&lt;/SPAN&gt;.&lt;SPAN&gt;Count&lt;/SPAN&gt;)&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 03 Apr 2021 16:07:57 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/copy-revision-table-contents-to-custom-table/m-p/10209556#M122981</guid>
      <dc:creator>f_calebh</dc:creator>
      <dc:date>2021-04-03T16:07:57Z</dc:date>
    </item>
    <item>
      <title>Re: Copy Revision table contents to Custom Table</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/copy-revision-table-contents-to-custom-table/m-p/11683041#M147786</link>
      <description>&lt;P&gt;Ive modified this code. Perhaps its useful to someone else?&lt;/P&gt;&lt;P&gt;It will update all rev tables across all sheets.&lt;/P&gt;&lt;P&gt;It will update the rev table style to match the styles library&lt;/P&gt;&lt;P&gt;It will quit if it detects the script has already been run.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="visual-basic"&gt;Sub Main()
'Check if drawing
If ThisApplication.ActiveDocumentType &amp;lt;&amp;gt; DocumentTypeEnum.kDrawingDocumentObject Then
	MsgBox("A Drawing Document must be active for this rule (" &amp;amp; iLogicVb.RuleName &amp;amp; ") to work. Exiting.", vbOKOnly + vbCritical, "Don't worry, Rodney. This time next year, we'll be millionaires!")
	Exit Sub
End If


Dim oDDoc As DrawingDocument = ThisDrawing.Document
Dim oSheet As Inventor.Sheet = oDDoc.ActiveSheet
Dim oTitle As String = "LEGACY REVISION HISTORY"
Dim oTable As CustomTable

'Stops the iLogic running if Legacy revision history exists. 
Dim oExists As Boolean 'false by default
If oSheet.CustomTables.Count &amp;gt; 0 Then
	For Each oCTbl As CustomTable In oSheet.CustomTables
		If oCTbl.Title = oTitle Then
		End If
	Next
	Exit Sub
End If

Dim oRevTbl As RevisionTable = oSheet.RevisionTables.Item(1)
Dim oPos As Point2d = oRevTbl.Position
'Alternative insertion position off page. 
'Dim oPos As Point2d = ThisApplication.TransientGeometry.CreatePoint2d(0,0)
Dim oRowCount As Integer = oRevTbl.RevisionTableRows.Count
Dim oColCount As Integer = oRevTbl.RevisionTableColumns.Count
Dim oCellCount As Integer = oRowCount * oColCount
Dim oColTitles(oColCount - 1) As String
Dim oColWidths(oColCount - 1) As Double
Dim oRowHeights(oRowCount - 1) As Double
Dim oCellContents(oCellCount - 1) As String
Dim oRow, oCol, oCell As Integer

'Get Rvision table information
For oRow = 1 To oRowCount
	For oCol = 1 To oColCount
		oCellContents(oCell) = oRevTbl.RevisionTableRows.Item(oRow).Item(oCol).FormattedText
		oCell = oCell + 1
		oColTitles(oCol - 1) = oRevTbl.RevisionTableColumns.Item(oCol).Title
		oColWidths(oCol - 1) = oRevTbl.RevisionTableColumns.Item(oCol).Width
	Next
	oRowHeights(oRow - 1) = oRevTbl.RevisionTableRows.Item(oRow).Height
Next
'Apply to each sheet
For Each oSheet In oDDoc.Sheets

	'Remove old revision tables
	If oSheet.RevisionTables.Count &amp;gt; 0 Then
		For Each oRevTable In oSheet.RevisionTables
			oRevTable.Delete
		Next
	End If

	'Insert new legacy revision table
	Dim oCTable As CustomTable = oSheet.CustomTables.Add(oTitle, oPos, oColCount, oRowCount, oColTitles, oCellContents, oColWidths, oRowHeights)

	'set the table style to match Legacy Revision Table. You need to create a table style in the styles editor, this can be a global style.
	Dim oActiveTableStyle As TableStyle
	Dim oTableTitle As String
	oActiveTableStyle = oDDoc.StylesManager.TableStyles("Legacy Revision Table")
	oTableTitle = oActiveTableStyle.Title
	oCTable.Style = oActiveTableStyle
Next

End Sub&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 16 Jan 2023 17:22:21 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/copy-revision-table-contents-to-custom-table/m-p/11683041#M147786</guid>
      <dc:creator>john.hughesFNM</dc:creator>
      <dc:date>2023-01-16T17:22:21Z</dc:date>
    </item>
  </channel>
</rss>

