Results 1 to 4 of 4

Thread: Reactors? Trying to change LTScale when closing. - Help Please?

  1. #1
    I could stop if I wanted to
    Join Date
    2015-12
    Posts
    385
    Login to Give a bone
    0

    Default Reactors? Trying to change LTScale when closing. - Help Please?

    Hello all,
    Our company's toolbar uses the LTSCALE (LTS) in many of the macros and lsps for block insertion scale.
    Unfortunately this means we have to use a LTS for designing and change the LTS before plotting.

    I think I will eventually change the many macros and lsps they have ti use Dimscale, however this is not an option for today.

    I am unfamiliar with reactors and just want to write a reactor that changes the LTS do 1 as we close the DWG.

    Thanks all,
    Andre

  2. #2
    Administrator BlackBox's Avatar
    Join Date
    2009-11
    Posts
    5,719
    Login to Give a bone
    0

    Default Re: Reactors? Trying to change LTScale when closing. - Help Please?

    Quote Originally Posted by ReachAndre View Post
    Hello all,
    Our company's toolbar uses the LTSCALE (LTS) in many of the macros and lsps for block insertion scale.
    Unfortunately this means we have to use a LTS for designing and change the LTS before plotting.

    I think I will eventually change the many macros and lsps they have ti use Dimscale, however this is not an option for today.

    I am unfamiliar with reactors and just want to write a reactor that changes the LTS do 1 as we close the DWG.
    Is simply restoring LTSCALE == 1.0 at drawing open via AcadDoc.lsp an option by chance?



    Separately, instead of using DIMSCALE, consider using CANNOSCALEVALUE sysvar, to replace LTSCALE. As a best practice, your customizations should be first storing the current LTSCALE value, prior to changing it, and then restoring said value when done.

    Cheers
    Last edited by BlackBox; 2014-08-12 at 07:50 PM.
    "How we think determines what we do, and what we do determines what we get."

    Sincpac C3D ~ Autodesk Exchange Apps

    Computer Specs:
    Dell Precision 3660, Core i9-12900K 5.2GHz, 64GB DDR5 RAM, PCIe 4.0 M.2 SSD (RAID 0), 16GB NVIDIA RTX A4000

  3. #3
    Administrator BlackBox's Avatar
    Join Date
    2009-11
    Posts
    5,719
    Login to Give a bone
    0

    Default Re: Reactors? Trying to change LTScale when closing. - Help Please?

    Here's a command reactor I slapped together; modify as needed:

    Code:
    (vl-load-com)
    
    (defun Reactor:Start ()
      (or *Reactor*
          (setq *Reactor*
                 (vlr-command-reactor
                   nil
                   '(
                     (:vlr-commandWillStart . Callback:CommandWillStart)
                    )
                 )
          )
      )
    )
    
    (defun Callback:CommandWillStart (rea cmd)
      (if (wcmatch (strcase (car cmd)) "SAVE*")
        (progn
          (prompt "\nLTSCALE set to ")
          (princ (setvar 'ltscale 1.0))
        )
      )
    )
    
    (Reactor:Start)
    (princ)
    "How we think determines what we do, and what we do determines what we get."

    Sincpac C3D ~ Autodesk Exchange Apps

    Computer Specs:
    Dell Precision 3660, Core i9-12900K 5.2GHz, 64GB DDR5 RAM, PCIe 4.0 M.2 SSD (RAID 0), 16GB NVIDIA RTX A4000

  4. #4
    I could stop if I wanted to
    Join Date
    2015-12
    Posts
    385
    Login to Give a bone
    0

    Default Re: Reactors? Trying to change LTScale when closing. - Help Please?

    Quote Originally Posted by BlackBox View Post
    Is simply restoring LTSCALE == 1.0 at drawing open via AcadDoc.lsp an option by chance?
    I thought of this but the idea was so that if we plot from SheetSetManager, the drawings would always be saved with the LTScale as desired.

    Quote Originally Posted by BlackBox View Post
    Separately, instead of using DIMSCALE, consider using CANNOSCALEVALUE sysvar
    I will take this under advisement.

    Thanks for the help, I will test the code shortly,
    Andre

Similar Threads

  1. Can someone help me with reactors?
    By ReachAndre in forum AutoLISP
    Replies: 5
    Last Post: 2014-05-28, 03:02 PM
  2. Replies: 7
    Last Post: 2009-09-24, 02:57 PM
  3. need some help with reactors
    By darren_lambett in forum AutoLISP
    Replies: 1
    Last Post: 2009-04-20, 12:31 PM
  4. Change LTSCALE of All Objects Through Property Palette
    By autocad.wishlist1734 in forum AutoCAD Wish List
    Replies: 0
    Last Post: 2007-06-22, 02:52 PM
  5. Can this be done with reactors?
    By kieren in forum AutoLISP
    Replies: 5
    Last Post: 2004-10-06, 03:43 PM

Posting Permissions

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