Jump to content

Recommended Posts

Posted

Hello all,

 

I was wondering if there was an easy way to change one type of block that's already inserted into a drawing into a different block entirely. I know how to modify the block file, so it adjusts on your drawing, but I need to keep that file exactly the way it is. Let me know if this doesn't make any sense!

 

Thank you,

 

Kat

Posted

You could run this in a script:

 

(defun blockredefinerthingymabob
      (blocknametoredefine fullpathofnewblock)
 (if (tblobjname "block" blocknametoredefine)
   (command ".-insert"
        (strcat blocknametoredefine "=" fullpathofnewblock)
        '(0 0 0)
        (command)
   )
 )
 (princ)
)
;;usage
(blockredefinerthingymabob
 "myblock"
 "c:\\blocks\\mynewandimprovedblock.dwg"
)

Posted

you can RENAME your existing block to that of the new block and then

-INSERT

NewName=

and accept the redefine

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