macPT
I worked for several years with a system identical to what netshop21 is describing. Yes, it was a pain in several ways. We did not have a PDM system so at times a revision would be made in a model but not in a drawing. We did have a secretary who kept us honest by checked for obvious mistakes like drawing revision not matching the revision block.
The only problem that I have with a system like what you describe is that for it to work, there has to be a LOT of CPs to store all of that revision information. We had 5 items to fill out in our revision block - 8 levels - that is 40 CPs to handle. Sure - it's possible - but why do it that way? The only good reason that I can see would be if you have a few people normally do only model changes and a few who only do drawing updates.
That was what we did for a year or two. When the company had a layoff, the drawing people were cut and suddenly the model people realized how much unnecessary work they had been accidentally creating.
netshop21
Here are a couple of snippets that should help you.
1 - You need to make sure that you are working in a drawing
Set Part = swApp.ActiveDoc ' Initialization
If (Part.GetType <> swDocDRAWING) Then ' Make sure the file is a Drawing
swApp.SendMsgToUser2 "Some Message.", swMbWarning, swMbOk
Exit Sub ' This is not a Drawing so exit
End If
2 - I assume that your Rev block is only on the first sheet of a drawing, so you need to be sure that you are on that sheet
Set DwgDoc = swApp.ActiveDoc ' Initialization
' Find the first sheet in the drawing
Set Sheet = DwgDoc.GetCurrentSheet 'Get the current sheet
SheetName = Sheet.GetName 'Get the current sheets name
PreSheetName = "ASDF" 'Provide a default for the while
While SheetName <> PreSheetName
SheetName = Sheet.GetName 'Get the current sheets name
retval = DwgDoc.SheetPrevious 'Get the previous sheet
Set Sheet = DwgDoc.GetCurrentSheet 'Get the current sheet
PreSheetName = Sheet.GetName 'Get the current sheets name
Wend
3 - Beyond this - I don't know - I've never tried it. This was taken directly from the 2001+ API Help file.
To access design tables from a drawing document you need to get the ModelDoc object associated with a particular drawing view and then call this function from that ModelDoc object. To determine if a drawing view has a design table associated with it, refer to View::HasDesignTable.
4 - This will get you the first view in the sheet.
Set AView = DwgDoc.GetFirstView 'Get the First View
Set DTable = AView.GetObject(, "Excel.application"
------> I think your code should go here
5 - I believe that the first view in a sheet is actually the template, but don't take my word for this. If this doesn't work, the following is a while loop that you can use to examine each view in the sheet.
While Not AView Is Nothing
Set DTable = AView.GetObject(, "Excel.application"

If Not DTable Is Nothing Then
End If
Set AView = AView.GetNextView 'Get the next view
Wend
6 - I am also a little leery of the GetObject function. I snatched it from the Design Table Example but it was not in the VBA help file. I have seen other cases where an example program is not updated when the API changes. There are several GetOLEObject functions if this doesn't work.
7 - I didn't include any declarations - everything that is Set needs to be declared. The same thing applies to cleanup.
When you get this working the way you want it to - Please reply to this message and let us know. I would like to see the results as well.
Lee
The best leaders inspire by example. When that is not an option, brute force and intimidation works pretty well, too.