Results 1 to 9 of 9

Thread: Lisp that sends wipeouts to the back of the drawortder inside blocks not working in 2019

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    I could stop if I wanted to jpcadconsulting347236's Avatar
    Join Date
    2011-09
    Posts
    300
    Login to Give a bone
    0

    Default Lisp that sends wipeouts to the back of the drawortder inside blocks not working in 2019

    Hiya gang,

    Lee Mac wrote this lisp for me a while back that send wipeouts inside blocks to th eback of the draworder. It worked great for years and now in AutoCAD 2019, it seems to have stopped working.

    Hopeing somebody can shed some light on this for me.

    Lee Mac's Code:

    Code:
    (defun c:BlockWipeoutToBack (/ acdoc)
      ;; Lee Mac 20.06.11
      (setq acdoc (vla-get-activedocument (vlax-get-acad-object)))
      (vlax-for block (vla-get-blocks acdoc)
        (if
          (and
            (eq :vlax-false (vla-get-islayout block))
            (eq :vlax-false (vla-get-isxref block))
          )
           (
            (lambda (/ lst)
              (vlax-for obj block
                (if (eq "AcDbWipeout" (vla-get-objectname obj))
                  (setq lst (cons obj lst))
                )
              )
              (if lst
                (vla-movetobottom
                  (LM:SortentsTable block)
                  (vlax-make-variant
                    (vlax-safearray-fill
                      (vlax-make-safearray
                        vlax-vbobject
                        (cons 0 (1- (length lst)))
                      )
                      lst
                    )
                  )
                )
              )
            )
           )
        )
      )
      (vla-regen acdoc acallviewports)
      (princ)
    )
    (defun LM:SortentsTable (space / dict result)
      (cond
        (
         (not
           (vl-catch-all-error-p
             (setq result
                    (vl-catch-all-apply
                      'vla-item
                      (list (setq dict (vla-GetExtensionDictionary space))
                            "ACAD_SORTENTS"
                      )
                    )
             )
           )
         )
         result
        )
        ((vla-AddObject dict "ACAD_SORTENTS" "AcDbSortentsTable"))
      )
    )
    (vl-load-com) (princ)
    Last edited by BlackBox; 2019-08-29 at 05:39 PM. Reason: Code formatting
    James Pertusi

    CAD Applications Consultant
    1 (646) 773 4834
    www.jpcadconsulting.com

Similar Threads

  1. 2014: DWG Nested Inside Detail Comp. > Nested Inside Profile > Nested Inside Window
    By edu.rocha.tavares in forum Revit Architecture - Families
    Replies: 5
    Last Post: 2013-11-26, 06:46 PM
  2. Joining Channels to Angles sends components skewing at odd angles. (REVIT Struct 2012)
    By Melissa.Stewart1980 in forum Revit Structure - General
    Replies: 4
    Last Post: 2012-05-25, 05:56 PM
  3. Publishing sends all other windows to background
    By toddbatterman in forum AutoCAD Plotting
    Replies: 1
    Last Post: 2010-01-30, 12:19 AM
  4. Plotting through sheet set-sends 3 drawings and crashes
    By okillham in forum AutoCAD Plotting
    Replies: 2
    Last Post: 2006-04-13, 02:38 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
  •