| Author |
Message |
Jim Shipley
Guest
|
Posted:
Thu Mar 17, 2005 2:11 am Post subject:
Detecting if dwg is old version at startup |
|
|
Is there a way to detect if the drawing being opened is from a previous
release? I would like to put up an alert, or run a script if this is the
case.
Thanks
Jim Shipley
|
|
| Back to top |
|
 |
Terry W. Dotson
Guest
|
Posted:
Thu Mar 17, 2005 7:37 am Post subject:
Re: Detecting if dwg is old version at startup |
|
|
Jim Shipley wrote:
| Quote: | Is there a way to detect if the drawing being opened is from a previous
release? I would like to put up an alert, or run a script if this is the
case.
|
Read the first 6 bytes of the file, something like this.
Public Function DwgVersStr(ByVal FileName As String) As String
VersFile = FreeFile
Open FileName For Binary As #VersFile
Chk$ = UCase$(Input$(6, #VersFile))
Close #VersFile
Select Case Chk$
Case "AC1018": Ver$ = "2004"
Case "AC1015": Ver$ = "2000"
Case "AC1014": Ver$ = "R14"
Case "AC1013": Ver$ = "R14"
Case "AC1012": Ver$ = "R13"
Case "AC1011": Ver$ = "R13"
Case "AC1010": Ver$ = "R13"
Case "AC1009": Ver$ = "R12/R11"
Case "AC1006": Ver$ = "R10"
Case "AC1004": Ver$ = "R9"
Case "AC1003": Ver$ = "2.6"
Case "AC1002": Ver$ = "2.5"
Case Else: Ver$ = "Unknown"
End Select
DwgVersStr = Ver$
End Function
Terry |
|
| Back to top |
|
 |
Jim Shipley
Guest
|
Posted:
Fri Mar 18, 2005 11:01 pm Post subject:
Re: Detecting if dwg is old version at startup |
|
|
Thanks!
"Terry W. Dotson" <nospam@invalid.com> wrote in message
news:4238ed77_2@newsprd01...
| Quote: | Jim Shipley wrote:
Is there a way to detect if the drawing being opened is from a previous
release? I would like to put up an alert, or run a script if this is
the
case.
Read the first 6 bytes of the file, something like this.
Public Function DwgVersStr(ByVal FileName As String) As String
VersFile = FreeFile
Open FileName For Binary As #VersFile
Chk$ = UCase$(Input$(6, #VersFile))
Close #VersFile
Select Case Chk$
Case "AC1018": Ver$ = "2004"
Case "AC1015": Ver$ = "2000"
Case "AC1014": Ver$ = "R14"
Case "AC1013": Ver$ = "R14"
Case "AC1012": Ver$ = "R13"
Case "AC1011": Ver$ = "R13"
Case "AC1010": Ver$ = "R13"
Case "AC1009": Ver$ = "R12/R11"
Case "AC1006": Ver$ = "R10"
Case "AC1004": Ver$ = "R9"
Case "AC1003": Ver$ = "2.6"
Case "AC1002": Ver$ = "2.5"
Case Else: Ver$ = "Unknown"
End Select
DwgVersStr = Ver$
End Function
Terry |
|
|
| Back to top |
|
 |
Jim Dowthwaite
Guest
|
Posted:
Sat Mar 19, 2005 1:23 am Post subject:
Re: Detecting if dwg is old version at startup |
|
|
Will this work if trying to detect if a drawing is from MDT or
Mechanical?
Jim |
|
| Back to top |
|
 |
|
|
|
|