Author Topic: how to prevent explode a block?  (Read 3771 times)

0 Members and 1 Guest are viewing this topic.

sena

  • Guest
how to prevent explode a block?
« on: November 05, 2007, 11:19:47 PM »
After insert a block,I want not explode it by a lisp function?but ,i don't ,would you help me?
Thanks.

rude dog

  • Guest
Re: how to prevent explode a block?
« Reply #1 on: November 06, 2007, 12:48:51 AM »
I have never used it but read this post
http://discussion.autodesk.com/thread.jspa?threadID=481228

TimSpangler

  • Water Moccasin
  • Posts: 2010
  • CAD Naked!!
Re: how to prevent explode a block?
« Reply #2 on: November 06, 2007, 07:13:06 AM »
You could possibley make it a dynamic block with a point parameter.  Then in the block properties you can make it non explodable.
ACA 2015 - Windows 7 Pro
All Comments and Content by TimSpangler, Copyright © 2016

SomeCallMeDave

  • Guest
Re: how to prevent explode a block?
« Reply #3 on: November 06, 2007, 08:16:02 AM »
If you are using 2007 or above  (I'm not sure which other versions it works with), you can set the 280 value of the block table record to control explodibility

Code: [Select]
(defun dkb_setexplode(pBlockName pExplodableIfOne / a b c d e ); second argument 0=non-explodable 1=exploxable
   (setq a (tblobjname "block" pBlockName)
         b (entget a)
         c (cdr (assoc 330 b))
         d (entget c)
         e (subst (cons 280 pExplodableIfOne) (assoc 280 d) d)
   );setq
   (entmod e)
   (prin1)
)


Use at your own risk
« Last Edit: November 06, 2007, 08:17:06 AM by SomeCallMeDave »

sena

  • Guest
Re: how to prevent explode a block?
« Reply #4 on: November 06, 2007, 09:01:58 AM »
Thank you very much , SomeCallMeDave ! you are right! It's simple,I agree:-)

GDF

  • Water Moccasin
  • Posts: 2081
Re: how to prevent explode a block?
« Reply #5 on: November 06, 2007, 10:48:19 AM »
However if you saveas dxf version 12 and the reinsert the saved block, that will strip away the non explodability.

We use the free deter.vlx routine from dotsoft.com. (which will stop most users from exploding the block)

Gary
Why is there never enough time to do it right, but always enough time to do it over?
BricsCAD 2020x64 Windows 10x64

ronjonp

  • Needs a day job
  • Posts: 7529
Re: how to prevent explode a block?
« Reply #6 on: November 06, 2007, 10:58:07 AM »

Windows 11 x64 - AutoCAD /C3D 2023

Custom Build PC

LE

  • Guest
Re: how to prevent explode a block?
« Reply #7 on: November 06, 2007, 11:14:56 AM »
Not that I am against any great routine or code by some masters - outside the swamp, and I know their solutions are in most cases valid.

But, I guess or think that we [as swampers] need to promote what we do here and provide also for free - that, in some way will encourage to continue providing better solutions or updating what it is available here in our site - ...

And again, I am not against any other outside solution at all.

Just my two pesos....

LE

  • Guest
Re: how to prevent explode a block?
« Reply #8 on: November 06, 2007, 11:18:58 AM »
also, promoting sites or people for free, that does not provide any help here... I will prefer to avoid that.... just my poor opinion....

just my another two pesos....