Hi Chris,
What is the error message that you get ? Maybe you havent locked the sheetset database before setting the revision number ?
Here is a sample code to set the revision number for all the sheets in a sheetset :
<CommandMethod("SetRevision")> _
Public Sub SetRevisionMethod()
Dim dstFile As String
dstFile = "C:\Temp\MySheetSet\MySheetSet.dst"
Dim mgr As AcSmSheetSetMgr = New AcSmSheetSetMgr()
Dim db As AcSmDatabase = New AcSmDatabase()
db = mgr.OpenDatabase(dstFile, False)
Dim lockStatus As AcSmLockStatus
lockStatus = db.GetLockStatus
If lockStatus = 0 Then
db.LockDb(db)
End If
Dim ss As AcSmSheetSet = db.GetSheetSet()
Dim EnumSheets As IAcSmEnumComponent = ss.GetSheetEnumerator()
Dim smComponent As IAcSmComponent
Dim sheet As IAcSmSheet
Dim sheet2 As IAcSmSheet2
smComponent = EnumSheets.Next()
While True
If smComponent Is Nothing Then
Exit While
End If
sheet = TryCast(smComponent, IAcSmSheet)
' To access the revision number,
' Revision date, Purpose and Category,
' cast it as IAcSmSheet2
sheet2 = TryCast(smComponent, IAcSmSheet2)
If sheet2 IsNot Nothing Then
sheet2.SetRevisionNumber("111")
End If
smComponent = EnumSheets.Next()
End While
db.UnlockDb(db)
mgr.Close(db)
End Sub
Balaji
Developer Technical Services
Autodesk Developer Network