Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.

Block attribute value is a field, how do I copy it to another block?

Buzz0m
Collaborator

Block attribute value is a field, how do I copy it to another block?

Buzz0m
Collaborator
Collaborator

Hi,

I have a block, which needs to know the insertion point of another block. This is fairly easy to achieve with fields.

 

Anyway, I need to do this hundreds of times. Luckily, the reference block (the block, which x,y-coordinates I need) is the same for the "hundreds" of blocks I have, so I thought that once I've done it the first time I might just copy the field  to one block and paste it to all the respective blocks (in the properties palette). This didn't work since the value is static...

 

How do I copy a field when it is a block attribute value? It doesn't seem to be possible to even copy the field within the same block from attribute to attribute...

 

-F

0 Likes
Reply
Accepted solutions (1)
2,691 Views
6 Replies
Replies (6)

Alfred.NESWADBA
Consultant
Consultant

Hi,

 

wouldn't it be easier to create one block with the field referencing to the other "basic block position" and then copy the block instead of now needing to open attribute editor, enter the field value, ...

 

Do you have any programming skills (LISP, VBA, dotNET, ...)?

 

If you can upload a drawing and describe which blocks have to be handled it would help, also let us know your AutoCAD version please.

 

- alfred -

------------------------------------------------------------------------------------
Alfred NESWADBA
ISH-Solutions GmbH / Ingenieur Studio HOLLAUS
www.ish-solutions.at ... blog.ish-solutions.at ... LinkedIn ... CDay 2025
------------------------------------------------------------------------------------

(not an Autodesk consultant)
0 Likes

Buzz0m
Collaborator
Collaborator

Hi @Alfred.NESWADBA,

indeed it would be easier that way, but I need to insert the blocks with measure, and thus the attribute has to be defined after creation. And at some point I might need to change the referenced block so I believe I need a solution where the value can be changed at will...

 

I have limited skills in coding but would still like to use basic autocad functionality. Is the case as I described, ie. that one can not copy an attribute field based value without programming?

 

EDIT: Civil3d2018 the version I'm using...

0 Likes

Alfred.NESWADBA
Consultant
Consultant

Hi,

 

can you please upload a small sample dwg-file of such entities?

 

- alfred -

------------------------------------------------------------------------------------
Alfred NESWADBA
ISH-Solutions GmbH / Ingenieur Studio HOLLAUS
www.ish-solutions.at ... blog.ish-solutions.at ... LinkedIn ... CDay 2025
------------------------------------------------------------------------------------

(not an Autodesk consultant)
0 Likes

Buzz0m
Collaborator
Collaborator

Here is one example. The red blocks around the tunnel cross section are rock bolts. I would like to link some of their attributes to the block roughly in the  middle.

 

Capture.PNG

0 Likes

Alfred.NESWADBA
Consultant
Consultant
Accepted solution

Hi,

 

>> The red blocks around the tunnel cross section are rock bolts

OMG, remembers me to some time ago when I wrote an application for a customer doing placements of rock bolts with evaluating the tolerances while drilling. (working for a long time now 😉 )

 

20181019_120721.png

 

To your primary question about inserting fields in multiple block attributes, please look to the attached video...

 

- alfred -

------------------------------------------------------------------------------------
Alfred NESWADBA
ISH-Solutions GmbH / Ingenieur Studio HOLLAUS
www.ish-solutions.at ... blog.ish-solutions.at ... LinkedIn ... CDay 2025
------------------------------------------------------------------------------------

(not an Autodesk consultant)

Buzz0m
Collaborator
Collaborator

@Alfred.NESWADBAthank you very much! Basic code pasting and regen as you demonstrated does the trick!

 

In mtext and such objects fields move just with a basic copy... anyhow thank you very much again for pointing this trick out!

0 Likes