Author Topic: Block won't purge  (Read 2801 times)

0 Members and 1 Guest are viewing this topic.

Luke

  • Guest
Block won't purge
« on: February 02, 2009, 11:33:54 AM »
I had this issue before and can't remember how to correct it.

I am running a macro on a button to insert a drawing (basically our template).

When I try to purge it tells me that block can not be deleted and therefore I can not re-insert it. 

I think I just need to explode it on insert?
If yes... Can somebody remind me how to do that...

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: Block won't purge
« Reply #1 on: February 02, 2009, 11:55:51 AM »
If the block is in use in the drawing, i.e. it has INSERTS it can not be purged.
You may erase all the INSERTS unless the block is nested within another block.

Have you tried this?
(command "-insert" (strcat blockname "=" filename) nil)
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.

Luke

  • Guest
Re: Block won't purge
« Reply #2 on: February 02, 2009, 12:24:06 PM »
Yes Cab I just did and still not working.

I stated it wrong initially.  I am not trying to purge the block, I just want to be able to re-insert the block at any time (incase if somebody has purged any one item from the drawing)

But it will not let me reinsert because the block already exists (but many of the items have been purged)

dustinthiesse

  • Guest
Re: Block won't purge
« Reply #3 on: February 02, 2009, 12:28:29 PM »
If the block is in use in the drawing, i.e. it has INSERTS it can not be purged.
You may erase all the INSERTS unless the block is nested within another block.

Have you tried this?
(command "-insert" (strcat blockname "=" filename) nil)

Wow.  How did I not know that "nil" would escape from the command like that.
Time to edit my redefine blocks program.  I was inserting the block and then erasing it!   :roll:

Luke

  • Guest
Re: Block won't purge
« Reply #4 on: February 02, 2009, 01:13:45 PM »
got it...  for my particular application a * in front of the file name is what I needed.

CADaver

  • Guest
Re: Block won't purge
« Reply #5 on: February 02, 2009, 10:53:10 PM »
If the block is in use in the drawing, i.e. it has INSERTS it can not be purged.
You may erase all the INSERTS unless the block is nested within another block.

Have you tried this?
(command "-insert" (strcat blockname "=" filename) nil)

Wow.  How did I not know that "nil" would escape from the command like that.
Time to edit my redefine blocks program.  I was inserting the block and then erasing it!   :roll:
(command)

;)