Jump to content

Use fields to duplicate attribute values in blocks?


Recommended Posts

Posted

Hi all

 

I would like to create a, for instance, double headed section arrow tag block with an attibute for the section label.

 

I would then like to put another attribute in the other head that contains a field that links to the value of the first attribute.

 

Do you see what it is yet?

 

I attach an image of a sample block - note that the 2nd attribute "REFCOPY" has a field linking the value property of the attribute object "REF", however it won't update now I've changed the value of "REF" to 'D'.

 

I have run updatefield etc.

 

Any ideas?

 

cheers

 

Doove

fields of attributes in attributes.jpg

  • 9 months later...
Posted

I would like to do the same thing. I was wondering rather you have located a solution, as I cannot locate one myself?

Posted

I got shouted down a few weeks back when I said it couldn't be done.

 

The solution offered though meant that you had to link the text you want to duplicate at the point that you make the block and it was only valid for that instance of the block so I don't consider it any more worth than doing it the old way.

 

Sorry but 2nd half has just started so I'm not going to look for the thread now.

Posted

Great post(s). It helps in only confirming that at this point trying to make a block to echo and update from default settings is not easy.

I did however make one; it will only work in the drawing it was set up in. Thus every time you insert it you have to recreate the fields, but to reuse it in the same file you can simply copy it, "CO", and place it multiple times and the fields follow.

Still it is tedious and most likely not memory friendly with so many fields.

O’well, one day AutoCAD will figure some way out of accomplishing it, like adding the blocks attributes to be selectable through the "BlockPlaceholder" option.

Like you can do with distances and such, where those fields do update and are embedded in the block

Posted
I would like to do the same thing. I was wondering rather you have located a solution, as I cannot locate one myself?

 

Attached is block I made up and use now.

 

It's dynamic and (oh the joy of it) has all DBs associated problems.

 

Don't insert then scale it. Best bet is to insert it in dwg, then delete it off then use insert->block menu to insert it giving it the scale you want at this point. i.e. 100 for 1:100 scale. I'm assuming you dimension in Mspace. Works in Pspace too though.

 

Use the visibility states and flip grip to alter orientation to avoid problems!!!

 

There are two attributes - xtion and copy, copy uses whatever is written in xtion but formats it in capitals. You can change this if you want too. Don't really have a reason for it.

 

So - alter xtion attribute and regen drawing to update field.

 

If you're altering attribute or filed properties don't forget to attsync.

 

THIS IS A WORK IN PROGRESS THAT I'M NOT PROGRESSING! ... so be gentle...:wink:

xtion arrow.dwg

  • 6 months later...
Posted

The attached block is one I was trying to do thie same kind of thing with.

 

I want to be able to enter the patch frame number once when the block is inserted and have it update the outlet numbers automatically, referencing the original attribute in the inserted block as a prefix.

 

The problem appears to be that the attribute reference is to the entity identifier for the attribute in the defining block, not in the block being inserted.

 

If you edit the attributes for an outlet (P1, P2 etc), highlight the field in the attribute itself and select "Edit Field", you can see the expression. (I explained this because it took me ages to work it out for myself - could not find it documented anywhere.)

 

Anyone have any suggestions?

DPANEL-PATCH.dwg

  • 2 weeks later...
Posted

McTodd

 

attached your block with first two (P1 & P2) altered so they update with hidden PANEL att.

 

Mistake I made too and am not sure I understand the working now anyway but essentially you're referencing the attribute value field in the attribute definition instead of the attribute itself which shows up in the block definition.

 

Select the BLOCK, then edit attribute then edit field, then select the BLOCK not the attribute, then in the list of fields available in the block you'll see your att name and use that.

 

Then if you change your source att (PANEL) and do a regen they should update.

 

It makes sense as attributes can have different values per block instance, so the block must store these different values not the attribute.

 

I have had trouble in past with new inserts of this type of block not updating, the workaround is to insert the block from external source. Then delete it. Then insert from your drawings block list, and it should be OK. Might need a quick attsync then you're away. I assume this is as the dwg file needs to initialise the new variables in this block or something clever like that!!!! Don't ask me, I just turn the key and it goes....

DPANEL-PATCH ver 2 (not complete).dwg

  • 13 years later...
Posted

I know this is a super old thread but if you are trying to duplicate just a value you could use the length of a line with a stretch parameter. So, for instance add a line 1" or meter long in the dynamic block with a stretch. Use the length and get rid of the .000 . Then when you want 1,2 3 etc. You just change the length of the line, and it would change any text you have that field in (hide the line once everything is working). Ridiculous that this seems to still be the only solution. I really want a full attribute that I can duplicate...The tools are there they just don't update. For A,B, C D etc you could just have text in there and change with visibility but that is getting very close to the same speed as just copy past. But at least they would always match.

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