Author Topic: Put specific name of layout on .  (Read 1128 times)

0 Members and 1 Guest are viewing this topic.

Coder

  • Swamp Rat
  • Posts: 827
Put specific name of layout on .
« on: July 09, 2011, 02:32:08 AM »
Hi everyone .

I wonder how to put a specific name of layout on (active) , could anyone guide me to it ?
Code: [Select]
(vlax-for layouts (vla-get-layouts (vla-get-activedocument (vlax-get-acad-object )))
   (print (vla-get-name layouts))
  )

Quote
"Layout1"
"Layout2"
"Layout3"
"Layout4"
"Layout5"
"Model"

I tried it with vla-put-activelayout but without a chance to succeed .

many thanks

gile

  • Gator
  • Posts: 2518
  • Marseille, France
Re: Put specific name of layout on .
« Reply #1 on: July 09, 2011, 03:51:13 AM »
Hi,

No need to use Automation (vla*).
The layoutlist AutoLISP function returns the same as your expression but "Model".
The CTAB sysvar is read/write.

Code: [Select]
(layoutlist)

(setvar 'ctab "Layout1")
Speaking English as a French Frog

Coder

  • Swamp Rat
  • Posts: 827
Re: Put specific name of layout on .
« Reply #2 on: July 09, 2011, 01:02:25 PM »
Thank you Gile .

That was new to me .

Appreciated.