Jump to content
sarah.casey@ffeconsulting.

Redefining Blocks when inserting into a drawing from a block library.

Recommended Posts

sarah.casey@ffeconsulting.

Hi all,

 

If I edit a block definition in one file, is it possible to update all instances of the block in another file?  I have tried to insert my updated block definition into another file where the block is used multiple times, but it just inserts it as the old definition in that drawing.  Can I redefine the block and replace all instances of it with the new updated version?

 

trying to find a productive workflow that doesn't make me want to pull my hair out!  thanks in advance.

 

SC

Share this post


Link to post
Share on other sites
ReMark

It's possible if the block in question was xreffed into the drawing then it would update automatically.  Correct me if I am wrong but it sounds like both the old block and the new version of it carry the exact same name.  Is that correct?

Share this post


Link to post
Share on other sites
CyberAngel

Have you tried using the Design Center? This page tells you how to do it.

 

If that doesn't solve your issue, please elaborate.

Share this post


Link to post
Share on other sites
maratovich
4 hours ago, sarah.casey@ffeconsulting. said:

trying to find a productive workflow that doesn't make me want to pull my hair out!  thanks in advance.

 

Are you inserting one block or many different ones?
Do you want to combine two different drawings with many blocks, but the blocks are different? Are there many such drawings?

Share this post


Link to post
Share on other sites
sarah.casey@ffeconsulting.

Hi,

 

I have realized my error in that I had forgotten about the 'write block' command which I was taught in my CAD training course.  I was simply saving all my blocks in a single drawing file that i called my library and then accessing them via the Design Centre. This was a work around that i had unfortunately fallen into using from the beginning when I first started working in CAD.

 

The problem with doing this is that any updates I make to the blocks in my library are not maintained when inserting the block into another drawing file where the block already exists (yes- the block with the same name).  Using WBlock command I am able to save each block as its own individual drawing file and then when I make changes to the original definition of the block (the file that I saved using Wblock command) I get the prompt asking me if i want to 'redefine the block' when I go to insert it into one of my drawings where it already exists.

 

'Write block' appears to be essential when managing a block library!  Annoying that you don't get the prompt to redefine the block every time you paste/ insert one from any file though.

Share this post


Link to post
Share on other sites
tombu
4 hours ago, sarah.casey@ffeconsulting. said:

Hi,

I have realized my error in that I had forgotten about the 'write block' command which I was taught in my CAD training course.  I was simply saving all my blocks in a single drawing file that i called my library and then accessing them via the Design Centre. This was a work around that i had unfortunately fallen into using from the beginning when I first started working in CAD.

 

The problem with doing this is that any updates I make to the blocks in my library are not maintained when inserting the block into another drawing file where the block already exists (yes- the block with the same name).

Did you look at the post by CyberAngel? 

Design Center is a lot easier for updating blocks.

Share this post


Link to post
Share on other sites
ammobake

It is also possible to insert blocks into your drawing using block definitions from a different DWG using the BLOCKSPALETTE. (you would click "other drawing" tab, browse "..." button, and point to the drawing u want to show the blocks for).

 

Both drawings would then be using the same reference.

 

Redefining your existing blocks using the aforementioned design center option is a sound method though.

 

-Chris

Share this post


Link to post
Share on other sites
sarah.casey@ffeconsulting.

Hi, I'm not sure what the design centre has to do with it? The process/ command that enabled me to redefine the blocks was Wblock (write block).  I could then insert the blocks using the 'insert block' command where I was then prompted to say whether i wanted to redefine it.  Honestly don't know what the design centre has to do with it, wasnt it the fact that I used Wblock the reason I was able to redefine them??

Share this post


Link to post
Share on other sites
ammobake

It allows u to redefine your block definitions in the current drawing.

 

But if u want to insert new blocks using block definitions in other drawings, the BLOCKSPALETTE command does work fine.

 

-ChriS

Share this post


