Community
AutoCAD Forum
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

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

6 REPLIES 6
SOLVED
Reply
Message 1 of 7
Buzz0m
2522 Views, 6 Replies

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

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

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

6 REPLIES 6
Message 2 of 7
Alfred.NESWADBA
in reply to: Buzz0m

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

(not an Autodesk consultant)
0 Likes

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

(not an Autodesk consultant)
Message 3 of 7
Buzz0m
in reply to: Alfred.NESWADBA

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

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

Message 4 of 7
Alfred.NESWADBA
in reply to: Buzz0m

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

(not an Autodesk consultant)
0 Likes

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

(not an Autodesk consultant)
Message 5 of 7
Buzz0m
in reply to: Alfred.NESWADBA

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

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

Message 6 of 7
Alfred.NESWADBA
in reply to: Buzz0m

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

(not an Autodesk consultant)

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

(not an Autodesk consultant)
Message 7 of 7
Buzz0m
in reply to: Alfred.NESWADBA

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

@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!

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

Post to forums  

AutoCAD Inside the Factory


Autodesk Design & Make Report