Message 1 of 15
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi guys, i am going to go insane. when i load my code from a lisp file its giving me an error: to few arguments. but when i copy the whole lisp over to autocad's lisp editor and load it that way it works perfectly fine. Surely something is werid here. here is my code:
(defun c:C_TBRN (/ s e c0 c1 c2 c3 c4 c5 c6 c7 c8 c9 c10 c11 c12 )
(setq s (ssget "_x" '((0 . "INSERT") (2 . "Title Block") (8 . ".DRAWING-SHEET"))))
(setq e (ssname s 0))
(setq c0 (getpropertyvalue e "REV0"))
(setq c1 (getpropertyvalue e "REV1"))
(setq c2 (getpropertyvalue e "REV2"))
(setq c3 (getpropertyvalue e "REV3"))
(setq c4 (getpropertyvalue e "REV4"))
(setq c5 (getpropertyvalue e "REV5"))
(setq c6 (getpropertyvalue e "REV6"))
(setq c7 (getpropertyvalue e "REV7"))
(setq c8 (getpropertyvalue e "REV8"))
(setq c9 (getpropertyvalue e "REV9"))
(setq c10 (getpropertyvalue e "REV10"))
(setq c11 (getpropertyvalue e "REV11"))
(setq r1 (getstring T "\nEnter Revision: "))
(setq r2 (getstring T "\nEnter Revision By: "))
(setq r3 (getstring T "\nEnter Revision Date: "))
(setq r4 (getstring T "\nEnter Revision Description: "))
(if (= c0 "")
(progn
(setpropertyvalue e "REV0" r1)
(setpropertyvalue e "0BY" r2)
(setpropertyvalue e "DATE0" r3)
(setpropertyvalue e "DESCRIPTION-0" r4)
(princ))
(progn
(princ)
(if (= c1 "")
(progn
(setpropertyvalue e "REV1" r1)
(setpropertyvalue e "1BY" r2)
(setpropertyvalue e "DATE1" r3)
(setpropertyvalue e "DESCRIPTION-1" r4)
(princ))
(progn
(princ)
(if (= c2 "")
(progn
(setpropertyvalue e "REV2" r1)
(setpropertyvalue e "2BY" r2)
(setpropertyvalue e "DATE2" r3)
(setpropertyvalue e "DESCRIPTION-2" r4)
(princ))
(progn
(princ)
(if (= c3 "")
(progn
(setpropertyvalue e "REV3" r1)
(setpropertyvalue e "3BY" r2)
(setpropertyvalue e "DATE3" r3)
(setpropertyvalue e "DESCRIPTION-3" r4)
(princ))
(progn
(princ)
(if (= c4 "")
(progn
(setpropertyvalue e "REV4" r1)
(setpropertyvalue e "4BY" r2)
(setpropertyvalue e "DATE4" r3)
(setpropertyvalue e "DESCRIPTION-4" r4)
(princ))
(progn
(princ)
(if (= c5 "")
(progn
(setpropertyvalue e "REV5" r1)
(setpropertyvalue e "5BY" r2)
(setpropertyvalue e "DATE5" r3)
(setpropertyvalue e "DESCRIPTION-5" r4)
(princ))
(progn
(princ)
(if (= c6 "")
(progn
(setpropertyvalue e "REV6" r1)
(setpropertyvalue e "6BY" r2)
(setpropertyvalue e "DATE6" r3)
(setpropertyvalue e "DESCRIPTION-6" r4)
(princ))
(progn
(princ)
(if (= c7 "")
(progn
(setpropertyvalue e "REV7" r1)
(setpropertyvalue e "7BY" r2)
(setpropertyvalue e "DATE7" r3)
(setpropertyvalue e "DESCRIPTION-7" r4)
(princ))
(progn
(princ)
(if (= c8 "")
(progn
(setpropertyvalue e "REV8" r1)
(setpropertyvalue e "8BY" r2)
(setpropertyvalue e "DATE8" r3)
(setpropertyvalue e "DESCRIPTION-8" r4)
(princ))
(progn
(princ)
(if (= c9 "")
(progn
(setpropertyvalue e "REV9" r1)
(setpropertyvalue e "9BY" r2)
(setpropertyvalue e "DATE9" r3)
(setpropertyvalue e "DESCRIPTION-9" r4)
(princ))
(progn
(princ)
(if (= c10 "")
(progn
(setpropertyvalue e "REV10" r1)
(setpropertyvalue e "10BY" r2)
(setpropertyvalue e "DATE10" r3)
(setpropertyvalue e "DESCRIPTION-10" r4)
(princ))
(progn
(princ)
(if (= c11 "")
(progn
(setpropertyvalue e "REV11" r1)
(setpropertyvalue e "11BY" r2)
(setpropertyvalue e "DATE11" r3)
(setpropertyvalue e "DESCRIPTION-11" r4)
(princ))
(progn
(princ)
(if (= c11 "")
(progn
(setpropertyvalue e "REV12" r1)
(setpropertyvalue e "12BY" r2)
(setpropertyvalue e "DATE12" r3)
(setpropertyvalue e "DESCRIPTION-12" r4)
(princ))
(progn
(princ)))))))))))))))))))))))))))
(prompt "\nRevision info has been updated Successfully!")
(princ)
)
Civil 3D Certified Professional
Solved! Go to Solution.