Poll

Would this be helpful to you???

Yes
6 (75%)
No
2 (25%)

Total Members Voted: 2

Voting closed: February 08, 2005, 10:32:27 AM

Author Topic: Burst Probelm...any solution would be nice...  (Read 6382 times)

0 Members and 1 Guest are viewing this topic.

AVCAD

  • Guest
Burst Probelm...any solution would be nice...
« on: February 08, 2005, 10:32:27 AM »
Well I have searched the Forum and searched some more....no solution is avialble for this.

I have found many posts asking about it but no one has attended to it. I would but I have no clue how to do it  :?

I think An edited version of the Autocad suppled Busrt.lsp file would do it. One that allows a user to call it from a LSP file. So that if the LISP is loaded you can just use the defun command for it instead of using the (c:burst) which really does nothing, casue it pauses the command and waits for input.

Anyone please?!? I have a routine all set up to clean my drawings but I need BURST to work or it is usless...

Thanks in advance.

David Hall

  • Automatic Duh Generator
  • King Gator
  • Posts: 4075
Burst Probelm...any solution would be nice...
« Reply #1 on: February 08, 2005, 10:56:15 AM »
so what you need is Burst all programmed?
Everyone has a photographic memory, Some just don't have film.
They say money can't buy happiness, but it can buy Bacon and that's a close second.
Sometimes the question is more important than the answer. (Thanks Kerry for reminding me)

Mark

  • Custom Title
  • Seagull
  • Posts: 28762
Burst Probelm...any solution would be nice...
« Reply #2 on: February 08, 2005, 11:15:06 AM »
Is this what you have in mind?
Code: [Select]


(defun myburst (ss / obj i)
  (if (and (eq 'pickset (type ss)) (< 0 (sslength ss)))
    (repeat
      (setq i (sslength ss))
      (if
        (vlax-method-applicable-p
          (setq obj
                (vlax-ename->vla-object
                  (ssname ss
                          (setq i (1- i))
                          )
                  )
                )
          'Explode
          )
        (progn
          (vla-explode obj)
          (vla-delete obj)
          )
        )
      )
    )
  )


;; example
;; (myburst (ssget))
TheSwamp.org  (serving the CAD community since 2003)

Mark

  • Custom Title
  • Seagull
  • Posts: 28762
Burst Probelm...any solution would be nice...
« Reply #3 on: February 08, 2005, 12:57:03 PM »
This seems to work well also.   :D
Code: [Select]

(vl-cmdf "_explode" (ssget) "")
TheSwamp.org  (serving the CAD community since 2003)

whdjr

  • Guest
Burst Probelm...any solution would be nice...
« Reply #4 on: February 08, 2005, 01:07:32 PM »
Why can't you just issue (c:burst) in your routine or is the prompt after messing you up?

Post your code if you dare :)  so we can have a look.

MP (not logged in)

  • Guest
Burst Probelm...any solution would be nice...
« Reply #5 on: February 08, 2005, 01:07:59 PM »
If I understand the original poster's request I believe he is looking for a callable function, say (defun burst (ss) ...) that replicates what c:burst does, namely creating text objects to inherit the current values and properties for attributes hosted in the blocks being exploded, rather than reverting to the attdefs that reside in the block definitions. Easily done, though I personally don't have the time to roll it up; sorry. Then again I have been wrong so many times, so ignore me ...

Mark

  • Custom Title
  • Seagull
  • Posts: 28762
Burst Probelm...any solution would be nice...
« Reply #6 on: February 08, 2005, 01:23:56 PM »
I'm gonna say you're right MP, I had 'explode' stuck in my mind for some reason.   OOP's!!
TheSwamp.org  (serving the CAD community since 2003)

Jeff_M

  • King Gator
  • Posts: 4096
  • C3D user & customizer
Re: Burst Probelm...any solution would be nice...
« Reply #7 on: February 08, 2005, 01:49:02 PM »
Quote from: AVCAD

Anyone please?!? I have a routine all set up to clean my drawings but I need BURST to work or it is usless...
Thanks in advance.

So do you want Burst to burst everything then? If that's the case, it's an easy mod to the Burst.lsp file:
Near the end of the code is this line:
(Setq SS1 (SsGet (list (cons 0 "INSERT")(cons 67 PSFLAG))))
If that is changed to:
(Setq SS1 (SsGet "X" (list (cons 0 "INSERT")(cons 67 PSFLAG))))

It will select all blocks in the current Layout without any user interaction.

whdjr

  • Guest
Burst Probelm...any solution would be nice...
« Reply #8 on: February 08, 2005, 03:06:02 PM »
ahwuwuuu...I'm tellin... :shock: :?

 :wink:  :lol:

AVCAD

  • Guest
Burst Probelm...any solution would be nice...
« Reply #9 on: February 08, 2005, 03:19:24 PM »
OK I got it tro run but know the LSP file stops afte rthe burst comand and doesnt go any further???

Here is what I got....

Code: [Select]


(defun C:XREFCLN ()

(COMMAND "-LAYER" "THAW" "0" "SET" "0" "")
(COMMAND "-LAYER" "UNLOCK" "*" "")
(COMMAND "LTSCALE" "1" "")
(COMMAND "IMAGEFRAME" "OFF" "")
(COMMAND "-IMAGE" "D" "*")
(COMMAND "-XREF" "D" "*" "")
(COMMAND "AUDIT" "Y" "")
(COMMAND "AUDIT" "Y" "")
(COMMAND "AUDIT" "Y" "")
(COMMAND "AUDIT" "Y" "")
(COMMAND "-XREF" "D" "*" "")
(COMMAND (C:myBURST))
(COMMAND (C:myBURST))
(COMMAND (C:myBURST))
(COMMAND (C:NUKE))
(COMMAND "CHPROP" "ALL" "" "C" "BYLAYER" "LW" "BYLAYER" "")
(COMMAND "-LAYER" "C" "8" "*" "LW" "DEFAULT" "*" "")
(COMMAND "-LAYOUT" "D" "")
(COMMAND "-LAYOUT" "D" "")
(COMMAND "-LAYOUT" "D" "")
(COMMAND "-LAYOUT" "D" "")
(COMMAND "-LAYOUT" "D" "")
(COMMAND (C:LFD))
(COMMAND (C:PSD))
(COMMAND "-PURGE" "ALL" "" "N")
(COMMAND "ZOOM" "E")
(COMMAND "REGENALL")

  (princ "\nDrawing is now Cleaned for SMW, Please make sure layers and colors are correct")
  (princ)
)

Mark

  • Custom Title
  • Seagull
  • Posts: 28762
Burst Probelm...any solution would be nice...
« Reply #10 on: February 08, 2005, 03:37:16 PM »
Three things.

1) the function I wrote "myburst" doesn't do the same thing as the ET "burst" does.

