MarcoW Posted July 7, 2009 Share Posted July 7, 2009 I was wondering, is it possible to collect a bunch of blocks / attributes and calculate with it? For example if one block called "light" has an attribute with value "100" (meaning 100 Watts) and another block "light" with att.value "200", can we add em up together? Don't need lisp but maybe some useful links so I can read more about it. Quote Link to comment Share on other sites More sharing options...
ronjonp Posted July 7, 2009 Share Posted July 7, 2009 You could export the blocks with attributes to a txt file using ATTOUT. Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted July 7, 2009 Share Posted July 7, 2009 If you wanted to use a LISP, the attribute values are STRings, so you would need to convert them into either INTegers or REALs, using such functions as: atoi or distof, before performing your calculations. Lee Quote Link to comment Share on other sites More sharing options...
The Buzzard Posted July 8, 2009 Share Posted July 8, 2009 I was wondering, is it possible to collect a bunch of blocks / attributes and calculate with it? For example if one block called "light" has an attribute with value "100" (meaning 100 Watts) and another block "light" with att.value "200", can we add em up together? Don't need lisp but maybe some useful links so I can read more about it. Hey Marco, Attached is a program and drawing for you to test the program. It totals a block name with its attribute value and places it in another block. You can modify the program easy by changing the block names and attribute tags in the program. Just review the drawing and program and you will see what needs to be done to make it suit your own needs. Any help needed feel free to ask. Good Luck, The Buzzard BOM.dwg BOM.lsp Quote Link to comment Share on other sites More sharing options...
MarcoW Posted July 8, 2009 Author Share Posted July 8, 2009 @ The Buzzard: Thank you for sharing, it is exactly what I mean. I will read into the comments that are placed within the LISP. It looks as if it can be learned by me . If I can I will try to modify it with a second attribute, like "only add up the values if the second attribute is v1". So the result wil be a table like: Version Total V1 10 V2 12 V3 6 And not total = 28 / But thats for later, now I ll have to dig in my work. @ Lee: That it were string I knew, and that it should be converted somehow also. How, thats anonther thing. I see you had a hand in the Buzzards lisp, or at least he credits you for it. Nice work. @ The Buzzard again: Am I correct: you where on the forum at 5.42 am? May I ask where you live? Quote Link to comment Share on other sites More sharing options...
The Buzzard Posted July 8, 2009 Share Posted July 8, 2009 @ The Buzzard:Thank you for sharing, it is exactly what I mean. I will read into the comments that are placed within the LISP. It looks as if it can be learned by me . If I can I will try to modify it with a second attribute, like "only add up the values if the second attribute is v1". So the result wil be a table like: Version Total V1 10 V2 12 V3 6 And not total = 28 / But thats for later, now I ll have to dig in my work. @ Lee: That it were string I knew, and that it should be converted somehow also. How, thats anonther thing. I see you had a hand in the Buzzards lisp, or at least he credits you for it. Nice work. @ The Buzzard again: Am I correct: you where on the forum at 5.42 am? May I ask where you live? Sorry I am late, I forgot to log out. I was on the forum all crazy kind of hours, I guess I must be bored. My location is Manhattan, NY USA. Anyway the program is annotated completely for your benefit. Please study the blocks as to the way they are named and their respected attribute tags. Compare this information to the program. You can makeup your own blocks the way you wish and just modify the block names and attribute tags in the program. There is nothing hard about it at all. If you get stuck please feel free to ask questions. Just to mention, Lee gave me some great help last year for a program that was similar to this one. I had put some extra time on my own trying to get the program to work the way I wanted it to. You have a good start now. If you decide to change this program on your own there are plenty of resources for you to choose from to help you learn lisp. Good Luck, The Buzzard Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted July 8, 2009 Share Posted July 8, 2009 Just to mention, Lee gave me some great help last year for a program that was similar to this one. I had put some extra time on my own trying to get the program to work the way I wanted it to. Thanks for the mention mate Quote Link to comment Share on other sites More sharing options...
The Buzzard Posted July 8, 2009 Share Posted July 8, 2009 Thanks for the mention mate Thanks for the help mate You are always a big influence on the programs I make. Sometimes I find things in the examples you provide that lead me to answers for other programs yet to be conceived. Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted July 8, 2009 Share Posted July 8, 2009 Thanks for the help mate You are always a big influence on the programs I make. Sometimes I find things in the examples you provide that lead me to answers for other programs yet to be conceived. Always good to hear I can be of some assistance Quote Link to comment Share on other sites More sharing options...
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.