Thank you so much @Kent1Cooper
The layer name call "Highligh" just for example only, I mistakenly typed "Hightlight" instead of "Highlight".
I tested this lisp and encountered the following 2 cases:
1. If there is a layer named "Hightlight" in the drawing. It work good.
2. If there isn't a layer named "Hightlight" in the drawing. It requires "Enter new layer name <0>:". And there are encountered 2 other cases:
- If we enter another name that exist in the drawing, there will be many options for us to continue such as: Enter property to change [Color/LAyer/LType/ltScale/LWeight/Thickness/TRansparency/Material/Annotative]. It work good but do not save this setting for next time.
- If we want to create another layer that doesn't exist in the drawing, it will not allow it and we must exit the command to create the new layer manually. The problem is when we press "Esc" to exit the command, a copy of the objects is still created instead of deleting them. This will cause inaccuracies if we use these objects in counting.
I think it would be great if we can improve this lisp according to the following steps:
Step 1: type command > enter
Step 2: there are 2 options. [Quick/Option].
- If we choose Quick, the program will automatically create a layer named "Highlight", Layer color is 2, Lineweight : 3mm (for example, you can edit in lisp depending on our purpose).
- If we choose Option, the program will ask to type the layer name. This layer may already exist in the drawing or create a new layer. And save this option for the next time you run the command when you choose Quick.
Step 3: Enter property to change [Color/LAyer/LType/ltScale/LWeight/Thickness/TRansparency/Material/Annotative] And save this option for the next time you run the command when you choose Quick.