2) if you're using my function "myburst" you need to supply it with a sset.

3) you'd also call my function without the 'c:'

If you're not using my function.............  :roll:
TheSwamp.org  (serving the CAD community since 2003)

ronjonp

  • Needs a day job
  • Posts: 7529
Burst Probelm...any solution would be nice...
« Reply #11 on: February 08, 2005, 04:03:06 PM »
AVCAD,

I do something very similar to base files with 2 steps:

Run:

Code: [Select]
;Redefines ALL objects in any block in the drawing on layer 0.
;(c)Jay Garnett (email jgarnett@enteract.com) Written 1/14/97
;web page http://www.enteract.com/~jgarnett/lispfactory.htm
;Updated 1/25/97 - added select mode
;
;NUKE.LSP redefines all objects in a block on layer 0, with color and linetype
;set to BYLAYER.  NUKED blocks will then take on the properties of the layer
;that they are inserted on. The routine works by modifing objects in the block table,
;so the blocks never have to be exploded.
;
;The global method redefines ALL objects in every block in the current drawing,
;except dimensions, hatching or xrefs, even if they are on a layer that is
;frozen or turned off.
;
;The select method redefines blocks selected with any standard selection method,
;as well as any blocks nested in the selected block(s).

(defun To-0 (BLCK / BNAME BLIST E EDATA SPIN TMP)

;;; Prints a pinwheel on the command line
  (defun Spin ()
    (setq SYM
  (cond
    ((= SYM nil) "-")
    ((= SYM "-") "\\")
    ((= SYM "\\") "|")
    ((= SYM "|") "/")
    ((= SYM "/") "-")
  )
    )
    (princ (strcat "\rScanning... "
  SYM
  "                                    "
  )
    )
  ) ;end spin

  (if (= (type BLCK) (read "LIST"))
    (setq TMP (car BLCK)
 BLIST (cdr BLCK)
 BLCK TMP
 TMP nil
    )
  )
  (setq BLCK (tblsearch "BLOCK" BLCK))
  (if
    (and
      (/= (logand (cdr (assoc 70 BLCK)) 4) 4) ;skips xrefs
    ) ;and
     (progn
       (setq E (cdr (assoc -2 BLCK)))
       (while E
(if (= (cdr (assoc 0 (entget E))) "INSERT")
;If the object is a block
  (progn
    (setq BNAME (cdr (assoc 2 (entget E))))
;save the name to a list
    (if (not (member BNAME BLIST))
      (if (not BLIST)
(setq BLIST (list BNAME))
;create the list if it doesn't exist
(setq BLIST (append BLIST (list BNAME)))
      ) ;if
    ) ;if
  ) ;progn      
) ;if
(setq EDATA (entget E))
(if (assoc 62 EDATA) ;Resets object color to BYLAYER if it isn't.
  (setq EDATA (subst (cons 62 256) (assoc 62 EDATA) EDATA))
) ;if
(if (assoc 6 EDATA) ;Resets object linetype to BYLAYER if it isn't.
  (setq EDATA (subst (cons 6 "BYLAYER") (assoc 6 EDATA) EDATA))
) ;if
(setq EDATA (subst (cons 8 "0") (assoc 8 EDATA) EDATA))
;changes layer to 0
(entmod EDATA) ;updates entity
(setq E (entnext E)) ;get next enitiy, nil if end of block
(Spin)
       ) ;end while E
     ) ;progn
  ) ;if
  BLIST ; returns names of any nested blocks
) ;defun


