You can use the "tblsearch" function to test if a layer or style exists : The problem here, is that if the layer name you want to change to does not exist your program will crash. You might think that this would be a good way of changing layers and style. (setq oldstyle (getvar "TEXTSTYLE")) (setvar "TEXTSTYLE" oldstyle) You would use exactly the same syntax for retrieving and restoring the name of the current Text Style : This will set the current layer to the previous layer name stored in variable "oldlayer". To restore the previous layer is just as simple: (setvar "CLAYER" oldlayer) This will retrieve the name of the current layer and store it in variable "oldlayer". To retrieve the current layer, use the following coding : (setq oldlayer (getvar "CLAYER")) This tutorial will take you through the steps of doing just that.īefore you do anything in regards to layers and styles, it's always best to retrieve the current layer, or text style, so that you can restore it. I've had a lot of queries from people asking me how to create layers, change layers, change text styles, etc.
0 Comments
Leave a Reply. |