Jump to content

Recommended Posts

Posted

Have searched for something similar in the forums, seems simple enough.

 

I have a dynamic block.

It has length and width stretch actions activated by grips. (Works fine)

It has an attribute for the user to type in a height value. (attribute insert box appears on block insert and when double clicking block)

It has Mtext "worktop [field] High" the [field] is looking at the attribute value so in theory should return the value the user types.

 

But no only ---- shows. regen/regenall/battman

fieldeval 31

 

Am I missing something i have pointed the field to tag/prompt as test and they show up in the mtext.

 

any help as always much appreciated. Attached dwg for reference

worktop.dwg

Posted

Since MText is stored within the block definition and not separately associated with each block reference (like attribute references), it cannot hold a different value for each block reference inserted in the drawing.

 

To achieve what you are looking for, you will need to use a Multiline Attribute Definition in place of the MText in your block definition. Then, for the default value, type the same text and insert a Field referencing the Value property of your other attribute (HEIGHT) and ensure that you tick the option in the bottom-right of the dialog:

 

fielddialog.png

Posted

That's the one. Spot on Lee. Working like a dream. I did try using the second attribute route early on but didn't set it up correctly, so knocked it on the head.

Thanks for your help

  • 3 months later...
Posted

Hi Lee,

 

I have been trying to do this for a long time now and each time I follow your instructions to JADT I can't get it to work. It keeps giving me the "----" value. Any ideas?

 

Thanks in advance!

Posted
I have been trying to do this for a long time now and each time I follow your instructions to JADT I can't get it to work. It keeps giving me the "----" value. Any ideas?

 

Thanks in advance!

 

Hi disposedhero,

 

I have a few questions to help troubleshoot:

 

  • Are you using an Attribute (ATTDEF) to hold the Field Expression?

 

  • Is the Field Expression referencing a non-empty value (i.e. not a blank value)?

Lee

  • 3 months later...
Posted

Hi, I'm having issues with this replication of attributes! I'm using Autocad 2013 and I have yet to see the tick box you indicated appear!

I'm desperately trying to display the same attribute in two places within the same block, and want to be able to update the attribute as necessary (and the displayed values update in the block also).

Any help greatly appreciated,

thx,

Paul

Posted
I have yet to see the tick box you indicated appear!

 

Hi Paul,

 

Welcome to CADTutor.

 

Ensure that you are inserting the field as the default value of the attribute definition, either from within the Block Editor or when creating the attribute with the ATTDEF command.

 

Lee

  • 4 weeks later...
Posted

Best fellow users of ACAD,

 

I'm encoutering a similar issue using my block which contains 2 attributes.

I want an extra text (field in multiline attdef) to that block showing the value of those attributes. (barcode showing projectnumber and subprojectnumber)

However every time i insert the block, i need to manually update the fields (redefining)

Is there a solution to do this right?

 

Barcode.dwg

 

thx

  • 4 months later...
Posted (edited)

I have a similar problem for which I cannot find a solution.

 

I am trying to generate a multiline attribute field consisting of other attributes in the same block.

Thusfar I have only been able to let it display the default values of an attdef and not the actual value that has been input.

 

Is this possible with this method? Or do I have to resort to .net or lisp programming. (which is beyond my current skill)

dubb_stopc_label.dwg

Edited by LeMesjeu
attachment

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