早上好
昨晚,我意识到我的一个程序中遗漏了几个变量,于是创建了这个。
运行它,然后运行所需的文件,然后再次运行。
将输出您需要的信息和一些不重要的信息
是的,我知道这并不难,看看setq,看看定义了什么,但在4k以上的线路上,你有时会错过一些。
如果喜欢,请使用
- ;|
- Missed Values
- Rev 1.0
- Created 11-09-09
- By FlowerRobot
- This is used to work out what a program
- leaves behind.
- Particualy any varibables missed.
- |;
- (defun c:MissedValues (/ TheBigList2 LeadProgn SubFuncts Prognvarible OtherVar)
- (setvar "cmdecho" 0)
- (if TheBigList1
- (progn
- (alert "\nThis can take a few mins")
- (setq TheBigList2 (acad_strlsort (atoms-family 1)))
- (foreach it2 TheBigList2
- (if (not (member it2 TheBigList1))
- (cond
- ((wcmatch it2 "C:*")(setq LeadProgn (cons it2 LeadProgn)))
- ((member (type (eval (read it2))) (list 'SUB 'USUBR 'EXRXSUBR))(setq SubFuncts (cons it2 SubFuncts)))
- ((member (type (eval (read it2)))(list 'STR 'USUBR 'INT 'LIST 'REAL 'STR 'VLA-object 'PICKSET))(setq Prognvarible (cons it2 Prognvarible)))
- (t (setq OtherVar (cons it2 OtherVar)))
- )))
- (setq TheBigList1 nil)
- (if LeadProgn(progn
- (princ "\n***** Command Calls **********")
- (foreach it LeadProgn (terpri) (princ it))))
- (if SubFuncts (progn
- (princ "\n***** Sub Functions **********")
- (foreach it SubFuncts (terpri) (princ it))))
- (if Prognvarible (progn
- (princ "\n***** Variables **********")
- (foreach it Prognvarible (terpri) (princ it))))
- (if OtherVar (progn
- (princ "\n***** Other **** **********")
- (foreach it OtherVar (terpri) (princ it))))
- (if (not (or LeadProgn SubFuncts Prognvarible OtherVar))
- (princ "\nGood job clean as a whisle\nCreated by FlowerRobot"))
- )
- (progn
- (princ "\nNow run your programs and then run this program again")
- (setq TheBigList1 (cons "THEBIGLIST1" (acad_strlsort (atoms-family 1))))
- )
- )
- (setvar "cmdecho" 1)
- (princ)
- )
变量-V1.0。拉链 |