rcb007 Posted April 29 Share Posted April 29 I am trying to create an if statement to switch to two horizonal views within model. If its not two views, create the two views, if not, leave it alone. Not really having any luck. (ai_tiledvp 2 "_H");; This is the command within the ribbon. (if (= (ai_tiledvp 1) 0) (ai_tiledvp 2 "_H")) Thanks for the help. Quote Link to comment Share on other sites More sharing options...
CyberAngel Posted April 29 Share Posted April 29 This is a tough one. It looks like ai_tiledvp doesn't give you the status of the tiles. Oddly, I can't find an AutoLISP command that does. You might use the vports command. It returns a list of current viewports, so all you need to check is the length of that list. Quote Link to comment Share on other sites More sharing options...
Steven P Posted April 29 Share Posted April 29 Untested to give the number of viewports in a layout tab. It won't tell you how these are aligned though, you could just get the (ssget "X"..... as a variable, loop through the selection set and viewport coordinates to work out if they are longer than taller assuming if so they are horizontally aligned. ( - (sslength (ssget "X" (list (cons 0 "VIEWPORT")(cons 410 (getvar 'ctab))))) 1) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.