Cluster Components
-
I hope you don't mind my barging in on your thread; I have no short term fix just a longer term solution that you and others may like to consider. Based on Sketchup's webdialog (which allows html/javascripts and Sketchup/Ruby interaction) it is this:
Rather than manually clustering components in Sketchup simply pick plain text names to identify them as shown on this nameset.
A nameset is something like a spreadsheet, except its cells move to display just their association with others. Each name with its address (the white trail that leads back to the project) is a unique identifier which provides access to its record, an unlimited series of CSS type name/value pairs that includes sizes, coordinates, source (real and model), price, timing ... and so on, obtained from many sources.
Rather than putting in and then extracting information from a modelling application, you generate models (or clusters) and analyses from the same unfettered plain text data - e.g. you can use web technology to generate different sizes, or abstract and even buy the ironmongery for a whole project.
Here's some code I used to pick up components and position them.
//javascript function productsRun(){ entryNo = parentNo coreIdentityExtractor() para = new Array(theFile,theX,theY,theZ) para = para.join(",") if(sketchup == 1) window.location.href = 'skp;find@'+para }
#Ruby @dlg.add_action_callback("find") {|d, p| a= p.split(",") subDir ="Components/NamesetComponents/" fileName = a[0]+".skp" theX = Integer(a[1]).mm theY = Integer(a[2]).mm theZ = Integer(a[3]).mm point = Geom;;Point3d.new theX,theY,theZ transform = Geom;;Transformation.new point model = Sketchup.active_model entities = model.active_entities path = Sketchup.find_support_file fileName, subDir definitions = model.definitions componentdefinition = definitions.load path instance = entities.add_instance componentdefinition, transform }
Hope you find this helpful/interesting ...
Chris
-
Thanks Chris for your input, its good to know that there are many ways to acheive a similar or better result. I will post you a private message on what I would like the final out come to be. (it sounds as though you may be talking about what I am seeking as a final result). I dont want to bore the rest of the people following this topic although If any one wants me to post the message here just reply and I will try not write a cure for insomnia (hehe).
-
I have taken the liberty of extracting parts of your PM that may be of interest to others.
@aadbuild said:
You will have to forgive me I am not exactly sure how and what the nameset actually does and how it takes the information from sketchup.
A nameset names all the physical things in a human endeavour using plain text and freely available code. This means it can be used by anyone who has an interest in it. Just put the name somewhere accessible and add a universal function call; those authorised can then add their bit. Information you used to make clusters in Sketchup is now captured in the name's record; select a device in the top panel for Sketchup to assemble the components, as in the coding example, or another, to make a time schedule and so on. You might consider a name and its address to be something like a barcode that is key to automating all sorts of things previously done by people (in your case, making clusters). Everyday work, not just code, becomes object-oriented.
@aadbuild said:
Let me know if am getting way to far ahead of what nameset can do....
No I don't think so but I would like to test this in the forum, if anyone is interested. The nameset concept does not work well without modelling and so when I discovered Sketchup and the webdialog everything seemed pre-ordained (well that's probably going too far!). Hopefully, the nameset plugin can be cooperatively developed for use pretty soon.
Chris
-
Here is a zip containing the original file and the 3 ComponentReporter+ reports that take seconds to make. You could easily rewrite the script to read component's attributes as well if needed...
-
Hi Tig, I had a look at the info on the excel sheets that you exported and attached. As i looked through the sheet I had one of those moments where I got all excited as this is what I have been trying to achieve for bloody ages. I will try to get leave from the wife and kids tonight to get it formated so I can use it. You are a champion TIG. I would like to have a crack at editing the script to include attributes but unfortunatly my ruby experiance is very limited. Can any one recomend a ruby book for dislexics?
-
I sent you two PMs on Friday but you don't seem to have picked them up yet ... any problem?
Chris
-
No problem. That's good. Thanks for letting me know.
Chris
-
Hi Chris please excuse my absence unfortunatley I have been caught up in work I will get back to you as soon as I get time with some component instances
-
@aadbuild said:
Hi Chris please excuse my absence unfortunatley I have been caught up in work I will get back to you as soon as I get time with some component instances
That's OK. It was kind of you to offer. I have plenty to do making new devices, annotating the code, testing and so on. I put screenshots of completed devices on http://sites.google.com/site/namesets/ - a measure of progress if you like. You or anyone else are welcome to have a look and comment. You may also find this helpful:
The prototype nameset is for a six storey apartment block with elevator and all the usual stuff. If anyone else would also like to volunteer some components, all will be gratefully received and acknowledged.
My regards
Chris
-
Hi Chris the guilt got to me while I was laying in bed Sunday morning so I dragged my fat arse out and made a model and threw in as many components that i thought would be of assistance. I also put in an excel breakdown of components from TIGS ruby (above). Let me know if you need anything else..
-
Thanks Andrew ... now I feel guilty!
I am sure your components will be most useful but I need some time to examine them. But I also need skps of furniture, fittings, plumbing and suchlike as the basic idea is to use them to define space requirements (working from inside out). You can see from the records extract below that in the early stages of design the minimum spaces set by the components' layouts accumulates the w's and d's back to the start. (As decisions are made and approved they become W's and D's - i.e. fixed.)
1;index; 2;genericName; 2;givenName; 3;childNo; 4;parentNo; 5;theType; 6;collection; 7;product; 8;grouping; 9;composite 0;10;1;Start;5;0;3;11;4;10;w;2017;d;1524 0;11;3;14;3;13;3;12;1;Site;2;Site;5;6;4;10;w;2017;d;1524 0;12;1;Constraints;2;Constraints;4;11;5;8 0;13;3;17;3;16;3;15;1;Design;2;Design;4;11;5;8;w;2017;d;1524 0;14;1;Brief;2;Brief;4;11;5;8 0;15;1;Landscape;2;Landscape;4;13;5;8 0;16;1;Roads;2;Roads;4;13;5;8 0;17;3;18;1;Buildings;2;Buildings;4;13;5;8;w;2017;d;1524 0;18;1;Building;2;Building;4;17;5;6;w;2017;d;1524;3;46;3;45;3;44;3;43;3;42;3;41;3;19;3;40;3;39;3;38;3;47 0;19;3;27;3;20;1;Floor;2;Floor 5;4;18;5;6;w;2017;d;1524 0;20;3;37;3;36;3;35;3;34;3;33;1;Spaces;2;Spaces;4;19;5;8;w;1637;d;1524;3;32;3;31;3;21;3;30;3;29 0;21;3;22;1;Space;2;Bathroom;4;20;5;6;w;1637;d;1524 0;22;1;Sanitary;2;Sanitary;4;21;5;8;3;26;3;25;3;24;w;1637;d;1524 0;24;1;Bath;2;Bath;4;22;5;7;x;1037;y;0;z;0;w;600;d;1524;h;500;model;Bath;rx;90;ry;0;rz;0 0;25;1;Basin;2;Basin;4;22;5;7;x;0;y;0;z;450;w;457;d;400;h;210;model;Washbasin 0;26;1;WC;2;WC;4;22;5;7;x;457;y;0;z;0;w;555;d;600;h;600;model;WC 0;27;3;53;3;52;3;48;3;28;1;Elements;2;Elements;4;19;5;8;w;2017;d;100 0;28;1;Wall;2;Wall;4;27;5;9;s;cube;x;-100;y;0;z;0;w;2117;d;100;h;2800
These records are similar (though more expandable) to the components breakdown but so far they are one way - Javascript to Sketchup. It would be good to make it bilateral so that those who prefer to use Sketchup to establish names, dimensions and so on can do so in the knowledge that their data will be made interoperative.
I am going to buy a headset so I can call you on Google Talk (I think the basic idea should be reasonably clear now not to confuse you with my babble) and also make a video as you suggested!
Toddle pip!
Chris
-
Hi chris, a quick question with the java script imports, are they going to be similar to clicking on components and inserting a java script component?
-
@aadbuild said:
Hi chris, a quick question with the java script imports, are they going to be similar to clicking on components and inserting a java script component?
Whilst the HTML file (including the scripts) in the web dialog is a plugin I don't think it good to think of the functions in the scripts as imports; they are more like commands from a TV remote control. The nameset design doesn't require you to work in the Sketchup display, but it would be good if it were bilateral - for example, clicking on a component in Sketchup reruns the names display, clicking on a name in a nameset causes the blue boxes in the related components to appear in Sketchup. One scenario is one big screen being worked by several people, each with a nameset - visions of war rooms in old films but without the girls in nylons pushing RAF planes around like croupiers.
Got the headset but I won't bother you tonight. Anyway we are off to the movies (looking to pick up a few tips!)
Tp
Chris
-
So the line was not so good - never mind.
Just to recap ...
When you click on a name, namesets finds its plain text record, grabs the name of its component skp file(s) and the x, y, and z coordinates and passes the whole lot to a ruby to display the components in Sketchup in the right locations.
A TV remote control button changes the channel. A nameset name changes a sketchup display. It can also change or compile time schedules, status reports, purchase orders, site instructions, snagging lists and so forth; this is the main point.
I am sure you are right about the screen capture movies, they should make all this verbosity redundant.
Tp
Chris
Added trial video to web site July 22
Youtube Video -
Hi Chris, I have just had the chance to see your youtube video, I was having trouble understanding some of your emails as my mind is on many things. I am sure you are on to a winner with your script it looks to be coming along well. Please dont hesitate to contact me if you need any help, I will do my best to make the time. Unfortunately my participation is equivalent to a bad internet connection, in and out at an unpredictabe rate with no warning.
-
Thanks Andrew. Here is the state of play right now.
Remember the only direct use of the Sketchup interface is opening the plugin. Everything else is done by the Javascripts. Jim has been most supportive with his Ruby expertise, and I want to acknowledge that.
The next step is sorting out the maths to account for the xyz's of the nested components and nested collections of components. This is a bit of a headache. Enough to drive even an Aussie to drink.
Keep in touch. I understand the pressures of running a business. So no worrries.
Toodle pip!
Chris
-
Hi all, I just received a PM that should help if anyone is trying to get breakdowns BOMS or take offs from SU.
@unknownuser said:
I was reading through your post and was wondering if you ever came right with this component reporter. We are trying to achieve something similar. We would like to build models for clients and then let them run the reporter to get a breakdown of the costs. Any info appreciated.
Thanks
ShannonThe answer to your question is I am 90% through the process of perfecting take offs from SU. I have been using several rubies to come up with a result. I downloaded attribute reporter and it works well, you simply add an attribute to an item and then export all attributes to excel. From there you can add prices and coalate the information the way that best suites your needs.
You could also look at rp reports.rb It has a free 30 day trial yet I found the final cost a little high. I am not sure of your experience in SU but the outlinner is you first point of call. You can label groups and component quickly an easily. I guess the hardest thing about getting accurate take offs no mater which plug in you use you must have accurate descriptions on your components. It could be regarded as misleading if your clients are doing take offs from models that have not been made entirely of components , groups or at least every face / edge having an attribute assigned to it.
I guess the reason why I am only 90% through is because I am yet to complete all my components names and attributes, its a pretty big job whilst trying to run a business. You may notice that Chris is working on namesets and he is definately on to something It may take a little while before he perfects it but its well worth looking at the namesets pages and videos. -
Thanks Andrew. There is a new thread at
http://www.sketchucation.com/forums/scf/viewtopic.php?f=80&t=12770 which has an introductory video.Chris
-
Hi all, I have been working on getting complete construction takeoffs from models for some time now and i have come to the conclusion that it can be done accurately but the time taken to draw the model up is sometimes greater than the time it would take to do a manual (computerised) take off. so at the moment I am at a point where I need to rethink my approach. I have a few good ides of an easier way but I need to learn a little ruby first.
I must say that the cutlist5 ruby is by far the best for carpenters and I hope that Chris's Namesets can come up with something a little more polished. For me and I guess a lot of other sketchupers who are in construction a total package more simple yet more comprehensive than rp reports ($1500 are they kidding?) and more versatile than cutlist5 would be ideal. I am going to have to dig out my geek glasses and build it from scratch.
I will keep you all posted.
P.S has any one tried cutlist6, I have it loaded but every time i try to open it I get a URL link error. Am i just a gumby or do you all have this problem? If any one could shed some light on its new features, please post them here. Cutlist 6 may have what cutlist 5 is lacking... and then I may be able to put my geek glasses back in my pocket! Or even better sketchup 7 will come out with a varation of all the above and we can all estimate easily.
Advertisement