马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?立即注册
×
- (defun GetDwgVersion ()
- (setq dwgFile (strcat (getvar "DWGPREFIX") (getvar "DWGNAME")))
- (setq dwgFileHand (open dwgFile "r"))
- (setq i 0 filever "")
- (while (< i 6)
- (setq filever (strcat filever (chr (read-char dwgFileHand))))
- (setq i (1+ i))
- )
- (close dwgFileHand)
- (cond
- ((= filever "AC1015")
- (princ "\nDrawing File Version: R2000")
- )
- ((= filever "AC1014")
- (princ "\nDrawing File Version: R14")
- )
- ((= filever "AC1013")
- (princ "\nDrawing Template File Version: R14")
- )
- ((= filever "AC1012")
- (princ "\nDrawing File Version: R13")
- )
- ((= filever "AC1009")
- (princ "\nDrawing File Version: R12/R11")
- )
- ((= filever "AC1006")
- (princ "\nDrawing File Version: R9")
- )
- (T
- (princ (strcat "\nDrawing File Version Unknown: " filever))
- )
- )
- (princ)
- )
- (princ "\nGetDwgVersion loaded, type (GetDwgVersion) to run.")
- (princ)
|