Sorry we don't have any lisp guru's here.
I suggest that you ask on CADTutor where there are some very knowledgeable lisp experts. Including Lee Mac who wrote that one.
https://www.cadtutor.net/forum/forum...-lisp-amp-dcl/
As it's one of Lee's he should be ably to modify it for you quite easily, or may already have one that does as you want.