adding code to layout tabs

Discussion in 'AutoCAD' started by dc, May 18, 2004.

  1. dc

    dc Guest

    hello group,
    is there a way i can add code to a layout tab ?

    what i would like to do is click on a tab (eg. walls) and the layer dim
    style would change to walls.

    i have made custom buttons to acheve this but my mouse just keeps going to
    the layout tabs.

    TIA
    Dave
     
    dc, May 18, 2004
    #1
  2. dc

    Daron Denton Guest

    how about a reactor?


    (defun LAYOUTSWITCHED (reactor LAYOUT )
    (cond
    ((= (nth 0 LAYOUT) "Model")
    ;..do model stuff
    (alert (nth 0 LAYOUT))
    )
    ((= (nth 0 LAYOUT) "Walls")
    ;..do wall stuff
    (alert (nth 0 LAYOUT))
    )
    (t
    ;..do "unknown layout" stuff
    (alert (nth 0 LAYOUT))
    )
    )
    )

    (if (not LAYOUTSWITCH)
    (setq LAYOUTSWITCH (VLR-Miscellaneous-Reactor nil '(:)VLR-layoutSwitched .
    LAYOUTSWITCHED))))
    )


    load these, then select your layout tabs.
    daron
     
    Daron Denton, May 18, 2004
    #2
  3. dc

    dc Guest

    thanks for the reply
    looks a bit over my head,
    I know very very little lisp, just getting my head around VBA.
    I'll look at your post and see if I can make since of it.

    ounce again, thanks
    Dave
     
    dc, May 18, 2004
    #3
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.