HELP: Autolisp for Creating Layers with Material Assigned

HELP: Autolisp for Creating Layers with Material Assigned

Anonymous
Not applicable
995 Views
2 Replies
Message 1 of 3

HELP: Autolisp for Creating Layers with Material Assigned

Anonymous
Not applicable

Hello, 

 

Need help to create a lisp code that will create a set of layers when prompted to select set (e.g. Set A contains layer 1, 2 and 3; Set B contains layer 4, 5 and 6; Set C contains layer 7, 8 and 9) and then within each layers it will have a material property (e.g. gold, copper, brass, etc). I am using ACAD2015.

 

Thank you.

0 Likes
Accepted solutions (1)
996 Views
2 Replies
Replies (2)
Message 2 of 3

SeeMSixty7
Advisor
Advisor
Accepted solution

Create a LayerSetVariable something like

(setq LayerSets (list

                           (list "A" (list "1" "2" "3"))

                           (list "B" (list ""4" "5" "6"))

                           (list "C" (list "7" "8" "9"))

                      )

)

Then when your user or program needs Set A Simply use (assoc "A" or "B" or "C") to retrieve the layer list. Prompt the User for the Material and then append it to the layer name(s), then just create the layers. Hopefully that helps get you started

 

Good Luck

Message 3 of 3

Anonymous
Not applicable

Thanks for the help! 🙂

0 Likes