AnsweredAssumed Answered

REVISON table change column properties

Question asked by Grega Kalan on Oct 8, 2020
Latest reply on Oct 17, 2020 by Grega Kalan


I would like to correct the drawings which have an older version of the revision table.


In column 3, I would replace the column name with "Spremenil" and the Colume properties of the column to APPROVED.


The macro works for me. I just don't know how to change Column Properties to APPROVED?



Dim swApp As Object

Dim Part As Object
Dim boolstatus As Boolean
Dim longstatus As Long, longwarnings As Long
Dim currentSheet As Object
Dim myRevisionTable As Object


Sub main()

Set swApp = Application.SldWorks
Dim swDraw As SldWorks.DrawingDoc
Dim swSheet As SldWorks.Sheet
Dim setColumnCustomProperty As Variant
Set swDraw = swApp.ActiveDoc

If Not swDraw Is Nothing Then

Set swSheet = swDraw.GetCurrentSheet

Dim swRevTable As SldWorks.RevisionTableAnnotation

Set swRevTable = swSheet.RevisionTable

If Not swRevTable Is Nothing Then

swRevTable.Text(0, 4) = "Spremenil"

'swRevTable.setColumnCustomProperty(0, 3) = "APPROVED"


Set Part = swApp.ActiveDoc
Set currentSheet = Part.GetCurrentSheet()
Set myRevisionTable = currentSheet.InsertRevisionTable(True, 0.205, 0.287, 2, "D:\....\Revizija PDM.sldrevtbt")

End If

MsgBox "Please open a drawing"
End If

End Sub