ID layout tab name

Discussion in 'AutoCAD' started by TCEBob, Jan 1, 2004.

  1. TCEBob

    TCEBob Guest

    In my plot stamp (Rtext / Diesel; mostly cribbed from help) I would like
    to include the Layout Name but cannot find a system variable or other
    program reference like a table. How can I find it?

    rs
     
    TCEBob, Jan 1, 2004
    #1
  2. Try this:

    (defun LAYOUTS (/ LAYOUT)
    (setq LAYOUT_LIST NIL)
    (vlax-for LAYOUT (vla-get-layouts (vla-get-ActiveDocument
    (vlax-get-acad-object)))
    (setq LAYOUT_LIST (append LAYOUT_LIST (list (vla-get-name LAYOUT))))
    )
    )
     
    Daniel J. Altamura, R.A., Jan 1, 2004
    #2
  3. Even easier:

    (layoutlist)
     
    Daniel J. Altamura, R.A., Jan 1, 2004
    #3
  4. TCEBob

    Doug Broad Guest

    $(getvar, ctab)
     
    Doug Broad, Jan 1, 2004
    #4
  5. TCEBob

    TCEBob Guest

    Quic reactions! Thanks folks.

    rs
     
    TCEBob, Jan 1, 2004
    #5
  6. Careful!

    The Current Tab (CTAB) and the tab associated with
    the Layout in which the RTEXT resides, is not the same.

    If your RTEXT is in paperspace, and you want the name
    of the layout for the containing paper space to appear
    in the text, then CTAB doesn't give you that (although
    it may appear to, since you will only see it when the
    layout is current).

    If you only plot the layout when it is current (and I'm
    not even sure you can plot it if it's not current) then
    this may not matter. Otherwise, you can't use DIESEL to
    specify this, you must explicitly set the text to the
    name of the layout (and manage/update it accordingly).
     
    Tony Tanzillo, Jan 1, 2004
    #6
  7. TCEBob

    TCEBob Guest

    Oh, oh. I *did* use ctab. Let's try it: . . . Ok, it worked for 2 tabs.
    I think I'll let it ride for a bit 'til I get a chance to try it on all
    27 tabs. When the plot engine does more than one tab it will switch to
    the next highlighted tab and regen before plotting, so the ctab has a
    chance to update.

    HOWEVER. Upon close examination, the built-in plot stamp will show the
    layout name too, so I will go with that for now.

    Thanks,

    rs
     
    TCEBob, Jan 1, 2004
    #7
  8. TCEBob

    Doug Broad Guest

    Did you test it Tony? I did and could find no problem
    with Rtext in each layout having the diesel $(getvar,ctab)
     
    Doug Broad, Jan 2, 2004
    #8
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.