Dynamic Blocks

Reply
Contributor
kemp77
Posts: 20
Registered: ‎11-06-2008
Message 1 of 7 (829 Views)

fields that read attribute inside of block

829 Views, 6 Replies
10-28-2010 04:56 PM

Hi, I would like to create a block with one attribute. The value of the attribute needs to be repeated through 2 or more fields. The problem I have is that the fields will not update unless the block is exploded.

 

%<\AcObjProp Object(%<\_ObjId 1944078696>%).TextString \f "%tc1">%

 

Is the field, maybe there is a different way of writing it so it will update while remaining inside the block? Or should I be building this block in a different way entirely...Opinions welcome! Thanks...

Contributor
edwinprakoso
Posts: 21
Registered: ‎05-20-2010
Message 2 of 7 (824 Views)

Re: fields that read attribute inside of block

10-29-2010 12:37 AM in reply to: kemp77

If you use fields in block attributes, it should be able to update without exploding the block. Probably you created it with text?

Here is a dynamic block sample I created with text fields: http://cad-notes.com/2009/11/how-to-label-coordinate-in-autocad/

--
Edwin
*Expert Elite*
Charles_Shade
Posts: 8,196
Registered: ‎04-10-2005
Message 3 of 7 (817 Views)

Re: fields that read attribute inside of block

10-29-2010 04:58 AM in reply to: kemp77

Post the block.

I believe the fields should all be unique. Not one calling for information from another.

Also if the other Field is in a block nested inside then it will not update. Right?

Regards, Charles Shade            Win8 FAQ
CSHADEDESIGN|AUTOCAD LT|LT-KB|DYNAMIC BLOCKS

 
Please mark Accept as Solution if your question is answered. Kudos gladly accepted.
Contributor
kemp77
Posts: 20
Registered: ‎11-06-2008
Message 4 of 7 (792 Views)

Re: fields that read attribute inside of block

11-01-2010 03:25 PM in reply to: Charles_Shade

This arrow leader uses a weird box style linetype that is likely not defined on your system. What I would like to do is allow the text on either side of the line read the same value, that of one which is defined by an invisible attribute.

 

There may be a better way to handle a block of this type, but I am all ears! Thanks

*Expert Elite*
ToanDN
Posts: 1,876
Registered: ‎09-26-2006
Message 5 of 7 (776 Views)

Re: fields that read attribute inside of block

11-02-2010 10:06 AM in reply to: kemp77

That is doable but would be easier if you insert the block using Tool palette.  I've posted the instruction here before but someone thought it was complicated and not worth the effort so I won't retype it unless you want to pursue this way.

*Expert Elite*
Charles_Shade
Posts: 8,196
Registered: ‎04-10-2005
Message 6 of 7 (774 Views)

Re: fields that read attribute inside of block

11-02-2010 11:57 AM in reply to: ToanDN

Why not just link to the thread?

 

I got flamed for typing out the steps to do something one time until the flamer tried to do the same thing... then he knew.

Regards, Charles Shade            Win8 FAQ
CSHADEDESIGN|AUTOCAD LT|LT-KB|DYNAMIC BLOCKS

 
Please mark Accept as Solution if your question is answered. Kudos gladly accepted.
New Member
kwallace.com
Posts: 1
Registered: ‎02-08-2011
Message 7 of 7 (507 Views)

Re: fields that read attribute inside of block

02-08-2011 08:38 AM in reply to: Charles_Shade

I think I have a similar problem. I have attached the file for reference. I have a block with fields. I want the fields to get their value from attributes in the same block. I am open to other ideas on how to accomplish this. The reason I wanted to use fields is because they will grow or shrink depending on content. So in my example I could easily replace the material and scale fields with the attributes and make them visible. However, on the first line where I have three attribute values on the same line I can't get the formatting to work out unless I use fields. The fields maintain the attribute values from when the block was created. I can do a REFEDIT but this changes the value of all of the blocks on a page. I frequently have 10 -15 such labels on a single page. I have tried various other commands to update the fields such as UPDATEFIELD and ATTSYNC with no success. I am pretty sure it is related to the fact that the objectID the fields get their value from is the original objects in the block definition and not the actual objects once I insert the block. I didn't know if there was some scripting magic I could perform to make this work. Thanks for any help.

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community