(defun C:NUKE (/ BLK_NM)
  (command "._undo" "m")
;global nuke
  (while (setq BLK_NM (tblnext "BLOCK" (null BLK_NM)))
    (TO-0 (cdr (assoc 2 BLK_NM)))
  ) ;while
  (command "._regen")
  (princ "\rFinished                  ")
  (princ)
) ;defun
(prompt "\nNUKE loaded.")
(princ)


Then I made a button:
Code: [Select]
^C^C-layer;color;8;*;;^C^C_ai_selall;chprop;c;bylayer;;

I have been using Keith's endit.lsp for purging:

Quote
(defun C:ENDIT (/ expert cmdecho)
  (Princ "\n   ***ALL - Named Views, Layer Group Filters, Layer Property Filters,
       Layer States, Registered Applications, Pagesetups, Groups are GONE!!!***")
  (Princ "\n============================================================================")
  (Princ "\n   ***IMPORTANT - You must close drawing right now WITHOUT saving changes
       and reopen to complete purge.***")
  (Princ "\n============================================================================")
(princ)
 (setq   expert   (getvar "EXPERT")
   cmdecho   (getvar "CMDECHO")
  )
  (setvar "EXPERT" 5)
  (setvar "CMDECHO" 0)
  (command "-wblock"
      (strcat (getvar "dwgprefix") (getvar "dwgname"))
      "*"
  )
  (setvar "EXPERT" expert)
  (setvar "CMDECHO" cmdecho)
)



Ron

Windows 11 x64 - AutoCAD /C3D 2023

Custom Build PC

AVCAD

  • Guest
Burst Probelm...any solution would be nice...
« Reply #12 on: February 08, 2005, 05:40:09 PM »
Mark, I am not using your option I jsut named it the same I actually used Jeff M's option of changing the code to

(Setq SS1 (SsGet "X" (list (cons 0 "INSERT")(cons 67 PSFLAG))))

it just runs the normal Burst command but selects everything with out having to do anything.

.........

I use that Nuke.lsp too I think I actually got it form you.  :D  Thnx!

It doesnt how ever work on Proxy Images.....I dont think Anything does!! except explode  :twisted:

Anyone know why it stops in the moddle of teh process

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Burst Probelm...any solution would be nice...
« Reply #13 on: February 08, 2005, 05:51:51 PM »
Quote from: whdjr
ahwuwuuu...I'm tellin... :shock: :?

 :wink:  :lol:

smart a$$$$$ :D
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

Jeff_M

  • King Gator
  • Posts: 4096
  • C3D user & customizer
Burst Probelm...any solution would be nice...
« Reply #14 on: February 08, 2005, 07:43:58 PM »
I'm not sure, but I think your problem stems from calling the lisp routines with COMMAND. In place of this:
Code: [Select]
(COMMAND (C:myBURST))
(COMMAND (C:NUKE))

Try this:
Code: [Select]
(C:myBURST)
(C:NUKE)


And.....are you sure it has 'stopped'? If there are a lot of blocks then bursting them may take some time......