wing Posted June 13 Posted June 13 Just trying to get my field formula based on attribute definition to work. It does not update. My steps below: New drawing. I create attdef (default value: 1000) I create a text. I add field (ctrl F) in that text. In the field dialog box, Objects>Formula Right click in formula, insert field (a nested field). Object>Select the attribute definition. In the formula box, I add "/100". 1000 divide by 100 equals 10. 10 is what I want based on default 1000 value. Save dwg. New dwg, insert block, select that dwg. But when I change the attdef value. It does not refresh. Eg. Attribute change to 200, the field should change to 2. Help please. Thanks. Quote
CyberAngel Posted June 13 Posted June 13 Fields don't update instantly. Try a REGENALL or switch to another layout and back. Quote
BIGAL Posted June 15 Posted June 15 Can you post a dwg with block, then can look at Field formula. Is the attdef in a block or just a attdef ? Quote
wing Posted June 19 Author Posted June 19 (edited) Insert the attached test block into drawing. Default value of block attribute is 1000. If you change that block attribute, the changed attribute values doesn't seem to get passed through. It still stuck on default value. I tried regen, switching from model, to paper and then back to model space. It doesn't work. testblock.dwg Edited June 19 by wing Quote
wing Posted June 19 Author Posted June 19 Hello, I found this info. Seems like the block id gets changed every instance but the reference within the formula doesn't update accordingly, so REGEN doesn't work. User variables was the suggested solution. https://www.autodesk.com/support/technical/article/caas/sfdcarticles/sfdcarticles/Field-calculations-within-AutoCAD-blocks.html Quote
BIGAL Posted June 19 Posted June 19 You are correct for every attribute it has only one single ID, so when you insert the block again you get ID 2. One way around it is to use a lisp to insert the block and add the correct ID to the text. Now where did I put it. Quote
BIGAL Posted June 22 Posted June 22 The dwg provided only has an attribute rather than a block with an attribute, I just like to work that way so will show a solution for an existing block with attributes, pick the attribute and then the text and it will show the result. Maybe later today. Quote
Recommended Posts
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.