10-09-2023
07:27 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
10-09-2023
07:27 AM
found a beautiful way of doing this, you are welcome world.
Dim oDrawDoc As DrawingDocument = ThisApplication.ActiveDocument Dim oSheet As Sheet Dim oRevTable As RevisionTable = oDrawDoc.ActiveSheet.RevisionTables.Item(1) Dim oRows As RevisionTableRows = oRevTable.RevisionTableRows Dim oApp As Inventor.Application = ThisApplication Dim UNDO As Transaction = oApp.TransactionManager.StartGlobalTransaction(oDrawDoc, "Remove Static from Revision Table") P = iProperties.Value("Project", "Revision Number") oRows.Add() Dim oRow As RevisionTableRow = oRevTable.RevisionTableRows.Item(oRevTable.RevisionTableRows.Count) For Each oRow In oRows If oRow.IsActiveRow Then Else oRow.Delete End If Next Dim oCell1 As RevisionTableCell = oRevTable.RevisionTableRows.Item(1).Item(1) Dim sFText As String = oCell1.FormattedText sFText = P'InputBox("What is the Revision?", "RevisionTableCell.FormattedText", P) oCell1.FormattedText = sFText c = "REV" 'just in case it doenst exit recreate it Try : x = iProperties.Value("Custom", c) : Catch : iProperties.Value("Custom", c) = "Job number/Reason Code or ECN #" : End Try iProperties.Value("Custom", c) = sFText iProperties.Value("Project", "Revision Number") = sFText UNDO.End