Squirltech Posted February 26, 2014 Posted February 26, 2014 All- I have been asked to look into making a BLOCK (or whatever will work) that will do some simple math and display the answer accordingly. As shown in the attachment, I want the COVER to be an elevation (which may have to be hand entered), CLAY to be an elevation (which may have to be hand entered), and SG to be an elevation (which may have to be hand entered). Then I want to SUBTRACT the CLAY from COVER to get TK2 and subtract SG from CLAY to get TK1. I'm thinking it's going to require something with an EXPRESSION incorporated if it can be done at all. Any and all help is appreciated and I thank you in advance. T Quote
ksperopoulos Posted February 26, 2014 Posted February 26, 2014 Have you looked into fields? I'm not sure, but it may be an option. Quote
BIGAL Posted February 27, 2014 Posted February 27, 2014 If your inserting the block then its easy just ask the questions via a lisp then insert the block filling out the attributes with the correct answers. If the block exists and has some default values ht=0 etc then again you can click on block ask questions accept existing value and then update the other two values. I would look at fields also. Your turn what method are you doing. Quote
steven-g Posted February 27, 2014 Posted February 27, 2014 Definately fields, there is an option to use fields in fields as a simple formula, Quote
Squirltech Posted February 27, 2014 Author Posted February 27, 2014 I'm going to give fields a try. Thanks all for your input. Quote
Squirltech Posted February 27, 2014 Author Posted February 27, 2014 UGH!! I think I'm making this more difficult than it actually is. I've watched tutorial videos but most are using an object and using FIELD to calculate the area. I'm wanting to use a hand entered elevation (COVER) and then subtract another elevation (CLAY) and give me the answer for TK2. Then I want to repeat those steps using CLAY and SG to give me TK1. Does every number need to be a field? Does every number need to be a block? I've really hit a wall and appreciate any help I can get. Thanks in advance. T Quote
steven-g Posted February 27, 2014 Posted February 27, 2014 This is the block I used, Just fill in the values in the properties palette, and regen. There is a grip on one arm of the cross, that's there for when you insert the block, it won't start working until you perform a dynamic action on the block (anything dynamic, so just move the grip to another arm) once going that's it and you can copy the block as often as you want and all will work. It is all attributes but only the TK1 and TK2 use fields (formulas). subtract.dwg Quote
Squirltech Posted February 27, 2014 Author Posted February 27, 2014 This is the block I used, Just fill in the values in the properties palette, and regen.There is a grip on one arm of the cross, that's there for when you insert the block, it won't start working until you perform a dynamic action on the block (anything dynamic, so just move the grip to another arm) once going that's it and you can copy the block as often as you want and all will work. It is all attributes but only the TK1 and TK2 use fields (formulas). That works pretty slick. Thank you!! T Quote
Squirltech Posted February 27, 2014 Author Posted February 27, 2014 I had to dissect yours to see how it all worked together and then I made my own. It works good and is exactly what I was looking for. Thanks so much for all your help! T Quote
steven-g Posted February 27, 2014 Posted February 27, 2014 Your welcome, glad to hear you could work out what is going on in there Quote
Squirltech Posted February 27, 2014 Author Posted February 27, 2014 I'm not sure why it had to be a dynamic block though. Any ideas? Quote
steven-g Posted February 27, 2014 Posted February 27, 2014 A field inside a block can't read another attribute inside the same block unless a dynamic action is performed on that block (when the block is inserted). You can do it by adding in fields into existing blocks if memory serves me correctly. And after a block is working it never needs to have the dynamic action repeated (just a regen to update changes). You can also copy the working block and not need to use the dynamic action. It's just a quirk of fields and attributes. At least that is my understanding of it. Funny thing is, you can grab that grip drag it around and drop it back at the same point and it works to kick start the fields. Quote
Squirltech Posted February 27, 2014 Author Posted February 27, 2014 A field inside a block can't read another attribute inside the same block unless a dynamic action is performed on that block (when the block is inserted). You can do it by adding in fields into existing blocks if memory serves me correctly. And after a block is working it never needs to have the dynamic action repeated (just a regen to update changes). You can also copy the working block and not need to use the dynamic action. It's just a quirk of fields and attributes. At least that is my understanding of it. Funny thing is, you can grab that grip drag it around and drop it back at the same point and it works to kick start the fields. This is some really good information to have. Thanks again steven-g for all your help. Quote
Squirltech Posted February 28, 2014 Author Posted February 28, 2014 Could this block be ANNOTATIVE? It seems that as soon as I make the block dynamic, it loses the formula connection. Any thoughts? Quote
steven-g Posted February 28, 2014 Posted February 28, 2014 Not sure I understand, can you post an example of what you are trying Quote
Squirltech Posted February 28, 2014 Author Posted February 28, 2014 Could this block be ANNOTATIVE? It seems that as soon as I make the block dynamic, it loses the formula connection. Any thoughts? I should really proofread my posts before submitting them... The block you sent me, I worked through it and then made my own. I was then wondering if I could make the block annotative so it would scale automatically but when I make the block annotative, it seems to lose the math capabilities. So my question is, can this block be made annotative? It's not necessary, I am just curious for my own benefit. Thanks, T Quote
steven-g Posted February 28, 2014 Posted February 28, 2014 OK never tried that (I hate annotative anything ) I'll try it out Quote
steven-g Posted February 28, 2014 Posted February 28, 2014 Looks to work, I still don't like annotative, I can never get the things to all be in the place I want, change scales and the stuff moves where it wants. Hate it YUK. subtract-b.dwg Quote
Squirltech Posted February 28, 2014 Author Posted February 28, 2014 Looks to work, I still don't like annotative, I can never get the things to all be in the place I want, change scales and the stuff moves where it wants. Hate it YUK. Looks good steven-g. Thanks. Quote
Squirltech Posted March 4, 2014 Author Posted March 4, 2014 Update I have made this block multiple times, with different actions being carried out and it works great! 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.