Jump to content

Recommended Posts

Posted

I have created several drawings containing blocks and now that, handily I am half way through, my client has decided he wants to change their appearance. (Make part of the block visible on screen, but not when plotted). Is there a way of updating ALL of the so far completed drawings with the new block, without having to basically start from scratch? I have modified the blocks in the latest drawing and re-defined the blocks under the same names

 

Cheers

  • Replies 21
  • Created
  • Last Reply

Top Posters In This Topic

  • memphis710

    8

  • GE13579

    3

  • Sickguy

    3

  • dumfatnhappy

    1

Top Posters In This Topic

Posted Images

Guest Alan Cullen
Posted

You can always use BEDIT, and edit the block to cut out the half he doesn't want to a non plottable colour.

Posted

Cheers for that, however I have got 150 Drawings with around 200 - 250 blocks in each... Is there another way? (Other than telling the client where to go?!?)

Guest LElkins
Posted

memphis,

 

can you please tell me what version of autocad you are using,

the file name of the block that you want to insert,

and the install location of autocad.

 

Cheers

Posted

AutoCAD LT 2005 (at the moment)

 

the blocks are

 

RM2 0no. Wing

RM2 1no. Wing

 

Install dir: C:\Program Files\Autodesk\AutoCAD 2005 LT\

Guest LElkins
Posted

memphis,

 

i am working on a script for you, but i had done so hoping that you has at least full autocad so that you could use the express tools.

 

is there a chance that you could download a trial version of full autocad to use for this process?

 

if not, do you have any access to a machine with full autocad?

 

cheers

Guest LElkins
Posted

ok, memphis, read this very carefully and if you are unsure of anything then please ask.

 

try what i describe below with example files first.

 

create a new drawing and create blocks in it called new_test and save it in C:\

then wblock some linework and save it in C:\cad_file\new_block.dwg

 

open notepad and copy the code below and save as blockreplace.scr

 

-layer
n
newblocklayer
s
newblocklayer

-insert
C:\cad_files\new_block
0,0
1
1
0
-blockreplace
new_test
new_block
y
layerp
-laydel
n
newblocklayer

y
qsave
quit

 

when you have tried this and happy that it works and want to use it on your project drawings, in the code above, replace C:\cad_files\new_block with the path of your new block. For some reason i can not get it to work with space in file name so replace all spaces with underscore, this includes folder names.

replace new_test with the name of the existing block which will be replaced.

 

open a new notepad and copy the code below and save it to a file called block_replace.bat

 

FOR %%V IN (*.DWG) DO START /W "c" "C:\Program Files\AutoCAD Architecture 2008\acad.exe" %%V /nologo /b "C:\blockreplace.scr"
FOR %%V IN (*.BAK) DO DEL %%V

 

In this, replace the AutoCAD Architecture 2008 with the version that you are using.

 

Put both block_replace.bat and blockreplace.scr in C:\ and also put your drawings there.

 

when running the routine you will not be able to use your machine so will be best to run over luch.

to run the routine just double-click on block_replace.bat

 

hope this helps. if any of this is unclear then please just ask and i will be more than happy to help.

 

cheers

Posted

Thanks very much, you're a star. Will try this as soon as I get my proper copy of autocad back!!

 

I'll let you know how I get on.

 

 

Cheers!!

Guest LElkins
Posted

no problem memphis.

like i said, it may not make much sense if you are unsure what is happenning, so if i didnt make anything clear enough then please ask.

 

thanks

  • 3 weeks later...
Posted

LElkins, I can get the test to work, but I now have the problem of spaces in the original Block name... Bugger!! Cheers for the script though, quite simple when looked at like that. Does make sense.

 

Now... Anyone any Ideas about using spaces in AutoCAD scripts?

 

The following:

 

-blockreplace

new_test

new_block

y

layerp

-laydel

 

...needs to read

 

-blockreplace

100 'H' Frame

new_block

y

layerp

-laydel

 

(100 'H' Frame is the original Block name)

Posted

you can't just wblock those updated blocks to the same directory and do an "insert=" in each drawing and be done with it ?

Posted

LElkins, cheers for the script. Got it to run standalone with the correct files. However, I cant get the batch script to run properly. It loads up acad, and the first drawing file, but acad loads with the error pictured. It says it cant find the old block, (I have checked the name of the block and it is right) and skips on to the next line in the script, still searching for a valid block. Is this due to the incorrect drawing loading in the first instance? txt file is acad command output.

 

 

Cheers so far, great help.

Error.txt

1.jpg

Posted

dumfatnhappy, that is what I am doing with the script, but with the shear volume of drawings and blocks within the drawings, I need an automated script.

  • 1 year later...
Posted

memphis, ever get an answer to the "space" problem?

Posted

I don't have time to read all of this but I thought enclosing the file name within quotes allows spaces. At least that's how I do my scripts.

Posted
I have created several drawings containing blocks and now that, handily I am half way through, my client has decided he wants to change their appearance. (Make part of the block visible on screen, but not when plotted). Is there a way of updating ALL of the so far completed drawings with the new block, without having to basically start from scratch? I have modified the blocks in the latest drawing and re-defined the blocks under the same names

 

Cheers

what version of ACAD are you running? in newer version you can "right click" and look for the "edit block" option. from there you can go into the "block editor mode and edit the block as its own seperate drawing. once saved it works sort of like an xref and will universally update all.

 

to make part of the block print, in the block you can create a layer thats a no plot layer, or simply put the parts you dont want visible on defpoints.

Posted

This was suggested earlier but not suitable due to the number of drawings and blocks-

 

 

Cheers for that, however I have got 150 Drawings with around 200 - 250 blocks in each... Is there another way? (Other than telling the client where to go?!?)
Posted
This was suggested earlier but not suitable due to the number of drawings and blocks-

250 blocks is pretty excessive. would have to understand the format he is working in i guess in order to give solid advice.

Posted

I believe the initial query was resolved, just that there was a follow up regarding adjusting the scripts. :wink:

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