Jump to content

Loading Layer State Manager with a lisp


ADSK2007

Recommended Posts

Hello all

 

I have a lisp routine which will load Layer states and I have assigned it's command to a button - each layer state is assigned to a unique name and a button is created for it - The lisp routine loads a specific .las file into the drawing. For that, I have created a folder with all *.las files stored in it.

 

The problem is that when I click on a button to turn on a layer state, it will apply the layer state to all viewports. How can I apply a layer state to only one viewport and not affect all viewports in all tabs? below is what I have

 

(DEFUN C:d105 () (command "Layer" "A" "I" "J:/AutoCAD 2010/Lman/Development/105.las" "R" "105" "" "" ""))

 

Thank you for helping

Edited by ADSK2007
Link to comment
Share on other sites

Hi BIGAL

 

I use this line of code when I am inside the viewport - However, I found a way to rectify this - I wrote a Script using VPLAYER command. I turned layers ON and Some Off, then Tested the script to make sure it works fine. I then loaded the script with a lisp code and assigned it to a button. It works like a charm. NOTE: This routine works inside Viewport only and doesn't work in Model space

 

 

Regards

 

Adsk2007

Link to comment
Share on other sites

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...