Link to post
Share on other sites
tombu
12 minutes ago, sarah.casey@ffeconsulting. said:

Hi, I'm not sure what the design centre has to do with it? The process/ command that enabled me to redefine the blocks was Wblock (write block).  I could then insert the blocks using the 'insert block' command where I was then prompted to say whether i wanted to redefine it.  Honestly don't know what the design centre has to do with it, wasnt it the fact that I used Wblock the reason I was able to redefine them??

Did you look at the post by CyberAngel? 

Design Center is a lot easier for updating blocks.

Did you watch the video? https://knowledge.autodesk.com/support/autocad/learn-explore/caas/screencast/Main/Details/d849d66f-da04-4266-ae75-7ccef1af984b.html

They selected Insert & Redefine but selecting Redefine is all you would need.

Share this post


Link to post
Share on other sites
sarah.casey@ffeconsulting.
35 minutes ago, ammobake said:

It allows u to redefine your block definitions in the current drawing.

 

But if u want to insert new blocks using block definitions in other drawings, the BLOCKSPALETTE command does work fine.

 

-ChriS

Isn't that the same as editing the block definition in block editor?

Share this post


Link to post
Share on other sites
ammobake

Not quite.  BLOCKSPALETTE command opens up it's own user interface. 

You can then select other DWG's and use those block references (as a more intuitive approach).

 

For every block associated with a given DWG  (with a unique block reference) it will give u a preview of the block in a window.

It's one click to select the block u want and insert it.  And u can specify additional insertion options like scale, rotation, etc..

 

-ChriS

Share this post


Link to post
Share on other sites
CyberAngel

It might help if we had more information about what you want to do, what you've tried already, and what results you got.

Share this post


Link to post
Share on other sites
tombu

I like the BLOCKSPALETTE enough to add it's ribbon toggle to my QAT.

I don't like that INSERT was changed to do the same thing forcing me to use CLASSICINSERT to insert a drawing.

New features are welcome when they don't interfere with features folk have been using for over a quarter century.

 

Lisp I wrote many years ago to update a selected block. Still works and is still in my [Block Reference Object Menu] shortcut menu but I use DC more now.

If the block drawing can be found in the support path it's updated automatically otherwise a file dialog is opened for the user to find and select it.

;;; BlkUpdate.LSP   Update block by pick.
;;; Redo insert from updated drawing file.
;;; BY: TOM BEAUFORD
;;; BeaufordT@leoncountyfl.gov
;;; LEON COUNTY PUBLIC WORKS ENGINEERING SECTION
;==================================================================
(defun C:BlkUpd (/ oldcmd ss elist blkname ffname str1)
  (setq oldcmd (getvar "CMDECHO"))
  (setvar "CMDECHO" 0)
  (setq ss (ssget "+.:E:S" '((0 . "INSERT")))
            elist (entget(ssname SS 0))
  )
  (if (= (cdr (assoc 0 elist)) "INSERT")
    (progn
      (setq blkname (cdr(assoc 2 elist)))
      (setq ffname (findfile (strcat blkname ".dwg")))
      (if ffname
        (progn
          (princ (strcat "\nReplace with=" ffname))
          (setq str1 (getstring " <Yes>"))
        );_ end of progn
      );_ end of if
      (if str1
        (if (= "N" (strcase (substr str1 1 1)))
            (setq str1 nil)
        )
      )
      (if str1
        (progn
          (command "INSERT" (strcat blkname "=" ffname)(command))
          (princ (strcat "\n" blkname " Reinserted."))
        );_ end of progn
        (progn
          (princ (strcat "\nSelect " blkname " file to reinsert."))
          (command "INSERT" (strcat blkname "=~")(command))
        );_ end of progn
      );_ end of if
    );_ end of progn
    (princ "\nObject is not a block!")
  );_ end of if
  (setvar "CMDECHO" oldcmd)
  (princ)
) ;_ end of defun

 

Share this post


Link to post
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
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  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...