Community
AutoCAD LT Forum
Welcome to Autodesk’s AutoCAD LT Forums. Share your knowledge, ask questions, and explore popular AutoCAD LT topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

toolpalette redefine dblock autocad LT

22 REPLIES 22
SOLVED
Reply
Message 1 of 23
patrick.bijsterveld
2683 Views, 22 Replies

toolpalette redefine dblock autocad LT

I'm trying to insert a block, wich contains 2 nested blocks:

1 dynamic block

1 annotive block which has a scale 1:200 with an attribute.

 

when i'm inserting it trough the toolpalette, and my annoscale is 1:100, the annotive block is converted to the annotive scale 1:100, instead of the 1:200 wich it originally is.

i can't set the annotationscale in the toolpallete, exept when i use macro's.

but this also has a drawback.

 

when i'm inserting the block with a macro, i have to insert a complete drawing wich contains only this one block.This block contains dynamic parameters (i can't add dynamic parameters outside of the blockeditor)

When this block (dwg) is inserted, i explode the block so it becomes the dynamic block again. but the block cannot be redefined, because the actual inserted block is a dwg file.

 

can anyone help me or is it a drawback of the use of the toolpalette and dynamic / annotive blocks?

 

thanx in advanced for your replies.

 

22 REPLIES 22
Message 2 of 23

Are these Blocks actually Nested or do you have two separate Blocks in one Drawing file?

And by Nested I mean that Block B is a Part of Block A and Block A is what you insert into the drawing.

Or are you Inserting Drawing C that contains Block A and Block B?

 

CANNOSCALE as far as I know is going to overwrite whatever CANNOSCALE the Inserted Block has. The target Drawing will rule.

If you Insert a set of entities that are a Block inside that Drawing then yes, you will have a Block of a Block.

EXPLODEing should get you to the Block inside. Do the Block and the Drawing file have the same name?

 

I do not have any issues with the Tool Palette and what you describe. I do not use Annotative scaling but Inserting Dynamic Blocks from the Palette works fine. If you do have a Block defined within a Container drawing (which is what I think you are describing) you need to place the Block on the Palette and not the Drawing file that contains it.

Message 3 of 23

Charles,

 

Thanx for replying.

 

 

i cannot attach a dwg file to this message, perhaps you can send me a email?

patrick.bijsterveld@gmail.com

 

 

you are somewhat right to what i'm trying to achieve.

but perhaps you can take a look at my drawing.

 

i have 3 blocks in this drawing. the block "nummer" is an "annotive block" and i only want it to show at scale 1:200.

supposed you drag this block in your toolpalette and start a new drawing with the annotation scale set to 1:100 (or something else, besides 1:200). then you select the block "nummer " in your toolpalette and insert it in your drawing. the block "nummer" then automatically points your current annotation scale to the block "nummer" instead of the annotation scale 1:200 as you dragged it in your toolpalette.

thats the flaw when you drag an annotation object in the toolpalette.

 

however i can insert the block "nummer" from the toolpalette in a differtent way. with a macro.

then it works fine (the annotation object that is).

cannoscale;1:200\-i;00_nummer \1;1;0;x;last;

works like a charm.

 

However when im inserting block "21_buitenmuur" with a macro and thus insert a dwg as a block then i can't get the redefine command working. 

 

in the macro blockname= is pointing to the dwg and not to the block inside the dwg.

 

i hope i have explained it somehow...

 

thanx

 

 

 

 

Message 4 of 23

Zip the file to post if that is the issue.

If its proprietary let me know and I'll send the email.

Message 5 of 23

i hope this works

Message 6 of 23

A blockreference won't be redifined unless you insert it, if you insert a block and within that block there are nested blocks only the "top" block will be redifined, the nested won't be redifined and will mostly be duplicate definations of the block.

In order to redifine the block you have to insert each of the nested blocks separately.

Don't know if this helped in your question.

 

Also if your inserting a dwg as a block that contains a block in drawing it will be nested, if you want to change that, open the drawing and select block, bedit, bsaveas and mark "Save block as drawing" and save the block to a new file.

 

A thought: If your inserting the drawing with nested blocks because you don't want to have to insert each block separately, make a macro that inserts both blocks but separately, something like this:

^C^C-insert;"C:/*Filepath/*Blockname";\;;;^C^C-insert;"C:/*Filepath/*Blockname";\;;;

This will let you insert both blocks after each other on "user input insertion".

 

Hope it helped, good luck!

 

 

