Jump to content

ghost Blocks


Recommended Posts

I bound (Bind>Insert) some xrefs so they became Blocks; they disappeared from the Xrefs dialog - good - I didn't need to Detach them. Then I Renamed them - but the old names persisted alonside the new names in the Rename dialog. In Purge the old names are also unpurgeable. If I QuickSelect Blocks by the old name, nothing is selected. Should I worry?

Link to comment
Share on other sites

QSELECT doesn't always work well for me. If you like lisp routines, this one will let you know if there is a reference to that block in the file. You just need to change the line "PUT THE BLOCK NAME HERE" with your block name.

 

(defun c:findblock ( / acdoc )
 (setq acdoc (vla-get-activedocument (vlax-get-acad-object)))
 (vlax-for block (vla-get-blocks acdoc)
   (if
     (and
(eq :vlax-false (vla-get-islayout block))
(eq :vlax-false (vla-get-isxref   block))
)
     (vlax-for obj block
(if (vlax-property-available-p obj 'EffectiveName)
	 (if (eq (vla-get-EffectiveName obj) "PUT THE BLOCK NAME HERE")
	   (princ "\nBlock Found!\n") (princ "\nBlock Not Found!\n"))
  
  )
)      
     )
   )
 (vla-regen acdoc acallviewports)
 (princ)
 )

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...