Message 1 of 3
LSP Command to change User Section Layers Easily

Not applicable
06-17-2021
02:37 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi Everyone,
I have a copied LSP routine from another forum from a few years ago, and I thought I had added everything needed for Advance Steel. I get to the point where I need to select the layer but it wont and states invalid option keyword.
(defun c:USc ( / layers layer ss ) (setq layers '( "Hype_Frame" "Hype_TypeName" "Hype_SectionName" "Hype_OuterSection" "Hype_ExactOuterSection" "Hype_InnerSection" "Hype_ExactInnerSection") ) (initget 1 "Hype_Frame Hype_TypeName Hype_SectionName Hype_OuterSection Hype_ExactOuterSection Hype_InnerSection Hype_ExactInnerSection") (setq layer (getkword "\nChoose Target Layer [A_Hype_Frame/B_Hype_TypeName/C_Hype_SectionName/D_Hype_OuterSection/E_Hype_ExactOuterSection/F_Hype_InnerSection/G_Hype_ExactInnerSection] : ")) (setq layer (car (member layer layers))) (if (setq ss (ssget "_:L")) (command "_.chprop" ss "" "_LA" layer "")) (princ))
Above is the routine, and any help would be great highlighting the errors inside.
Thank you.