Jump to content

Switching layout tabs with lisp


Grigs

Recommended Posts

I'm trying to add some code to a lisp routine and I need to be able to switch to the next layout tab. Does anyone have some code that would do that?

 

What I want to happen is, for each Paperspace layout in the drawing, switch to it and run a command, then switch to the next one and run the same command, etc...

Link to comment
Share on other sites

hi grigs, is this still related with your page setup?

you may have this:

 

[color=navy](foreach x (layoutlist)[/color]
[color=navy](setvar 'ctab x)[/color]
[color=navy]...........do your command here..............[/color]
[color=navy]);end of foreach[/color]

Edited by SLW210
Code Tags
Link to comment
Share on other sites

Nice one Wizman, my thoughts exactly.

 

thanks lee, lets just wait for grigs if this is what he needs, i need to go to ofice now, btw, keep up your good work.

Link to comment
Share on other sites

I had the foreach and the layoutlist. What I was missing was the "(setvar 'ctab x)". That is what I needed to change tabs. Thanks for all the help. This will speed up when I have to go back to older drawings and reconfigure them for our newer server/plotter.

Link to comment
Share on other sites

  • 3 years later...

Please check the WCMATCH function.

(foreach item (layoutlist)
(if (wcmatch item [i]thePatternToCheck[/i])
 (progn
  (setvar "CTAB" item)
  ...
 )
)  
)

Link to comment
Share on other sites

Grigs maybe rather than reconfigure why not just have a plot lisp thats what I have it just plots all layouts etc PDF tiff Colour mono A1 A3 etc I just change the plotter network name in the code. had to do that for 64bit. The users just pick it from menu and know which printer it comes out of.

Link to comment
Share on other sites

Please check the WCMATCH function.

(foreach item (layoutlist)
(if (wcmatch item [i]thePatternToCheck[/i])
 (progn
  (setvar "CTAB" item)
  ...
 )
)  
)

 

Thak you.

Ill try putting it in good use.

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...