VBA to get value of cell in Revision Block?
VBA to get value of cell in Revision Block?
(OP)
I'm sure this is simple...
Is there a way to get the value of a cell in a revision block using VBA? I have a small macro that automates the insertion of a new revision line, but I'd like to make it look at the table and figure out what the next revision should be. If I can get the value of the previous revision, I can take it from there. Help? Thanks,
Brian
Is there a way to get the value of a cell in a revision block using VBA? I have a small macro that automates the insertion of a new revision line, but I'd like to make it look at the table and figure out what the next revision should be. If I can get the value of the previous revision, I can take it from there. Help? Thanks,
Brian






RE: VBA to get value of cell in Revision Block?
Use TableAnnotation.RowCount to get the current number of rows, followed by TableAnnotation.Text ( Row, Column ) to get the existing rev and then add your new rev. If you also show the revision level in the main title block at the bottom right of the sheet, you can either update both fields with the same routine or at least do a check to make sure that they agree.
The examples in the api help show most of what you need
RE: VBA to get value of cell in Revision Block?
SolidWorks' default revision block already does it automatically for you. You do not need to create a macro to do it. Just right click your revision block, and select "Revision" and then click "revision or symbol". You are done.
You customize SW default revision block to your need.
Alex
RE: VBA to get value of cell in Revision Block?
Thanks for the help...
Brian
RE: VBA to get value of cell in Revision Block?
We use the following in our Visual Basic Code:
CODE
If Revision = "" Then
Revision = "A01-01"
End If
Bradley