+ Reply to Thread
Results 1 to 3 of 3
  1. #1
    Forum Newbie
    AutoCAD 2015
    Join Date
    Jun 2014

    Default New layout reactor

    Registered forum members do not see this ad.

    I have problem with command reactor. I want to dress up (add some blok, put viewport in specific layer) all new layouts created by command „layout“ with option „New“ or the „plus“ icon in layout list panel. How can I find out the event (new layout) is occured? And how can I get reference to this new layout? Any ideas? Command ended reactor to command "LAYOUT" fires everytime even the new layout is not created.

    Thanks for help and I'am sorry for my english


  2. #2
    Quantum Mechanic Lee Mac's Avatar
    Computer Details
    Lee Mac's Computer Details
    Operating System:
    Win 7 Pro / Win 10 Pro / Linux Mint
    Lee Mac's Discipline Details
    Custom Programming / Software Customisation
    AutoCAD 2018
    Join Date
    Aug 2008
    London, England


    To reduce the number of times the callback function is evaluated, you could alternatively use a vlr-miscellaneous-reactor with a callback function evaluated on the :vlr-layoutswitched event. This event passes the layout name as an argument to the callback function which you can use to retrieve the appropriate Layout object from the Layouts collection.
    Lee Mac ProgrammingTwitterExchange App StoreDropbox (500MB free)

    With Mathematics there is the possibility of perfect rigour, so why settle for less?

  3. #3
    Super Member
    not applicable
    Join Date
    Jun 2016


    Registered forum members do not see this ad.

    If you want to stick with a command reactor you can compare the new (layoutlist) against the stored previous version to determine if a new layout has been created.
    As an alternative I would first look at using the :vlr-objectappended event of the vlr-acdb-reactor.
    BricsCAD 18

Similar Threads

  1. Reactor Mod
    By PDuMont in forum AutoLISP, Visual LISP & DCL
    Replies: 6
    Last Post: 4th Aug 2016, 11:29 am
  2. help with reactor
    By Coder in forum AutoLISP, Visual LISP & DCL
    Replies: 5
    Last Post: 1st Aug 2014, 10:08 am
  3. Need help in reactor
    By prakashreddy in forum AutoLISP, Visual LISP & DCL
    Replies: 7
    Last Post: 19th Mar 2013, 07:19 am
  4. vlr-dwg-reactor or vlr-docmanager-reactor
    By lfe011969 in forum AutoLISP, Visual LISP & DCL
    Replies: 16
    Last Post: 23rd Dec 2010, 01:45 pm
  5. Pan reactor
    By sidharth in forum AutoLISP, Visual LISP & DCL
    Replies: 0
    Last Post: 18th Dec 2009, 09:04 am

Tags for this Thread


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts