drawing revision refer to sheet set and drawing prop attribute
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
i have trouble to do want i want with this lisp can someone could help, see attached files (excuse my english) thanks
;;; 2021-nov-03 by Martin Duval from Rochon experts Infrastructel
;;; revision sheet lisp for autocad
;;; REC_REVISION
;; dwg document property (DWGPROP) add this to this lisp work...
;CurrentSheetRevisionBy
;00SheetRevisionNumber
;00SheetRevisionNumber
;00SheetRevisionDate
;00SheetIssuePurpose
;00SheetRevisionBy
;01SheetRevisionNumber
;01SheetRevisionDate
;01SheetIssuePurpose
;01SheetRevisionBy
;02SheetRevisionNumber
;02SheetRevisionDate
;02SheetIssuePurpose
;02SheetRevisionBy
(vl-load-com)
(defun c:rec_revision (/)
(setq ACADOBJECT (vlax-get-acad-object))
(setq ACADDOCUMENT (vla-get-ActiveDocument ACADOBJECT))
;;Get the SummaryInfo
(setq DPROPS (vlax-get-Property ACADDOCUMENT 'SummaryInfo))
;(setq DWGREVRN (vlax-get-Property DPROPS "CurrentSheetRevisionNumber")) ;;; SETQ DWGREVRN revision number sheetset
(setq DWGREV00RN (getpropertyvalue "156ef" "TextString"))
(setq DWGREV01RN (vla-getcustombyKey DPROPS "01SheetRevisionNumber"))
(setq DWGREV01RD (vla-getcustombyKey DPROPS "01SheetRevisionDate"))
(setq DWGREV01IP (vla-getcustombyKey DPROPS "01SheetIssuePurpose"))
(setq DWGREV01BY (vla-getcustombyKey DPROPS "01SheetRevisionBy"))
(setq DWGREV02RN (vla-getcustombyKey DPROPS "02SheetRevisionNumber"))
(setq DWGREV02RD (vla-getcustombyKey DPROPS "02SheetRevisionDate"))
(setq DWGREV02IP (vla-getcustombyKey DPROPS "02SheetIssuePurpose"))
(setq DWGREV02BY (vla-getcustombyKey DPROPS "02SheetRevisionBy"))
(cond
(/= "%%" DWGREV00RN)
(setq REVRN 100)
)
(cond
((and
(/= DWGREV01RN DWGREV00RN)
(= 100 REVRN))
;;((setpropertyvalue "156b8" "textstring" DWGREV00RN))
(vla-setcustombyKey DPROPS "01SheetRevisionNumber" DWGREVRN ) ;;; set value of custom revision number 01 if =/ revsion number sheetlist and if they are value rev 00=revsheetlist
(setq REVRN 1))
)
(cond
((and
(/= DWGREV02RN DWGREV01RN)
(= 1 REVRN))
;;((setpropertyvalue "156ea" "textstring" DWGREV00RN))
(vla-setcustombyKey DPROPS "02SheetRevisionNumber" DWGREVRN ) ;;; set value of custom revision number 01 if =/ revsion number sheetlist and if they are value rev 01=rev sheet list
(setq REVRN 2))
)
;;etc
(princ)
)