ml3428 Posted October 15, 2012 Posted October 15, 2012 I was able to find this Lisp Routine "ATTOUT" forexctracting attributes into an Excel document. I currently have blocks createdthat contain 4 different attribute values. These attributes are exctracted in creating B.O.M's to automate Mfg. processes in conveyor equipment construction.In devloping the B.O.M a specific format is required by the company I work for.Currenntly the Lisp routine does not extract the data in the format I wouldlike. I need this Lisp to "count"the number of blocks and output them into an excel table that follows the format "Qty" "Part #" "Descripition" (See BOM Tab of attached DWG). Model space contains a sampleof some of the blocks that are being used. I have very little experience writing Lisp, and in order to modify the codewould be beyond my abilities. Any helpthat can be provided would be greatly appreciated. Thank You LayoutExample.dwg ATTOUT.LSP Quote
Lee Mac Posted October 15, 2012 Posted October 15, 2012 Would either of these help? http://lee-mac.com/blockcounter.html http://lee-mac.com/nestedblockcounter.html http://lee-mac.com/dynamicblockcounter.html Quote
ml3428 Posted October 15, 2012 Author Posted October 15, 2012 block counter seems is close to what i need; but is there a way to extract the attributes in the block also? It seems that only the block name is being exctracted. Is this correct? Quote
Lee Mac Posted October 15, 2012 Posted October 15, 2012 block counter seems is close to what i need; but is there a way to extract the attributes in the block also? It seems that only the block name is being exctracted. Is this correct? Correct, my existing block counter program will only count blocks by name, since two block references of the same name may (and most probably will) contain different attribute values. However, given the criteria by which you wish to count and differentiate between your block references, I would be more than happy to construct a custom program to meet your exact requirements - feel free to contact me if you are interested and we can discuss the project further. Quote
wishbonesr Posted October 16, 2012 Posted October 16, 2012 Perhaps Jeffery P. Sanders Blocks program. http://www.jefferypsanders.com/autolisp_blocks.html Quote
Glen Smith Posted October 16, 2012 Posted October 16, 2012 Look into the DATAEXTRACTION command. I ran it against your example DWG and got different results from your BOM, but it may get you closer with some fiddling. Quote
ml3428 Posted October 16, 2012 Author Posted October 16, 2012 Thank You for the response. I have looked into"DATAEXTRACTION" and the desired format can be accomplished through this command. Unfortunatelyit is a bit more "tedious" then I am looking for and I would wantsomething more efficient. Quote
ml3428 Posted October 16, 2012 Author Posted October 16, 2012 Thank You for the response, but the "Jeffery P. Sanders Blocks program" is not quite what I am looking for. It seems this program does not combine "like" attributes. This is something I would need to accomplish in completing the data extraction I am looking for. Quote
Manila Wolf Posted October 18, 2012 Posted October 18, 2012 This is very similar to something I asked about on the AUGI forum. http://forums.augi.com/showthread.php?t=136467&page=2 I can create a table within a drawing based on selected blocks. Then extract direct to Excel without using the tedious "dataextraction" Help was given to me by Fixo, who is also a regular poster on this forum. Quote
wishbonesr Posted October 18, 2012 Posted October 18, 2012 This is very similar to something I asked about on the AUGI forum. http://forums.augi.com/showthread.php?t=136467&page=2 I can create a table within a drawing based on selected blocks. Then extract direct to Excel without using the tedious "dataextraction" Help was given to me by Fixo, who is also a regular poster on this forum. This solution is quite good. (I see that you have already posted that it isn't quite what your looking for.) I have another parser that works for me, but my blocks and attributes to filter by are hard coded. This post has inspired me to update it. There are several ways to go about it, but in order to go in the right direction for you, can you supply a dwg with a sample of the blocks you wish to tally? Quote
wishbonesr Posted October 19, 2012 Posted October 19, 2012 (edited) See attached. It's a spawn of hard-coded block tally. Now updated to be (I hope) universal. Need to already have loaded two of Lee-Mac.com functions if you want to batch process (not needed otherwise). LM:ODBX LM:GetFiles You need to go get the functions from Lee because: There not mine You get the latest version You get to see other golden nuggets Features: Process current dwg or batch process Group BOM by drawing or Master BOM Select whether to allow the block name to be part of the comparison or just attributes. This feature allows you to use attribute affinity for grouping, which allows for blocks with different names to be tallied together if the attributes match (also prevents the header from being printed excessively) Select output file (tab delimited) BOMTally.LSP Edited October 19, 2012 by wishbonesr Tinni ittie bittie bug 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.