FazBear 发表于 2022-7-6 14:40:28

(layoutlist)

Morning All
 
I have a lisp that will run a series of commands on multiple layouts which have standard layout names, problem is i am switching to each layout by specifying the layout name, but occasionally some of the layouts will be removed. so the lisp is running commands in error on those missing layouts.
 
Does anyone know a better method than whay i am using. i was thinking somthing like
 
(if (= "500") (command "-layout" "s" "500"))
 
Cheers all.

Patrick_35 发表于 2022-7-6 15:19:40

Hi
 

(member "500" (layoutlist))And you can use ctab
 
@+

FazBear 发表于 2022-7-6 15:38:51

Patrick
 
Thank you, did the trick!!

Lee Mac 发表于 2022-7-6 15:58:24

As Patrick says, its better to use CTAB (if the version has it), so:
 

(if (member "500" (layoutlist)) (setvar "CTAB" "500"))
页: [1]
查看完整版本: (layoutlist)