Author Topic: Block problem.  (Read 5168 times)

0 Members and 1 Guest are viewing this topic.

hudster

  • Gator
  • Posts: 2848
Block problem.
« on: September 23, 2004, 06:08:25 AM »
I have a drawing I received from an architect made up entirely of blocks, but even though I've used the Fixblock lisp to move all the entities to layer 0 the original layers still are being referenced by some of the blocks in the drawing.

I've tried to refedit the blocks to change the properties, but the blocks are non-uniformedly scaled so I can't edit them.

I don't want to explode any of the blocks as the drawing then becomes massive and as it's to be used as an Xref on 100's of drawings, I want to keep the size as low as possible.

Anyone have any ideas on how I can get rid of these layers without exploding the blocks?
Revit BDS 2017, 2016, 2015, 2014, AutoCAD 2017, 2016, Navisworks 2017, 2016, BIM360 Glue

CADaver

  • Guest
Re: Block problem.
« Reply #1 on: September 23, 2004, 07:25:28 AM »
Quote from: Hudster
I have a drawing I received from an architect made up entirely of blocks, but even though I've used the Fixblock lisp to move all the entities to layer 0 the original layers still are being referenced by some of the blocks in the drawing.
Could it be that those layers are frozen in some viewport?  If so they won't purge.

hudster

  • Gator
  • Posts: 2848
Block problem.
« Reply #2 on: September 23, 2004, 07:37:36 AM »
I tried that, I've also cut and paste the drawing into a new drawing and deleted all the layout tabs as well and their still there.
Revit BDS 2017, 2016, 2015, 2014, AutoCAD 2017, 2016, Navisworks 2017, 2016, BIM360 Glue

CADaver

  • Guest
Block problem.
« Reply #3 on: September 23, 2004, 08:05:12 AM »
Have you tried SSX to find the offending layers?

or

Copy the drawing to a different name, explode all the blocks and use filter (or SSX) to find the offending elements.

David Bethel

  • Swamp Rat
  • Posts: 656
Block problem.
« Reply #4 on: September 23, 2004, 08:09:04 AM »
If the original block contained an empty named layer, then it will not show up in block table definition.  The layer is therefore referenced and not purgeable.  -David
R12 Dos - A2K

Keith™

  • Villiage Idiot
  • Seagull
  • Posts: 16899
  • Superior Stupidity at its best
Block problem.
« Reply #5 on: September 23, 2004, 08:18:30 AM »
There are a couple of issues ...
1) Are there any old style polylines, if so the seqend entity may be referencing the layer you want to delete.
2) Are there blocks with attributes, if so, the seqend entity may be referencing the layer you want to delete.

If there are not any of these issues, and you suspect a non-uniform scaled block may be the culprit, simply insert that block (at a uniform scale) and refedit that block. When you are done, simply delete the block.

You might try the expresstool "laymrg"
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

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Block problem.
« Reply #6 on: September 23, 2004, 08:49:32 AM »
Could you upload an offending block for us to test? 8)
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.

CADaver

  • Guest
Block problem.
« Reply #7 on: September 23, 2004, 08:57:52 AM »
Quote from: David D Bethel
If the original block contained an empty named layer, then it will not show up in block table definition.  The layer is therefore referenced and not purgeable.  -David


Quote from: Keith
There are a couple of issues ...
1) Are there any old style polylines, if so the seqend entity may be referencing the layer you want to delete.
2) Are there blocks with attributes, if so, the seqend entity may be referencing the layer you want to delete.

If there are not any of these issues, and you suspect a non-uniform scaled block may be the culprit, simply insert that block (at a uniform scale) and refedit that block. When you are done, simply delete the block.

You might try the expresstool "laymrg"


See, I thought FIXBLOCK.LSP fixed all that within the block definitions.  Granted I've never used FIXLOCK, but that was how it was explained to me.

hudster

  • Gator
  • Posts: 2848
Block problem.
« Reply #8 on: September 23, 2004, 09:10:01 AM »
I tried exploding it, and when I did a block appeared called *b17.
This block isn't on the list when you look at the insert block list, I also inserted each block again and refedited each one, and managed to get rid of a few extra layers, but most are still there.  But none of them showed the *b17 block as being a part of them.

I can't upload a copy as the client is quite sensitive about his drawings being issed.
Revit BDS 2017, 2016, 2015, 2014, AutoCAD 2017, 2016, Navisworks 2017, 2016, BIM360 Glue

hudster

  • Gator
  • Posts: 2848
Block problem.
« Reply #9 on: September 23, 2004, 09:52:44 AM »
here is a block that has a layer attached.

