LumberJocks

Cutlist4.1 #4: Listing by Sub-Assembly...finally

  • Advertise with us
Blog entry by daltxguy posted 08-03-2010 03:13 PM 3054 reads 1 time favorited 40 comments Add to Favorites Watch
« Part 3: Cutlist 4.1.0.5 - more output enhancements Part 4 of Cutlist4.1 series Part 5: Cutlist 4.1 final »

Often requested and finally here! I’ve finally changed the Sketchup cutlist4.1 plugin to show the partslist by sub-assembly based on the nested components in your model.

I’ve uploaded cutlist4.1.0.6pre

You’re really going to want to delete the old version completely before installing this version because the structure of the plugin has changed completely. The ruby script is now called ‘cutlist.rb’ and it’s really just a stub with all of the main code now entirely contained in a folder called cutlist. The ruby script is now broken up into manageable and logical chunks. This is the first step I needed to do in order to facilitate co-development of the code, which some people have shown an interest in of late and also to manage the ever growing code!

Now for the good stuff. Yes, cutlist can finally display the sub-assemblies which a part belongs to.
The ‘tables’ options window selections have changed ( actually only the names have changed). Selecting Compact provides a listing by unique parts and the number of each required for the project. Selecting By Sub-Assembly Order shows the model broken down by Sub-Assembly and the parts contained in each. Sort by Size lists the part from largest volume ( bd ft for example) to least.

Resulting in a display such as this:

Other changes and a summary of all changes included in this release:
  1. Complete restructure of the plugin files. Rename ruby script in the plugins folder to cutlist.rb and a folder cutlist contains everything else.
  2. Renaming of the ‘tables’ selection, which is used to pick how you want your cutlist to be displayed. “Compact” provides a listing of each unique part required and the quantity of each ( regardlless of which sub-assembly it belongs to and in fact sub-assembly info is not shown). “By Sub-Assembly Order” – show all sub-assemblies and the parts which belong to it. “Sorted by Size” shows all parts sorted by largest amt of board feet (or cum) to least.
  3. Sub-Assembly is shown in the “By Sub-Assembly Order” and in the “sorted by Size” listing and corresponding csv files ( but not compact table)
  4. Sub-Assembly name is added to the CutListPlus csv file. The field was always there but simply contained the part name repeated, now it contains the actual sub-assembly name.
  5. If compact table is selected for the CutListPlus output, then parts will be consolidated ( ie PartCount > 1) only if the parts have the same name, dimensions, material AND sub-assembly name.

I suspect having the sub-assembly appear in the tables will spur some new requests. One of the notably absent features is a way of cross referencing the part on the layout to the cutlist table and therefore to the sub-assembly. I’m working on a part numbering system which can be added to the layout which might help this ( well, it might just also confuse things).

The ultimate will be a new output format which consolidates all the relevant output for a project in a format which is consistent.

As always, feedback, criticism, feature requests, bug reports are always welcome!

-- If you can't joint it, bead it!



40 comments so far

View daltxguy's profile

daltxguy

1373 posts in 2669 days


#1 posted 08-03-2010 03:27 PM

Dave. I just keep updating the same shared link with the newest code, so the download link will still show cutlist4.10pre. When you install it, you will now get 4.1.0.6pre

Yes, the sub-assembly is the name of the first level up from the lowest level.It won’t show all of the nesting.
So if you had Component Desk with sub-component drawer which had sub-components left side, right side, bottom, front and back, it will display ‘drawer’ as the sub-assembly and its parts.

-- If you can't joint it, bead it!

View Will Stokes's profile

Will Stokes

264 posts in 2109 days


#2 posted 08-03-2010 04:10 PM

Very exciting, I can’t wait to take a look. Thank you for taking the intial step of breaking up the code into separate more managable ruby scripts. I think you’ll find it will be faster and easier to develop the script more as a result.

View Mark Shymanski's profile

Mark Shymanski

5121 posts in 2467 days


#3 posted 08-03-2010 09:19 PM

Thanks Steve! I’ve downloaded it now I just need some time this evening to experiment with it.

-- "Checking for square? What madness is this! The cabinet is square because I will it to be so!" Jeremy Greiner LJ Topic#20953 2011 Feb 2

View Quimper's profile

Quimper

8 posts in 2343 days


#4 posted 08-04-2010 11:06 AM

Steve, once again, nice job!
In my way of work, it would be very useful to have the sub-assembly name displaying in the compact table. It’s easier to sort the parts, with the sub-assembly displaying on the labels.
Thanks

-- Philippe @ http://www.atelierdutregor.com

