Author Topic: Block Question  (Read 3238 times)

0 Members and 1 Guest are viewing this topic.

V-Man

  • Bull Frog
  • Posts: 343
  • I exist therefore I am! Finally Retired!
Block Question
« on: February 26, 2004, 03:26:53 PM »
I have a block that is already in the drawing. I made changes to the master drawing (block) and I want (in lisp) to insert the block to re-define it. I can not seem to get it to re-define it. If I browse and go get the drawing (block) and then insert, then it will ask to re0define it. Does anyone know how to accomplish this? Acad2002
AutoCAD 9 - 2023, AutoCADMap 2008 - 2010, Revit 2012 - 2022, Autocad Civil 3D 2023

SMadsen

  • Guest
Block Question
« Reply #1 on: February 26, 2004, 03:44:46 PM »
With -INSERT, you can do it by prefixing the blockname with an equal sign.

V-Man

  • Bull Frog
  • Posts: 343
  • I exist therefore I am! Finally Retired!
Block Question
« Reply #2 on: February 26, 2004, 04:51:03 PM »
This is the code I'm trying to use. If I put an = sign in front of the block it does not work.

Code: [Select]

(command "-insert" "c:/blks/titleblocks/titleblock")
AutoCAD 9 - 2023, AutoCADMap 2008 - 2010, Revit 2012 - 2022, Autocad Civil 3D 2023

Mark

  • Custom Title
  • Seagull
  • Posts: 28762
Block Question
« Reply #3 on: February 26, 2004, 04:56:19 PM »
Quote

Updating a Block Path: If you enter a block name without a path name, AutoCAD first searches the current drawing data for an existing block definition by that name. If no such block definition exists in the current drawing, AutoCAD searches the library path for a file of the same name. If AutoCAD finds such a file, it uses the file name for the block name upon insertion of the block definition. AutoCAD uses the same block definition for subsequent insertions of that block. You can replace an existing block definition with an external file by entering the following at the Enter Block Name prompt:
block name=file name

Updating a Block Definition: If you make changes to a block file that is inserted in your drawing and you want to change the existing block definition without creating a new block insertion, enter the following at the Specify Insertion Point prompt (following the Enter Block Name prompt):
block name=

If you enter = after the block name, AutoCAD displays the following prompt:

Block "current" already exists. Redefine it? [Yes/No] <No>:  Enter y, enter n, or press ENTER

If you choose to redefine the block, AutoCAD replaces the existing block definition with the new block definition. AutoCAD regenerates the drawing and the new definition is applied to all existing insertions of it. Press ESC when AutoCAD prompts you for the insertion point if you do not want AutoCAD to insert a new block into the drawing
TheSwamp.org  (serving the CAD community since 2003)

V-Man

  • Bull Frog
  • Posts: 343
  • I exist therefore I am! Finally Retired!
Block Question
« Reply #4 on: February 26, 2004, 05:20:10 PM »
I got it. Here's the code

Thanks,

Code: [Select]

(command "-insert" "titleblock=c:/blks/titleblocks/titleblock")(command)
AutoCAD 9 - 2023, AutoCADMap 2008 - 2010, Revit 2012 - 2022, Autocad Civil 3D 2023