Message 1 of 6
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi. I'm developing a lisp to rename layers (known names). The problem is that when I try to put the Layer names on a shorter variable, it doesn't work.
This one works fine:
(if (and(tblsearch "layer" "Arquitetônico - Paredes")(tblsearch "layer" "ARQ - Paredes Alvenaria")) (progn (command "Laymrg") (foreach e '("Arquitetônico - Paredes") (if (tblsearch "LAYER" e)(command "_Name" e)))(command "" "_N" "ARQ - Paredes Alvenaria" "_Y") (command "_.-PURGE" "_La" "Arquitetônico - Paredes" "_N") ) )
And this one doesn't work:
(setq oldname "Arquitetônico - Paredes")
(setq newname "ARQ - Paredes Alvenaria")
(if (and(tblsearch "layer" oldname)(tblsearch "layer" newname)) (progn (command "Laymrg") (foreach e '(oldname) (if (tblsearch "LAYER" e)(command "_Name" e)))(command "" "_N" newname "_Y") (command "_.-PURGE" "_La" oldname "_N") ) )
Isn't impossible to do the first way, but for several layers it will be interesting to just give the names and run the routine for each one.
TIA
Solved! Go to Solution.