I've inserted it, refedited it, exploded all contents, changed them to layer 0, and changed to colour to by block.

When I explode it I can purge the block and the layer it's on.  but when I purge the block the layer called Frame-5 can be purged, this can't be purged till i've exploded the block.

when I try layer merge it gets rid of my layer, but the Frame-5 layer still exists.  When I try to merge that I get a message stating Frame-5 couldn't be purged as an object in the drawing is referencing it.

Any Ideas

I've placed a copy of the file in my folder on the lilly pond, but I'm having problems linking to it at the moment.
Revit BDS 2017, 2016, 2015, 2014, AutoCAD 2017, 2016, Navisworks 2017, 2016, BIM360 Glue

M-dub

  • Guest
Block problem.
« Reply #10 on: September 23, 2004, 09:54:37 AM »
We've had this (or similar at least) problem before and it was due to what you've just mentioned.  Nested blocks...nested three or four fold!  Some people shouldn't be allowed to use CAD!

CADaver

  • Guest
Block problem.
« Reply #11 on: September 23, 2004, 10:35:38 AM »
Quote from: Hudster
here is a block that has a layer attached.

I've inserted it, refedited it, exploded all contents, changed them to layer 0, and changed to colour to by block.

When I explode it I can purge the block and the layer it's on.  but when I purge the block the layer called Frame-5 can be purged, this can't be purged till i've exploded the block.

when I try layer merge it gets rid of my layer, but the Frame-5 layer still exists.  When I try to merge that I get a message stating Frame-5 couldn't be purged as an object in the drawing is referencing it.

Any Ideas

I've placed a copy of the file in my folder on the lilly pond, but I'm having problems linking to it at the moment.


I dunno dude, I just redefined the block (rotating it to 0) using the elements in the drawing and purged layer frame-5 without incident.

You know you can't purge the current layer, right?

CADaver

  • Guest
Block problem.
« Reply #12 on: September 23, 2004, 10:38:05 AM »
Try here

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Block problem.
« Reply #13 on: September 23, 2004, 10:42:33 AM »
Hudster,
Got you block drawing.
This is the only routine I have found so far that works.
It creates a COPY of the block but all to layer 0
Then I deleted the original block & purged all 3 times.
I believe you could use the code here to create a Block
replacement routine to do what you want.

Code: [Select]
;make a copy of a block with a new name
;select block to copy
;enter new name
;pick insertion point
(defun C:CopyBlock2 (/ *error* OldBlockName NewBlockName
    rewind BlockName Info BlockInfo ent_name ent_info)

(defun *error* (Msg)
 (cond
  ((or (not Msg)
       (member Msg '("console break"
                     "Function cancelled"
                     "quit / exit abort"))))
  ((princ (strcat "\nError: " Msg)))
 ) ;cond
 (princ)
) ;end error

  (sssetfirst)
  (setq OldBlockName (entsel "\nSelect Block to copy: "))
  (while
    (or
      (null OldBlockName)
      (/= "INSERT" (cdr (assoc 0 (entget (car OldBlockName)))))
    )
     (princ "\nSelection was not a block - try again...")
     (setq OldBlockName (entsel "\nSelect Block to copy: "))
  )
;block name
  (setq OldBlockName (strcase (cdr (assoc 2 (entget (car OldBlockName))))))
  (princ (strcat "\nSelected block name: " OldBlockName))
  (setq NewBlockName (getstring T "\nEnter new block name: "))
  (setq rewind T)
  (while (setq Info (tblnext "BLOCK" rewind))
    (setq BlockName (strcase (cdr (assoc 2 Info))))
    (if (= OldBlockName BlockName)
      (setq BlockInfo Info)
    )
    (setq rewind nil)
  )
  (if BlockInfo
    (progn
      (setq ent_name (cdr (assoc -2 BlockInfo)))
;header definition:
      (entmake (list '(0 . "BLOCK")
      (cons 2 NewBlockName)
     '(70 . 2)
      (cons 10 '(0 0 0))
       )
      )
;body definition:
      (entmake (cdr (entget ent_name)))
      (while (setq ent_name (entnext ent_name))
 (setq ent_info (cdr (entget ent_name)))
 (entmake ent_info)
      )
;footer definition:
      (entmake '((0 . "ENDBLK")))
     (command "-INSERT" NewBlockName pause "1" "1" "0")
    )
  )
 (*Error* nil)
 (princ)
) ;end
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.

Andrea

  • Water Moccasin
  • Posts: 2372
Block problem.
« Reply #14 on: September 23, 2004, 11:03:38 AM »
did you tied..

XPLODE or BURST ??
Keep smile...