Message 1 of 23
; error: no function definition: nil

Not applicable
09-12-2021
06:56 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello.
I worked with .lsp below about 4 years and now it's not working. I didn't change the file, that error just happened. What should I do to make it work with AutoCAD 2020?
(defun c:elen(/ fList firSet entSet filOut entList totLen)
(vl-load-com)
(setq fList '((-4 . "<OR")(0 . "*LINE")
(0 . "CIRCLE")(0 . "ARC")
(0 . "ELLIPSE")(-4 . "OR>")
(-4 . "<NOT")(0 . "MLINE")
(-4 . "NOT>"))
filOut 0
); end setq
(if
(not
(and
(setq firSet(ssget "_I")
entSet(ssget "_I" fList)
); end setq
); end and
); end not
(setq entSet(ssget fList))
(setq filOut(-(sslength firSet)(sslength entset)))
); end if
(if entSet
(progn
(setq entList
(mapcar 'vlax-ename->vla-object
(vl-remove-if 'listp
(mapcar 'cadr(ssnamex entSet))))
totLen
(apply '+
(mapcar '(lambda (x)
(vlax-curve-getDistAtParam x
(vlax-curve-getEndParam x)))
entList); end mapcar
); end apply
); end setq
(if(/= 0 filOut)
(princ(strcat "\n" (itoa filout)
" were filtered out (unsupported type)"))
); end if
(princ(strcat "\nTotal entities: "(itoa(length entList))
" Total length: "(rtos totLen)); end strcat
); end princ
); end progn
(progn
(if(/= 0 filOut)
(princ(strcat "\n" (itoa filout)
" were filtered out (unsupported type)"))
(princ "\nNothing selected")
); end if
); end progn
); end if
(princ)
); end c:elen