Author Topic: [Community Project] Clean Drawing Program  (Read 19878 times)

0 Members and 1 Guest are viewing this topic.

VVA

  • Newt
  • Posts: 166
Re: [Community Project] Clean Drawing Program
« Reply #45 on: March 29, 2015, 05:50:06 PM »
Some more offers
1.Remove DATALINK, DGNLINESTYLECOMP, VBA dictionary
Code: [Select]
(VL-CATCH-ALL-APPLY
   '(lambda()
 (mapcar '(lambda(x)
      (dictremove (namedobjdict) x)
           )
        '(
        "ACAD_DATALINK" 
        "ACAD_DGNLINESTYLECOMP" 
         "ACAD_VBA"
          )
        )
      )
   )
2. Removes the history from 3D solid primitives (_brep _all)
get from kpblc
Code: [Select]
(vlax-for blk_def (vla-get-blocks adoc)
        (if (equal (vla-get-isxref blk_def) :vlax-false)
          (vlax-for subent blk_def
            (if (= (vla-get-objectname subent) "AcDb3dSolid")
              (setq ent_lst (cons (vlax-vla-object->ename subent) ent_lst))
              ) ;_ end of if
            ) ;_ end of vlax-for
          ) ;_ end of if
        ) ;_ end of vlax-for
      (foreach ent ent_lst
        (if (and (cdr (assoc 350 (entget ent)))
                 (not (vl-catch-all-error-p
                        (vl-catch-all-apply
                          (function
                            (lambda () (entget (cdr (assoc 350 (entget ent)))))
                            ) ;_ end of function
                          ) ;_ end of vl-catch-all-apply
                        ) ;_ end of vl-catch-all-error-p
                      ) ;_ end of not
                 (entget (cdr (assoc 350 (entget ent))))
                 ) ;_ end of and
          (entdel (cdr (assoc 350 (entget ent))))
          ) ;_ end of if
        ) ;_ end of foreach

ronjonp

  • Needs a day job
  • Posts: 7527
Re: [Community Project] Clean Drawing Program
« Reply #46 on: March 29, 2015, 07:42:54 PM »
My take is if you're cleaning up files for internal use ( background ) .. Blast the smithereens out of them. ;) .  if you're sharing use caution.

Windows 11 x64 - AutoCAD /C3D 2023

Custom Build PC

Keith™

  • Villiage Idiot
  • Seagull
  • Posts: 16899
  • Superior Stupidity at its best
Re: [Community Project] Clean Drawing Program
« Reply #47 on: March 30, 2015, 01:16:30 PM »
My take is if you're cleaning up files for internal use ( background ) .. Blast the smithereens out of them. ;) .  if you're sharing use caution.

I agree 82.5% mainly because it really depends upon why you are sharing the drawings.

Again, everything I do is 2D plan view ... I remove everything that isn't absolutely necessary for the user to actually see the layout of the plans.
Proud provider of opinion and arrogance since November 22, 2003 at 09:35:31 am
CadJockey Militia Field Marshal

Find me on https://parler.com @kblackie