Message 1 of 2
Not applicable
10-19-2011
05:12 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello all,
working in my office automation again, and I was wondereing on the best way to duplicate/update a sheetset. My current routine is opening a sheetset by making a temporary file out of it. This temp file is then manipulated with the routine, and it seems to work quite well. When the user finishes, I want to be able to transfer the temporary sheetset object to the origional sheetset object and then save the origional sheetset object... unfortunatly I am having trouble understanding the AcSmSheetset.Save method with its arguments.
here is my code: (this ofcourse throws an error.
Private Function SaveSheetSet() As DialogResult
''Throw New NotImplementedException
Dim mySS As AcSmSheetSet = mySSDB.GetSheetSet
Dim mySSOrig As AcSmSheetSet = mySSDBOrig.GetSheetSet
Dim result As DialogResult
Dim save As Boolean = True
If mySSOrig.GetIsDirty Then
'' Sheet set has been edited outside of this owner
result = MessageBox.Show("It seems that the Sheetset has been edited. Click Yes to overwrite and exit, No to not save and exit, Cancel to abort save and return to dialog.", "Save Sheetset", MessageBoxButtons.YesNoCancel)
If result = DialogResult.Yes Then
save = True
Else
save = False
End If
End If
If save Then
'' save the sheetset
ToolStripStatusLabel1.Text = "Saving Sheetset..."
LockSSM(mySSDBOrig)
LockSSM(mySSDB)
Dim pFiler As IAcSmFiler = Nothing
mySSOrig = mySS
pFiler.Init(mySSOrig, mySSOrig.GetDatabase, True)
mySSOrig.Save(pFiler)
UnlockSSM(mySSDB)
UnlockSSM(mySSDBOrig)
ToolStripStatusLabel1.Text = "Ready."
End If
Return result
End Function
Solved! Go to Solution.