Components, Layers and Component Collections
-
actually, there is a very simple explanation to that.
if you place a component in a model and then put it onto another layer, this information is applied to the 'outside' of the component, but doesn't affect it in any way. its pretty much the same when you apply a colour to a component.
lets say you've got five copies of the same component in your model. now you paint one of them bright red. only this one component changes the colour. if you want all the others to asume the same appearance, you have to enter the component and actually paint the content, not the component itself.thats like if you've got 10 eggs. where you store those eggs (whether in a proper egg carton or in a velvet cloth) or if they have been painted for Easter... all that doesn't affect the eggs themselves...
so if you want the eggs to be red and wrapped in carton, you have to store them that way - a carton with red eggs inside.
or to translate it back to SketchUp: you have to store a component, with a group inside, thats painted red and placed on the desired layer...
I hope that made sense to you (and I didn't explain something that has been known already)
-
SUp is doing it right. A component goes on the current layer - and that's usually Layer0.
The recommended way is to have your 'raw-geometry' on Layer0 and then put groups/component-instances on the desired layers... That way you can have the same joist used on several floor levels that each have their own layer...
It's easy to fix this - select the instance and get Entity Info, in the Layer Info change it to the layer the raw-geometry has OR any other layer you desire...
You can force it to import it as component on a set layer by editing the component file and making it all a component on the layer you want, you explode the imported/inserted compo after placing it, thereafter you have the one you wanted on the right layer... Messy!!!
Easier to change its layer using Entity Info after placing it OR change your current layer to put it onto the layer you want initially... -
I guess I must have been having a senior moment...probably confused by the fact that all the FF content disappears if you turn its layer off, because that's where all the geometry is.
-
thanks for all the replies, I can see why it is standard this way and for good reason. Say I take the egg example\
@unknownuser said:
so if you want the eggs to be red and wrapped in carton, you have to store them that way - a carton with red eggs inside.
I guess what I am asking is... Is it possible to get the chook to lay the right colour egg genetically.(ruby?) Or is it possible to tape a red bucket of paint to the chooks bum?
I am not suire if you guys have read my other posts but I am trying to piece together the BOM puzzle and if it where possible to save a component to a layer and have all the componet be on the layer it would help me coalate the information with out manually going and changing it to its own layer. SOmetimes a model will have 500 components. If i had say: all the toilets on 1 the pc layer, when I did the take off I would know i had 30 toilets to order (preferably without having to manually having to change them to the correct layer).
When i first started this post i thought i was doing something wrong. I do remember downloading componets from 3d warehouse and they were on there own layer. may be it was just the geometry. Has sketchup changed the way it does this between su 6 an su7? -
To stop SUp adding component instances onto the 'correct' layer [the current layer] you need to invent your own 'component-inserter' browser... So say if you want to insert a joist you DON'T do it from the Component-Browser, but from your own 'component-inserter' browser... that way it it can fix the joist's layer as you might determine - from it's 'type' or from a dialog asking for the layer ? ...
Alternatively you invent a complex observer that spots whenever an instance is added to the model and sets its layer to suit something - like the instance.definition.entities[0].layer ???
If you explain exactly where you want to end up, and where you are starting from, then the solution might be more obvious, or at least clearer... -
or you can do it the dirty way...
create a component within the component. place this inner component on the correct layer. call the inner component by the correct name (e.g. toilet) and call the outer component something like 'toilet_container'.
now you've got everything you want:- when hiding the layer 'toilets' all the toilet components will become invisible.
- if you check, how many of those toilets are in the model, it will show you the right amount
- when placing the component, you don't have to mess around with layers. they are already placed
there are two downsides though. firstly, you've got an unnecessary component in you browser (the 'toilet_container' component); and you actually have to expand your view in the component browser in order to see the ones you want, which clatters the browser with all the nested components as well. good thing is though, that it won't increase the file size too much, for the content of the container component is just another component.
secondly, if you press Ctrl + A to select everything within your scene, even with the toilet layer switched off you will select the container components (even if they are not visible). that may cause some unwanted deletions if you are not careful.you could of course always explode the container components. but then its not too much of an effort to simply place the component on the right layer manually in the first place...
-
Oh and Tig I am not disputing that layer 0 is not the correct layer for componets to be placed on. I am simply asking if it were possible to have it on the layer I decide not the layer Sketchup decides.
-
@unknownuser said:
If you explain exactly where you want to end up, and where you are starting from, then the solution might be more obvious, or at least clearer...
Sorry if I sound a little vaigue. basically, from start to finish:
- I have my own library of components that I use for all my models.
2.I place the components in new models and I report the components by layer ( with a ruby). - The problem for me is: when I import a new component from my collection I have to go and manually change from layer 0 (the "correct" layer thanks TIG) to the layer I initially saved it on so that the component is where I want it to be in the report.
There could be 500 components which takes some time to adjust even If I do it in outliner. It also brings a lot of human error into the mix.
A 'component-inserter' browser is above our ability and probably more complex than I have time to tackle. Thanks I appreciate the suggestion though.
oh and plot paris I like the dirty idea, thanks. it will get me out of trouble until I come up with some thing new
- I have my own library of components that I use for all my models.
-
Andrew, please consider this what you might call low tech solution.
Use the word joist to indicate you need a joist. Add dimensions, either exact or for later adjustment. Make a component say 50 x 175 x 1000mm and save it in a file called joist.skp. Arrange it so that when you click on the word joist you can also click on other words that link up to functions to import it into your model, scale it, make arrays, and so on.
When you have made more components in this way, you can collect them together under another name, say structure or floor 12 or timber. One component can belong to as many collections or groupings you care to name. Dimensions and labels would need to go on layers because they are part of drawing rather than components, but everything else can go any place because you are able to generate only the components you wish using the collection, grouping or component names you have selected.
Rather than extract a BOM a BOM generates** the model ... and with other devices just about anything else you need to support physical activities.
You and I have talked about this for more than a year, but now my cavalier attempts at coding have been taken in hand by Jim and we now have a Web Dialog/HTA/In browser operating system that we both consider stable, extensible and of universal application. You can see the first application here, but probably of more interest to you will be the machine that is suitable for more "horizontal" associative indexing - e.g. from project through to door hinges rather the long "vertical" lists of Classes and Methods in the API device.
The problem lots to do makes it difficult to know what to do first - the API devices like plugins index to show off the functionality or, for me the more interesting, general purpose machine
and building industry devices that I think are of interest to a few here.
My regards
Chris
edit ** or modifies - can just hide/show -
Thanks Chris I do like the way name sets makes it easy to organise components, layers and variable tasks. I am still trying to figure out where the web dialogue box fits in. I guess my need for a BOM is to know which components are in the model and have them in a way they can easily be grouped acording to supplier and the job progress. I do this by using layers (more of a named group) as the job stage. It would probably be easier to do this with namesets but I have not spent enough time lookig at how it would go together . I guess the only way would be to give it a go...
would you lke a model example? and we can compare notes. Your way verses mine? -
@aadbuild said:
... I am still trying to figure out where the web dialogue box fits in.
This little thing can sit inside a web dialog to make it easy to give Sketchup commands like in the .rb file attached. The function of the machine is to knit a nset (nameset) of all the things you associate with yourself in a top down hierarchy. So one trail from the name office would go:Office>Projects>Project 1>Building>Ground floor>Space> Sanitary ware>WC suite.
Of course there would be many trails like this with inherent and custom cross links. For example, sanitary ware is an inherent link you can use to pick up all the sanitary ware but you might also set up a "week1" name and link all planned deliveries (possibly including sanitaryware). The menus on the right pick up devices both to build the nset and use it to assemble models, purchase orders and so on. So Add is obviously the first device I need to make.
@aadbuild said:
I do this by using layers (more of a named group) as the job stage.
I understand but plain text is king if you want to use it for many different tasks. Doming plain text (making into HTML) means you can automate what you otherwise have to do by hand (in Excel for example).
@aadbuild said:
I guess the only way would be to give it a go...
would you lke a model example? and we can compare notes.
.Yes of course and I am working towards that. I already have one of your models but I don't think it sensible for me to strip out its attributes into a plain text list (for converting to json) better to get on with the machine. But a snapshot of your components subdirectory would be useful to see whether we can easily adapt and incorporate your naming system.
@aadbuild said:
Your way verses mine?
Actually we both have similar aims so I think it's more like pushing the thing to a natural and satisfying conclusion. But a little rivalry is healthy!
Chris
-
@chrisglasier said:
But a snapshot of your components subdirectory would be useful to see whether we can easily adapt and incorporate your naming system.
I wonder, Andrew, instead of a screenshot, you could copy six of your component files into a folder, zip it and send it to me. I hope these pics and notes will help to show where I'm at and why such a folder made by someone else would be a good design prop.
What I want to do next is to get the machine to read the file names of your components, strip them of .skp and populate the product (component) names slider with the results. So after this step the machine will be a component importer and instance namer. At the same time of course it keeps a tally of the numbers. After that I will make it into a kind of super measurement box, and then a means to hide and show components by entity (location), grouping (purchases), headers (subjects) or individual component. I am not intending to get involved with positioning and rotations as before, but I have some code worked out for tracking resizing in Sketchup (so actions are bilateral).
My regards
Chris
-
HI Chris Christmas has come upon me and I have had no time to do any more work but I will get to it as soon as I can. I have spoken to mIke and we will have a seperate forumn for the estimating ruby in the new years. Ther ewill be a preliminary beta test. I am alos working on a yotube ppresentation to show what we are doing and how we are doing it. I hope to get much feed back from yourself and the Sketchup community.
-
Ithink that NS has a lot of merit and I would like to have it as part of my work. email me when you get a chance thanks Chris
-
@aadbuild said:
HI Chris Christmas has come upon me ...
This post is really meant for you Andrew but there may just be others who are interested in this type of thing.
Well I think the time has come to see whether our efforts can be merged in any way; here is a kind of wip video that may help consider how.
[flash=400,300:2mzchx54]http://screencast.com/t/ODIzNmQ3ZDgt[/flash:2mzchx54]
The Internet is a bit dodgy around here. So here is the Screencast link
Also a zipped avi
Advertisement