View daltxguy's profile

daltxguy

1373 posts in 2669 days


#5 posted 08-04-2010 11:25 AM

Will – my entire 30+ year career writing code has been with multi-million line embedded systems where the average file length is probably about 5000 lines. The file split was mainly so other people could follow along more easily, if so inclined. So, from that pov, I suppose it will help to develop it further- but it didn’t bother me none!

Philippe – it’s not actually possible to include sub-assembly in the compact list because if the same part is used in more than one sub-assembly, it is counted together in the compact list. ( for example, I might have 4 left drawer sides, 4 right drawer sides but they might all be in different drawer sub-assemblies ). The compact list is really meant to be a summary of like parts. At best you could list the part and then have a list of sub-assemblies to which it belongs in another column. In some ways it is the opposite of the sub-assembly view. Do you have some other ideas of how it should work?

Dave – I’m certain that everyone has a different idea of how it should be sorted. The history behind this view being available is that I needed to sort parts by largest to smallest to use when I did the layout ( largest parts are placed first) so this view is a freebie because it already exists internally.It is possible that is has no value.
A sort by thickness is also possible since this is another thing which is already done when creating the layout.

-- If you can't joint it, bead it!

View Quimper's profile

Quimper

8 posts in 2343 days


#6 posted 08-04-2010 12:30 PM

”At best you could list the part and then have a list of sub-assemblies to which it belongs in another column.”
Good Idea, It’s only the information I need, it would be just easier to sort the parts after.
At the moment, in large projects, I export the sub-assembly (component), and then export the cutlist for each component. In that way, I can blend the different cutlists in a master one with CLP, and have the sub assembly reference for each part for an easy sorting.
In fact it would be a “by sub-assembly”-”compacted” table
I hope my english is understandable.. wouwouw

-- Philippe @ http://www.atelierdutregor.com

View daltxguy's profile

daltxguy

1373 posts in 2669 days


#7 posted 08-04-2010 12:53 PM

If I understand correctly, if you select compact list and then export to CutListPlus, you will get exactly what you want. Sub-assembly is now exported to CutListPlus and the parts list is compacted if the part name, dimensions, material and sub-assembly name is the same (ie: multiple parts with the same criteria are exported in a single line with part count > 1)

Let me know if I misunderstand what you are doing manually and if this is not yet resolved with this version.

-- If you can't joint it, bead it!

View Quimper's profile

Quimper

8 posts in 2343 days


#8 posted 08-04-2010 01:33 PM

Oh yes, you’re right, the sub assembly appears in the CLP file, I apologize. It’s now perfect for me!
Merci beaucoup Steve

-- Philippe @ http://www.atelierdutregor.com

View Shopfan's profile

Shopfan

10 posts in 1648 days


#9 posted 08-14-2010 12:46 AM

Hi Steve,

Yesterday I downloaded the latest 4.1 version (4.1.0.7?—wish there was a way to tell), replacing the older 4.1.04. I removed all the older files first. Now when I activate the plugin in Sketchup 7, I only see the Cutlist screen header and none of the selection items that I know should be there. I removed this version, tried downloading again, same results. Tried with both new and previously working Sketchup models with same results. I removed it again and went back to 4.1.04 and I’m back in business at the lower level. I haven’t seen anyone else commenting on this, so I’m not sure what is going on with my system. I am on Windows Vista 64, Ultimate version.

Any suggestions?

Doug
Spokane Valley, WA USA

-- Doug

View daltxguy's profile

daltxguy

1373 posts in 2669 days


#10 posted 08-14-2010 02:11 AM

Hi Shopfan Doug,

At the beginning of this series, I warned that the versions could change at any time but the link would remain the same. I do, however, add to this series any time I add new features and update the version. Of course, the reason for having 4.1 series separate for now is that some things are being added, some taken away, some things have fixed, then broken and then fixed again. So until I’m confident that I have everything functioning reasonably well, trying out the new features will require a bit of risk taking.

I also warned above that this version is organized drastically different to the previous versions, so you will have to remove the old version completely. Not sure how ‘completely’ you removed the older version. The CutListAndMaterials.rb script in the plugins folder must be deleted and the cutlistui folder should be eliminated as it won’t be used anymore.

This version creates a new script called cutlist.rb in the plugins folder and a new folder called cutlist.

I once had an offer to produce an install script and this too will happen at some point, making the transition much easier.

It does not matter which version of sketchup you are running or your operating system version. I run the plugin on Vista 32 Ultimate, Vista 32 Business, XP Pro and XP for example.

