Hello Everybody,
I am looking for some help with attributes in dynamic blocks, I just can't figure it out on my own:
The aim is to create a dynamic block which contains a closed polyline (which I can stretch using stretch actions associated with point parameters) and an attribute that displays the area enclosed by the polyline. After I have streched the block to shape in model space using the point parameters I want the attribute to display the resulting area (for which I would need to use the REGEN command i know).
Attached is a file with my achievements so far. I can get a field in a text object to do what I want (not included in the file), but I cannot get a field inside the attribute to update after the REGEN command. I need the area to be processed in the attribute because eventually I want to export the information from a number of such blocks with ATTEXT.
I have found a block which does exactly what I want, so I know it works, only I would like to understand why that one does and mine doesn't.
This should be a good starting point I hope.
I am very much looking forward to your help!
Coooper
Solved! Go to Solution.
Solved by steven-g. Go to Solution.
You might find more help in the dedicated Dynamic Blocks Forum:
http://forums.autodesk.com/t5/Dynamic-Blocks/bd-p/154
Hi,
thank you for the reply. Sounds like that makes sense, only I can't find that check box in the field dialogue box. What I see is what is shown in the screenshot (attached). I hope I am not missing something obvious... Is this a limitation in LT?
Hello again,
first of all: thank you so much for the hint with the check-box, which has led me to success!
Now the details:
yes, your block did work beautifully. I also found the check-box for "display value for block reference" although I don't understand the concept behind this:
- when I double-click on the block in model space I get the "Enhanced Atrribute Editor". Here I right-click on the Value that contains my field, chose "edit field" to go to the field dialogue box --> no check box
- when I open the block in the block editor, use BATTMAN for the Block Atrribute Manager, select the attribute, then click "edit" and right-click on the Default value (which has got the field) to open the field dialogue box: --> no check-box
- when I open the block in the block editor, then simply double-click on the attribute I get the "Edit Attribute Definition" dialogue box where I right-click on the Default value (the field) to open the field dialogue box: there is the Check-box!!
Is this supposed to make sense?
I finally got my own block to work by doing this:
- check the well hidden check-box you pointed out by going down the road described in point three above
- navigating to the field dialogue box by going down the road described in point two above
- copying the cryptic field expression to the clipboard
- closing all dialogues and saviong the block
- double-clicking on the block in model space (Enhanced Block Editor) and delete whatever I had as value for my area attribute here
- closing the Enhanced Block Editor
- double-clicking the block again to go back to the Enhanced Block Editor
- paste the field expression to where I had deleted the values three steps earlier
- click "ok"
- all is good. I can stretch the block in model space, REGEN the drawing and the attribute showing the area updates.
I still don't feel that I understand what is going on, but this will do.
Thanks again and all the best!
I did a bit of digging as well, if you use the field command it opens the dialogue without the checkbox (obviously because not all fields are in blocks), but no idea why it should behave differently when you are within a command that does use fields that are block related. As far as the reason for the check box is concerned, if it is not checked then the field returns the value stored in the block deffinition as opposed to the live altered block. Anyway nice to hear you got it working, and I'll have a look at those other methods you mentioned.
Hi steven-g,
In the end it is an obvious thing that that check-box makes the difference, but when working with fields in attributes for the first time I found it hard to get this far. But now I am already making good use of my shiny new block.
If you find more interesting details related to my other workings I shall be interested to hear about it.