Script File to write Layer State into another Script File

Does anyone know how to write a script file .scr that records the current state of all the layers of the current drawing into another script file .scr to be open later using the script command?

Comments

  • You could use the Save LayerStatus and Load LayerStatus of the Bonus tools (toolbar Layers).These utilities allow to save the layerstatus of one drawing to a named file. You can the open another drawing and use this named layerstatus file to set the layers accordingly.Although these utilities use Lisp rather then Scripting you can still call them from within a scriptfile as shown below:loadlayerstatusmylayerstatuswhere loadlayerstatus (calls the command (lisp function) ) which takes a file name as argument "mylayerstatus". This will restore a layer status file called "mylayerstatus.txt" made previiously with the savelayerstatus.

This discussion has been closed.