Hi there,
I'd appreciate if anyone can help me on this.
I'm trying to create a block with 3 attributes say, A, B, C for argument's sake. When introduce this block in my model space of the drawing I would like to be able to change values A & B as a number and for attribute C a formaula = A-B. I've searched on youtube and I've seen a video and tried to follow it religiously, but I can't get it to work. The number in this case will be a level, so formatting would hopefully be 00.000.
Thanks in advance
Here is a similar tread http://forums.autodesk.com/t5/autocad-2013-2014-2015/using-fields-in-attributes-cutting-up-data/m-p/...
I have tried with diesel and fields.
I'm not that good in diesel and I couldn't get the attribute values from A and B.
Depending on what you are doing you could take a look at the verticals like Architecture.
I was going to use it to work out depth to invert on manholes references. i.e If A were to be the cover level. B is the Invert level, I wanted to be able to calculate C the depth to invert automatically from the attributes. Something similar to the video below, but without the attribute showing the workings out.
In the attachement is a working example, the video you saw shows it well, but does't explain it. In order for a field to read another field in the same block you first need to perform a dynamic action on that block (any dynamic action) it doesn't actually have to do anything. The explanation is long winded but look at the example, if you create the formula correctly, then it should work.
In the example the block on the left is a newly inserted block and changing the values of attributes "ONE" or "TWO" changes those valuesin the block, but has no effect on "THREE" the block on the right will change (after a regen). Click on the left block and change it's visibility state, and then it will start working. You only need to change the visibility state once as this activates the fields in that block (it actually turns it into an annonymous block - short winded explanation).
It's also a good idea to change the properties of attribute "THREE" to preset so that you are not prompted for a value when you insert the block or you might accidently overwrite the fields. If you still get stuck then post a copy of your block.
Unfortunately thats just how this works, without performing a dynamic action to change the block, the formula in the field is still looking at the block definition for it's input, as soon as a dynamic action has taken place then the formula refers to the attributes within itself, the good news is it only needs doing once, and if you then coppy that block around the drawing or for that matter into different drawings, then each instance will behave as you want, there is no need to worry about the dynamic action again. I just ran a quick test and placing an active block onto the toolpalette, looks as though when the block is inserted into another drawing that the field works straight off.
Hi
Perhaps you would be able to tell me if it is possible to modify text values (append/remove) from the source block to the second block. I have placed my query on the forum earlier.
Please see
https://forums.autodesk.com/t5/autocad-forum/add-more-text-to-linked-block-attribute/td-p/7254967
regards
Paul
I spent several hours trying to make it works without success. Depending how you create the block and attribut, the formula sometime works, sometime not. It has a unpredictable behavior. The best I've got was to make it works one or two times only and than get this symbol "#".
Here is the file. I want to actually use the first four fileds to fill automatically the fifth one called "serial number". Note that the serial number is shown intentionally very small in the circle.
Thanks for your help!
Louis Turgeon
I must admit to having a hard time changing your block to work, but things like having a prompt in the attribute being used to collect the information doesn't help, and at I guess it looks like some attributes have been created outside the block and then brought in, because they reference as a block in the object field, and a really odd behaviour of the "NUMÉRO-SÉRIE" attribute is it shows the VALUE inside the block editor where I would normally expect to see the TAG. Rather than trying to figure all that out and trying to fix it in your block, I have created an example of a block where it is setup with 4 input attributes one of them invisible, and these are combined into the container attribute to show after the visibility state is altered and a regen done on the drawing.
To recap, in order for this trick to work the attribute used to reference other attribute values needs to have the prompt value empty, be position locked and set to preset so that the fields aren't overwritten. And then a dynamic action needs to be performed on the block followed by a regen in order for the block value to update. This dynamic action only needs to be done once in the life of the block and once a block is activated then it can be copied, and copies work.
Hi guys,
I am having a very similar problem and can't get the text to apply the value.
Spent a fair bit of time fiddling now and I feel like I am going in circles.
I have the field expression inside the attribute linking to another attribute that I can edit
Thank you,
Brendon
That is fantastic, its always one little tick box that takes ages to find.
Is their a way of stopping that TAG from appearing in the attributor editor.
So that it is very difficult to manually overide.
Thank you,
Brendon
You can place the att containing the field on a locked layer. I think that would be a workable solution in your block. It can cause odd text justification issues but in this case I think it would work ok.
Thanks Libbya,
I just tried this. If I put one of the att values on a locked layer, the block seems to freeze out all the attributes, not just those on that locked layers.
When I manage the attributes, those that are on a locked layer have the L in the mode column.
I can reference a second block with the input values but this would be a bit of a work around.
Have I missed something?
Thank you very much for teaching us. I figured out by myself that autocad was reading the standard value of the attribute but not the new ones that we add, but i didnt realized how to fix it, i did how u told me and it worked.
Now i have just a small problem, i am doing a type of project that i need to show the positive or negative valur of the number. If the formula in the attribute gives me a negative value autocad shows me the - symbol, but if the value is positive it does now show. How can i fix it?