Message 1 of 11
Use a lisp program to identify the revision number within a title block and increment it by 1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I am very new to lisp programming so any help would be greatly appreciated!. I am attempting to write a program that goes into a title block and locates the tag "REV" From there I want it to locate the REV number and then increment it by one. So far I have the program listed below. Any ideas or help would be awesome!
(defun c:TBLOCK (/ ss i ename)
(if (setq ss (ssget "_X" '((0 . "insert") (2 . "Tid22") (66 . 1))))
(repeat (setq i (sslength ss))
(setq en (ssname ss (setq i (1- i))))
(setpropertyvalue en "REV" "1+REV")))
(princ)
)