Jump to content

Table for block values


Hsanon
 Share

Recommended Posts

Hi

As a small estimation routene, I would like to extract block scale values  (not attributes)  into a table, and into excel. 

My drawing is mostly created out of scaled blocks.

From a selection window of items,  I would like to make out a table (and export to excel) :

Preview

Block Name

X Scale

Y scale

Number of items

I wouldnt know if its possible, to automatically number the items in the drawing, and correspond them with the table and excel, so we can relate the item with the sheet

 

Its an extension of Lee's Count routene, which I would like to take into excel and then do the formatting and the math to pull out some bill of materials

Any suggestions ???

Thanks

 

 

Link to comment
Share on other sites

I have something at moment it uses attributes so compares a block name but also compares attribute values so it could be changed to work with X Y Scales. It makes a table now but could write a csv file, it supports up to  5 levels deep of attributes.

 

Block X Y how many

BLOCK 22 10 15 found

BLOCK 20 12  3 found

BLOCK 22 5 12 found

 

I am looking at a small fee for it, but can provide a test version. Can you describe a bit more or maybe provide a real test dwg if not the blocks  can be say simple rectangs but with different names.

 

 

Link to comment
Share on other sites

Is it possible to create tables / csv outputs in simple auto lisp ??? 

I don't know visual lisp...... 

Possible to update the LeeMAc count code in normal simple auto lisp ???

I could try myself.... With some basic help from you guys where needed...

should i try to use Lee's attribute function vanilla lisp to insert x and y scale attributes to the blocks  ?? And then try to extract them to a table / file  with some help ??? Would that work ???

again, thanks Lee for all the fantastic programs for novices like me...

Edited by Hsanon
Link to comment
Share on other sites

What you want is a bit custom but not hard, that's why I started to make a global block count with options. And have already done the X Y scale change to the original code just need to debug a bit more. Its not hard to either make a table or write a csv file for excel import. The next level direct to excel is extra coding but method is readily available.

 

If your proficient with excel then a csv is easy and let excel do all the work, you can do that now using Dataextraction. 

 

image.png.ca488efb6094d4d36d3e2dc7b60ff5bb.png

 

Link to comment
Share on other sites

Yes. This seems to be working, and if it is extracted into a csv file it can be manipulated into something useful in excel. 

Link to comment
Share on other sites

hi, apologies for the delay in posting this drawing, the current situation here is not the best !!!

This is a basic cupboard shelving drawing, using one 2D block. Eventually, there will be other blocks added too to populate the drawing. 

We should also put in a z scale, in case the drawing done using 3d blocks. 

 

Thanks for your help. 

Drawing2.dwg

Link to comment
Share on other sites

I had to play a bit change units etc. Some of the scales are a bit strange like 314.2 0.2mm ?

 

Any way

image.png.6c82fa624be2102ab19c3e4dd29afc7d.png

 

For me I would not do it this way I would ask questions and draw the panels possibly as plines, there are rules about your tolerance on the panels else shelves will not slip in. The desired end result cupboards book case etc lends it self more towards a few custom routines. Adding components via say height above and width. 

 

Yes want Z you can use thickness for this rather than going down the full solids path. The table should be sorted then compare so say x is 15 material thickness Y and Z are values. The -15 is a mirrored block easy fix.

image.png.21f5c0e5b8d29cbee9902dd11c681caf.png

 

Have a look at this draws a simple table in full 3d.

 

screenshot159.png.44bc79abc322909f7dc3cbad24f8219f.png

 

Lastly I will forward onto some one for their comment in mean time any one out there got cupboard lisp. I know commercial software is out there.

Link to comment
Share on other sites

Thanks for your help. I feel it may be difficult to go the 3D table route (your pic above) as the options in shelving will be massive. There eventually will be glass shelves, drawers, veneer cladding, hardware, etc. and many more items populating the shelves. I feel individual lisp routines stuck together may help out in piecing the item together.... Any way, this 2d sample sent to you was done with a simple auto lisp routine written by me..... (Some scales in the drawing may be weird since it was done just as a sample)

Eventually I'll make out a routine using 3D objects (basically I'll add the z scale to the routine)

 

its the material output in CSv and visual lisp which I am clueless about....and I was hoping for some help from you guys to put it together 

 

Edited by Hsanon
Link to comment
Share on other sites

I used a pline 1 x 1 then thickness 1 this is the same as a solid to make the block. So X Y Z scale works.

 

The issue is not in getting the x  y z scales but rather the sorting algorithm's that's where the time comes in, do you want each panel sorted by longest length X Y then Z ? Just change this to write file for csv but note no totals.

 

(setq ss (ssget '((0 . "INSERT")(2 . "aaa"))))
(setq lst '())
(repeat (setq k (sslength ss))
(setq obj (vlax-ename->vla-object (ssname ss (setq k (- k 1)))))
(setq x (vla-get-Xscalefactor obj))
(setq y (vla-get-yscalefactor obj))
(setq z (vla-get-zscalefactor obj))
(setq lst (cons (list x y z) lst))
)

 

For me something like  X Y as Z is accept or change then from point x and y, then rotate 90 ? The values are saved between each go so could be just change y offset for multiple shelves etc.

 

The dcl are available here as they are not hard coded. Rather a user library routine. 

 

image.thumb.png.184496b57c39a92f49f129c1987c74c3.png

 

Link to comment
Share on other sites

  • 2 weeks later...

Hi....many update on the 3D block extraction routine ??? 

Any suggestions on any forums I can look at for routine like this ???

Link to comment
Share on other sites

There are numerous cabinetry software out there but it will not be free. 

 

Thinking more could  add a block as each panel is made giving a panel number and sizes rather than x y z scale and produce a panel list.

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...