Signature, sincerely... //Adam
AutoCad LT 2016
Give Kudos where credit is due, Mark "accepted as solution" if the post solved your question.
Message 7 of 23

@acadadam

 

WOW!

 

thats a lifesaver!

bsaveas with the save to a new drawing let's me do exactly what i want.

when i open that dwg-file wich i created it prompt emediatly with a question "the file contains authoring element, open it in blockeditor?

i can change what i want and save it. 

 

now i can implement it in a macro and stil have the parameters an redefine in it!

 

i'll will experiment with it, but i think this is exactly what i mean!

 

thanx 

Message 8 of 23

Works perfect!

example of the macro.

 

^C^Cmeasurement;1;-scalelistedit;r;y;e;cannoscale;1:200;-i;82_NUKA= \1;\-i;00_nummer= \1;1;0;cannoscale;1:100;-layer;S;IT_18;;-style;18;arial.ttf;a;y;y;1.8;1;0;n;n;-mtext;@;s;18;j;mc;w;0;NUKA;;cannoscale;1:200;purge;a;;n;annoallvisible;1;

 

where

82_nuka is a block wich contains parameters, but is a seperate dwg file.

00_nummer is a annotative block with attributes and visibility states

 

thanx adam!

Message 9 of 23

Glad it helped 🙂

Signature, sincerely... //Adam
AutoCad LT 2016
Give Kudos where credit is due, Mark "accepted as solution" if the post solved your question.
Message 10 of 23

hey Adam,

 

a question about the blocks.

 

pherhaps you know the answer.

 

when i drag a dblock in the toolpallete, and i want to redefine it, i rightclick on that block the block gets updated. the hatch however looks like it's broken. when i type "regen" the block repairs the hatch, so it is ok.

 

when i insert in though my macro, the block also gets updated, but when i "regen" or "regenall" it does not fix the hatch.

if i open the block with "-bedit" and close with "bclose;d;" it gets regenerated.

 

why does "regen" not work in the second case?

 

thanx in advanced!

 

grtzz pat

Message 11 of 23

Go into your block and cilck ONCE on your hatch.

 

Now right click and choose HATCH EDIT...

 

When the dialog box pops up look to the bottom left and you should see a section titled HATCH ORIGIN.

 

Click SPECIFIED ORIGIN

And the choose DEFAULT TO BOUNDARY EXTENTS.

 

Does that help with your hatch problem?

Howard Walker
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature


Left Handed and Proud

Message 12 of 23

 

unfortunally not.

 

the macro when inserting:

^C^Cmeasurement;1;-scalelistedit;r;y;e;-i;20_spouwmuur= \1;\annoallvisible;0;cannoscale;1:100;

 

it inserts the block (see attached file) (add support file seach path to the drawing) 

 

the regen only works like this:

if you save the dblock inside the first drawing, and drag it to your toolpalette,insert it in the second drawing, and stretch the block with a strech parameter and then save.

edit the blockdefinition by rightclick "edit block" and it will open the block that is saved in you first drawing.

make an adjustment and save the block, and save the drawing.

now go to your second drawing and rightclick the block in your toolpalette and select redefine. in my case i can see the hatch "resetting" and thus not filling the complete boundary. when i "regen" it's resetting it as it should be so thus the block is ok.

 

so, what's the difference of inserting a block from the toolpallete with a script or inserting it when dragged it in the toolpalette?

 

