- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello!
I am trying to do something quite simple - it is just a problem of writing the correct LISP of doing so ...
I need 3 different lists:
List1 is a list that contains all layers in a drawing;
(defun LayersList ( / )
(vlax-for lay (vla-get-Layers
(vla-get-ActiveDocument (vlax-get-acad-object)))
(setq List1 (cons (vla-get-Name lay) List1))))
I think this code is okay as it creates list1 consisting of the layers in the drawing.
Another list (list2) is a comparison list I create and define myself - for now let's say that list2 is put through
(setq list2 '("1" "2" "3" "A" "B" "C"))
Finally, I would like to compare the list1 with the list2 and give me the values (layer names) that do comply and the ones that don't comply. The values that don't comply I would like to constitute the third list "list3". I have tried with "member", "mapcar" and a few others without succeeding so far...
Any ways of writing this code?
Thanks!
Solved! Go to Solution.