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 Thursday at 02:08 AM Author Posted Thursday at 02:08 AM (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.dwgFetching info... Edited Thursday at 02:12 AM by wing Quote
wing Posted Thursday at 03:02 AM Author Posted Thursday at 03:02 AM 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 Thursday at 06:03 AM Posted Thursday at 06:03 AM 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 12 hours ago Posted 12 hours ago 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.