Community
AutoCAD LT Forum
Welcome to Autodesk’s AutoCAD LT Forums. Share your knowledge, ask questions, and explore popular AutoCAD LT topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

dynamic block with updating atrribute

8 REPLIES 8
SOLVED
Reply
Message 1 of 9
Coooper
1513 Views, 8 Replies

dynamic block with updating atrribute

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

8 REPLIES 8
Message 2 of 9
pendean
in reply to: Coooper

You might find more help in the dedicated Dynamic Blocks Forum:
http://forums.autodesk.com/t5/Dynamic-Blocks/bd-p/154

Message 3 of 9
steven-g
in reply to: Coooper

In the field dialogue box, check the box for 'display value for block reference', this will make any future blocks that you insert work, it won't fix existing ones.

Message 4 of 9
Coooper
in reply to: pendean

Hi, thanks for that, i did not see that forum before. I'll have a look.
Message 5 of 9
Coooper
in reply to: steven-g

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?

Message 6 of 9
steven-g
in reply to: Coooper

Wierd,

field.png

did the block work that I posted (it does here),

Message 7 of 9
Coooper
in reply to: steven-g

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!

Message 8 of 9
steven-g
in reply to: Coooper

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.

Message 9 of 9
Coooper
in reply to: steven-g

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.

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

Post to forums  

Autodesk Design & Make Report

”Boost