when i'm inserting with a script , i'm actually inserting a dwg file wich contains a <current drawing> block. (adam knows what i's talking about)

 

when i'm inserting when dragged into the toolpalette, it acually is a block.

he downside of dragging it in the toolpalette is i can't work with a macro like mentioned above.

 

hm.

Message 13 of 23

You already wrote the difference:

When I want to redefine the Block from the Tool Palette I right click and choose Redefine.

Insert will redefine a Block that is already in the Drawing; simply adding a Block as your Macro does that is already defined in the Drawing will do nothing more than add another instance of the same Block definition.

Your Macro does not invoke INSERT therefore there is no Redefine.

Add INSERT to your Macro and the Block will redefine each time you Insert it in to Drawing where the definition already exists. You will need to provide the source definition of the Block in the Macro as well.

That will get real annoying real quick.

Message 14 of 23

charles,

 

not entirely true, 

 

in my macro i addes an "=" after the blockname.

 

this "=" updates the block, with it , it referres to the source drawing 20_spouwmuur.dwg.

 

when i add a line to that block (dwg) and i save it, then i click the macro in the toolpallete (-i;20_spouwmuur= \etc. etc.) it updates the block with the line added. 

however it resets the hatch. when i do a bedit, and close the bedit without saving, the hatch is updated.

 

the resetting of the hatch also occurs as stated when i drag the block in the toolpallete, and then select redefine.

but after the redefinition, when i typ "regen" on the commandline the hatch restores properly in the block

 

 

Message 15 of 23

I'm not familiar with the use of "=" in the Macro to redefine a Block that is outside of the Drawing.

And I do not see the Path to the Block in the Macro. I would expect something like Adam wrote earlier: "C:/*Filepath/*Blockname"

Though with the foreslashes the quotes are superfluous 

Message 16 of 23
AcadAdamLT
in reply to: Charles_Shade

I believe what Charles Shade is true, I'm not familiar with the use of = either but unless Autocad knows the filepath for where to fetch the block he will search the drawing for a block definition with that name, if he finds it that will be the one you insert.

When you fetch it from a toolpalette he takes the definition of the block from the .dwg in the toolpalette.

 

Edit: Also the quotes in filepath are only necessary if you have a filepath containing spaces.

But you only need the first quote "C:/ and a second one that ends the filepath.

 

Signature, sincerely... //Adam
AutoCad LT 2016
Give Kudos where credit is due, Mark "accepted as solution" if the post solved your question.
Message 17 of 23

step 1

open an empty drawing

draw a line

create a block named "20_spouwmuur" wich contains that line.

open the blockeditor

save the block with "bsaveas", name it "20_spouwmuur" and check the "save block definition to drawingfile"

a window will open and you can save that block to a drawing named "20_spouwmuur.dwg"

add the location of this drawing to the supportfile searchpath

 

step 2

start a complete empty drawing.

 

on the commandline

"-i"    and i typ the name of the block i want to insert e.g. "20_spouwmuur" it will insert this drawing as a block.

(reminder, this was an empty drawing, but it still inserted the drawing as a block)

 

step 3

now change the drawing "20_spouwmuur.dwg" wich you created in step 1, add a line to the drawing and save that drawing.

 

step 4

go to your drawing created in step 2

 

on the commandline

"-i"   and type the name of the block i want to insert e.g. "20_spouwmuur"

(notice on the commandline it already stated <20_spouwmuur>, you can retyp or press enter)

 

it will insert without the line created in step 3, 

 

step 5

"-i"   and type the name of the block i want to insert e.g. "20_spouwmuur=" 

(notice on the commandline it already stated <20_spouwmuur>, you must retyp and add the "=" then press enter)

it will ask if you want to redefine that block, press "Y'and enter, hense it adds the line you created in step 3.

 

so it's possible.

 

step 6

if you added a strech action and a hatch to the block created in in step 1

open the drawing "20_spouwmuur.dwg"

 

on the commandline

"bedit" and select <current drawing>

 

now change that block, and add a rectangle, hatch and a stretchaction.

close this block and save the changes.

 

step 7

go to your drawing created in step 2

 

 

on the commandline

"-i"   and type the name of the block i want to insert e.g. "20_spouwmuur=" 

(notice on the commandline it already stated <20_spouwmuur>, you must retyp and add the "=" then press enter)

it will ask if you want to redefine that block, press "Y'and enter, hense it adds redefines as changed in step 6.

 

now.

 

strech your block, it will work, it even stretches the hatch.

 

step 8

repeat step 7

 

you will notice that the existing block youve stretched dynamically has reset it hatch.

 

regen will not work.

regenall will not work.

 

on the commandine

"-bedit"   type "20_spouwmuur" type bclose and hit d (discard changes)

 

the block regens and the hatch is ok again.

 

 

 

 

 

 

Message 18 of 23

Step 4 does not work, because you already have a block in your drawing with that name.

 

It will default to using the block which is in the drawing rather than pulling in a new definition of the block

Howard Walker
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature


Left Handed and Proud

Message 19 of 23

step 4 indeed inserts the block present inside the drawing created in step 2. however when you add an "=" sign it redefines that block with the block changed in step 3.

i'm courious though.
has anyone here actually repeated the steps above as i mentioned, or is it they are replying from memory?
Message 20 of 23

I ran thru to step 5 and it performs as you state so thanks for the new information.

To go back to your Macro: There is a Space and a Pause after the BLKNAME= and I do not see the Yes to redefine the Block so I still think that the Macro would fail at that point but maybe that is just a part of the Equal parameter.

 

Though none of this answers your original query concerning the Hatch.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost