AutoCAD - Block name inside block with text field?

AutoCAD - Block name inside block with text field?

aclima01
Contributor Contributor
5,377 Views
23 Replies
Message 1 of 24

AutoCAD - Block name inside block with text field?

aclima01
Contributor
Contributor

Hello

It would be very useful for me to have field text inside a block that will show the name of that block and update it when the block is renamed. Can anyone tell me if this would be possible?
I don't think so, but not sure...
Thanks

 

[ The subject line of this post has been edited to include the product name by @handjonathan ]

0 Likes
Accepted solutions (2)
5,378 Views
23 Replies
Replies (23)
Message 2 of 24

ВeekeeCZ
Consultant
Consultant
Accepted solution

Yes it is. Just look for NamedObject/Block... Easy peasy.

Message 3 of 24

vinodkl
Mentor
Mentor
Accepted solution

Yes it's possible(see attachment)

--------------------------------------------------------------------------------------------------------------------------
ವಿನೋದ್ ಕೆ ಎಲ್( System Design Engineer)
Likes is much appreciated if the information I have shared is helpful to you and/or others.

Please mark "Accept as Solution" if my reply resolves the issue or answers your question, to help others in the community.
--------------------------------------------------------------------------------------------------------------------------
Message 4 of 24

jnksimmons
Explorer
Explorer

I created a block and used a field to label the block with the block's name. The block is a raw good that is used over and over. I name the the block the actual part # of the raw good. I used the block in several files. I then needed to change the name of the block which was it's part number. I did that and the field changed as well which is exactly what I wanted. The problem is it did not change in my other drawings. I tried the attsync command but is said this drawing contains no attributed blocks. I need all instances of the block to update across several files. Any help is greatly appreciated.

 

0 Likes
Message 5 of 24

TomBeauford
Advisor
Advisor
Most fields are drawing specific if you place any object referenced by a field into another drawing it's no longer linked.
64bit AutoCAD Map & Civil 3D 2023
Architecture Engineering & Construction Collection
2023
Windows 10 Dell i7-12850HX 2.1 Ghz 12GB NVIDIA RTX A3000 12GB Graphics Adapter
0 Likes
Message 6 of 24

henrik.pettersson
Enthusiast
Enthusiast

I have the same question, but I found the NamedObject-field and it doesn't really do what I want.
 

Is there a way to display the current blocks name as a text in that same block?

 

If I create a block with NamedObject, copy that block, saves it as something else to make a slightly different block, then the field is still referencing the old block and displays that name, not the name of the block which it is acctually in.

I see it as I want an attribute to display the [Name] parameter of the block, but I can't find a way to do so.

 

 

Message 7 of 24

cadffm
Consultant
Consultant

Create your Attdef in BEDIT, default value -> add a field: Object->Blockplaceholder->Name

 

or paste this code: %<\AcObjProp.16.2 Object(?BlockRefId,1).EffectiveName>%

Sebastian

Message 8 of 24

henrik.pettersson
Enthusiast
Enthusiast

Thank you.

 

Had to fiddle with some visibility settings but it works.
Can also note for other users that the ref updates with save or print or update-command. It doesn't update when you RENAME or Save Block as, you need to save the file first.

0 Likes
Message 9 of 24

cadffm
Consultant
Consultant

Read more about FIELD FIELDEVAL  FIELDDISPLAY UPDATEFIELD

 

[F1]

Sebastian

0 Likes
Message 10 of 24

v_harutyunyan
Participant
Participant

I have the same issue: I want to display block names inside or under the blocks in the drawing. Please describe your solution above in step by step instruction. 

0 Likes
Message 11 of 24

v_harutyunyan
Participant
Participant

How to do it?

0 Likes
Message 12 of 24

cadffm
Consultant
Consultant

Hi,

 

edit your Block: BEDIT

Create a MTEXT by FIELD command

  or edit your existing (M)Text, inside the editor RightClick -> insert field

 

Inside Field dialog

From upper left to the right..

Category Object

Fieldtype Blockplaceholder

Blocks

Name

 

 

Sebastian

0 Likes
Message 13 of 24

v_harutyunyan
Participant
Participant

Thanks @cadffm, but it pops up "invalid field code". (I use AutoCAD Mechanical 2024) See below:

v_harutyunyan_0-1747068586572.png

 

0 Likes
Message 14 of 24

cadffm
Consultant
Consultant

Are you in BEDIT as I described?

Sebastian

0 Likes
Message 15 of 24

v_harutyunyan
Participant
Participant

Yes

0 Likes
Message 16 of 24

v_harutyunyan
Participant
Participant

Do I need to do it manually for all blocks? Is there a way to do it for all of my blocks by one command? I have almost 50 blocks in my drawing.

0 Likes
Message 17 of 24

cadffm
Consultant
Consultant

For each Block.

 

Sebastian

0 Likes
Message 18 of 24

v_harutyunyan
Participant
Participant

Thanks, I am willing to do it for each block, but please explain how to do it. I have entered BEDIT command, chosen the block, did RightClick -> insert field, etc. But it doesn't work. Can you please provide some screenshots.

0 Likes
Message 19 of 24

cadffm
Consultant
Consultant

You screenshot says: You are NOT in bedit.

https://m.youtube.com/watch?v=YR1jqkV6UBA

 

Sebastian

0 Likes
Message 20 of 24

cadffm
Consultant
Consultant

Sorry, my fail!

It works with ATTRIButes only!

 

Create an ATTDEF (property constant = yes)

Default content: Insert field

Blockplaceholder

...

Big SORRY

Sebastian

0 Likes