Layout Name

Discussion in 'AutoCAD' started by Nick Fuller, Aug 17, 2004.

  1. Nick Fuller

    Nick Fuller Guest

    Can someone give a piece of code that will return the name of the current
    layout. I've tried to find a way to do so through getvar, etc. to no avail.
    Maybe I just don't know how. Any help would greatly appreciated. Can this
    possibly be handled through diesel functions?
     
    Nick Fuller, Aug 17, 2004
    #1
  2. Nick Fuller

    Jeff Mishler Guest

    (getvar "ctab")???

    ThisDrawing.GetVariable "CTAB" ?????
     
    Jeff Mishler, Aug 17, 2004
    #2
  3. Nick Fuller

    MP Guest

    in addition to the method Jeff gave you,
    this will return the same thing

    MsgBox ThisDrawing.ActiveLayout.Name

    sounds like you may want to review the basic object model some more.
     
    MP, Aug 17, 2004
    #3
  4. in addition to the method Jeff gave you,
    Or MsgBox ThisDrawing.GetVariable("CTAB")
    Before that he needs to define his intent and decide upon a language - he's
    referenced autolisp. visuallisp, doslib and vba in his three posts. If
    he's up in the air, he'll get better responses from the customization ng
    not this ng.

    And, his intent to date can be handled by telling his users to right-click
    on the tab of choice, select rename and they get their dialog box - done
    deal. Why make a routine for something already in the box - unless this is
    part of something larger that has yet to be communicated.

    -- Mike
    ___________________________
    Mike Tuersley
    CADalyst's CAD Clinic
    Rand IMAGINiT Technologies
    ___________________________
    the trick is to realize that there is no spoon...
     
    Mike Tuersley, Aug 17, 2004
    #4
  5. Nick Fuller

    Nick Fuller Guest

    Mikes right, it is a part of something larger. We're using a thrid party
    software where the sheet layout name is used to create bookmarks in PDF's.
    So instead of having the layout names left at the default name "work", they
    need to be named as it appears in the sheet title. So I was building a
    routine that would rename the layout tab while updating the sheet title in
    the title block. Due to my still limited programming knowlege ( Iknow about
    enough to get myself into trouble) I used an array of avenues to arrive at
    my result including stanadard ACAD variables. Everyone, yourself included
    has been very helpful and I am very thankful. Thanks to our collegues input
    I am happy to report that my endeavor has ended with success.
     
    Nick Fuller, Aug 17, 2004
    #5
  6. Nick Fuller

    TomD Guest

    Good starting point.
    Great ending point. ;)
     
    TomD, Aug 17, 2004
    #6
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.