Message 1 of 9
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello boys how are you.
It will be that they give me a help with this.
I am trying to subtract the values of some variables.
This is the list that I have.
(setq lista '("cmdecho" "osmode" "meshtype" "3dosmode" "orthomode"))
And I am trying to solve it in the following way.
(mapcar '(lambda (x)
(vl-catch-all-apply 'getvar (cons (car x) (cadr x))))
lista)
The result should be a new list like this.
(("cmdecho" . 1) ("osmode" . 1) ("meshtype" . 0) ("3dosmode" . 31) ("orthomode" . 0))
You must have vl-catch-all-apply in case the variable does not exist.
Thanks.
AutoCAD 2026
Visual Studio Code 1.99.3
AutoCAD AutoLISP Extension 1.6.3
Windows 10 (64 bits)
Solved! Go to Solution.