RevisonTable Add Function

RevisonTable Add Function

Anonymous
Not applicable
352 Views
2 Replies
Message 1 of 3

RevisonTable Add Function

Anonymous
Not applicable
I would like to create a macro that adds a revision table into the correct location on my sheet through vba.

I believe I have to use the following function, but I am having issues calling out the command:

Function Add(PlacementPoint As Point2d) As RevisionTable
Member of Inventor.RevisionTables
Creates a new RevisionTable object on the sheet

Can someone please show me some example code to show to add a revision table in this way?
0 Likes
353 Views
2 Replies
Replies (2)
Message 2 of 3

Anonymous
Not applicable

The below VBA code can meet your request,
please try it.

 

Cheers,

Merry

 

VBA code:

Sub CreateRevTable()
    'This
assumes a drawing document is active
    Dim oDoc As
DrawingDocument
    Set oDoc =
ThisApplication.ActiveDocument
   
    Dim
oPt As Point2d
    Set oPt =
ThisApplication.TransientGeometry.CreatePoint2d(15, 15)
   

    Dim oRevTable As RevisionTable
    Set
oRevTable = oDoc.Sheets(1).RevisionTables.Add(oPt)
   
End
Sub

 


style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
I
would like to create a macro that adds a revision table into the correct
location on my sheet through vba. I believe I have to use the following
function, but I am having issues calling out the command: Function
Add(PlacementPoint As Point2d) As RevisionTable
Member of
Inventor.RevisionTables
Creates a new RevisionTable object on the
sheet
Can someone please show me some example code to show to add a
revision table in this way?
0 Likes
Message 3 of 3

Anonymous
Not applicable
Thanks Merry Jin. This is exactly what I wanted. It will help us update prints faster.
0 Likes