« Reply #1 on: December 05, 2021, 09:24:38 PM »
- ff:change2layer and ff:change2layer2 do the same thing.
- You don't need to do a table search again in ff:change2layer when the if statement that calls it has already did that check. (unless you use it somewhere else without this check add it back in)
- no need to turn off cmdecho in the other functions because you turned it off in ff:toggle2layer you also need to turn it back on again
- Someone correct me on this but I don't think you can pass selection set to other functions but you can call them. or you cant do it by the vairable name @ss it has to be <Selection set: 3e41e4e0>
- Once you take all those things out you can merge it down to one function again.
(defun ff:toggle2layer
(#name #acicolor #linetype #printable
/ @ss
) (command "_.Chprop" @ss
"" "la" #name
"C" "ByLayer" "LT" "ByLayer" "") (command "-Layer" "M" #name
"C" #acicolor #name
"L" #linetype #name
"Plot" #printable #name
"") (command "_.Chprop" @ss
"" "la" #name
"C" "ByLayer" "LT" "ByLayer" "") )
)
(command "-Layer" "M" #name
"C" #acicolor #name
"L" #linetype #name
"Plot" #printable #name
"") )
)
)
« Last Edit: December 05, 2021, 09:49:33 PM by mhupp »

Logged