andre81 Posted August 10, 2011 Share Posted August 10, 2011 Hi All, I'm Autolisp beginer and first problem which I would like to solve with it is how to restore layers Visibility after Layiso command. In few steps it's looks like: 1. Before use Layiso command I'have some layers that are on others are off. 2. I'm using Layiso and makes some changes on drawning. 3. After changing I want to restor layers visibility from point 1 (before Laiso command). My idea is to use LayerState functions: layerstate-save, layerstate-delete and layerstate-restore. I have problem with using LayerState functions. I could name functions for example "Iso" and "RestoreState". LayerState name could be "XX" Program structure: Step 1 - c:Iso I'm checking if "XX" exist. If "XX" exist then using layerstate-delete I'm deleting "XX". I'm creating LayerState "XX" using layerstate-save. Step 2 (command "Layiso") Step 3 I'm doing some changes in drawing. Step 4 - c:RestoreState I'm restoring "XX" using layerstate-restore. My problem is that I don't know how to use LayerState functions. Many info I've found here: http://www.cadtutor.net/forum/showthread.php?39986-LayerState-Manipulation-Info.-Coding but still don't know how to for example make Layerstate "XX" using it. (layerstate-save XX) or (layerstate-save "XX") don't work. How it should look like? Also I've tried to use only commands: (defun c:iso ()(command "-layer" "state" "save" "XX" "" "" "" "LAYISO")) (defun c:RestoreState () (command "-layer" "state" "restore" "XX" "" "")) This code don't has checking if "XX" exist but works. How to write code using LayerState functions?? Anyone can help? Sorry for my English Quote Link to comment Share on other sites More sharing options...
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.