Jump to content

Recommended Posts

Posted

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

Posted (edited)

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

Posted

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.

Posted

No Probs, glad you got it sorted :thumbsup:

 

If you have any more questions, just ask :)

  • 3 years later...
Posted

how to add filter to for each... eg for each whose name starts with text string or containing text...

Posted

Please check the WCMATCH function.

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

Posted

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.

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

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