I have had the issue in the past that Vista creates these ‘compatibility’ folders which ridiculously creates a parallel universe inside your box and the directory you are changing is not actually the one being used by Sketchup! Watch out which directory you are updating!

-- If you can't joint it, bead it!

View Shopfan's profile

Shopfan

10 posts in 1648 days


#11 posted 08-14-2010 08:46 AM

I did remove the old cutlist folder and the CutlistAndMaterials.rb file before installing the new version. After installing the latest version, I noticed that there were now 2 “cutlist” listings in the Sketchup plug-in menu, which might indicate that something, somewhere may be left over from the earlier version even though I have removed the files you suggested.. Clicking on either one gets the same results, the cutlist menu without anything but the top heading. The html heading on the page shows “cutlist 4.1.0.4pre”, which isn’t the version I have installed. When I check what is listed in the gui.rb file, it shows that it should be presenting “cutlist 4.1.0.6pre” in the page heading. I don’t know where it is getting this old info, unless it is getting registered in the registry somewhere or somewhere in the Sketchup settings, and not getting updated. Whatever the cause, its keeping the plug-in from working properly. I’ll be glad to do whatever you suggest to find the problem. I know you are busy with the latest changes, and I am quite interested in putting those changes to work, but without being able to install a working copy I can’t get there from here.. Thanks for your kind assistance.

Doug

-- Doug

View daltxguy's profile

daltxguy

1373 posts in 2669 days


#12 posted 08-14-2010 12:09 PM

Doug, I sympathize, but this most likely has everything to do with Vista and not the plugin itself. The plugin doesn’t write anything to the registry or anything complicated like that. It is simply loaded when Sketchup starts, and installs the command in the ‘plugins’ menu. If it is in the plugins menu twice, then there is still a copy of 4.1.0.4 hanging around.

This sounds like a classic case of aforementioned peculiarity with Vista. Here’s how this exact thing happened to me in the past when I was trying to test out some changes and I couldn’t see the changes that I made, but I was sure that I had made the change! Sound familiar?

I was running Vista with User Account Control settings on. The user account I was using did not have Administrator permissions. So, when I went to update plugin in “C:\Program Files\Google\Google SketchUp 7\Plugins” it was actually changing the files in “C:\Users\<myuser>\Appdata\Local\VirtualStore…”

If you go to the plugins directory and you see a label at the top of the window that says ‘Compatibility Files’ and you click on there, you can see where the changes you are making are actually going!

If you go there and make sure the files are properly deleted and installed there, then I believe, all should be right!

Plagiarized from someone’s blog site:
”In Vista the rules are that if you don’t have explicit (by requesting) elevated permissions to write to C:\Program Files, the system lets you think you are writing there but actually redirects (virtualizes) your writes elsewhere. ”

I now run Vista with user account settings disabled and my user is Administrator – I think I can trust myself to be the administrator since I am the only one who uses my computer!

btw, I am never too busy to answer questions about the plugin and I am not eternally busy with updating the plugin. Like woodworking, it’s a hobby and when the weather turns nice, I am in the garage making sawdust like everyone else!

-- If you can't joint it, bead it!

View Shopfan's profile

Shopfan

10 posts in 1648 days


#13 posted 08-15-2010 11:12 PM

Vista was the culprit. After killing and reloading Sketchup, just to see the results, and also checking the “shadow” files as you suggested, I saw no change and there were no shadow files. On a hunch, I added administrator status to the shortcut that starts Sketchup. That solved the problem. The previous 2 cutlist listings in the plug-in menu were now only 1, and the cutlist setup form now included all the checkboxes, etc. It works great, and the new features are just what I needed. Thanks for your patience and the helpful replies.

Doug

-- Doug

View daltxguy's profile

daltxguy

1373 posts in 2669 days


#14 posted 08-16-2010 01:27 AM

Doug,

I’m glad to hear that it is now working. It’s not what I thought it was but thanks for sharing it since it could be yet another issue which someone else encounters,

-- If you can't joint it, bead it!

View punking's profile

punking

9 posts in 1806 days


#15 posted 08-22-2010 03:57 PM

this is great!
I installed it and it works like a charm! thank you for developing this enhancement, it will be very useful.

chris

showing 1 through 15 of 40 comments

Have your say...

You must be signed in to post the comments.

DISCLAIMER: Any posts on LJ are posted by individuals acting in their own right and do not necessarily reflect the views of LJ. LJ will not be held liable for the actions of any user.

Latest Projects | Latest Blog Entries | Latest Forum Topics

HomeRefurbers.com

Latest Projects | Latest Blog Entries | Latest Forum Topics

GardenTenders.com :: gardening showcase