When changing a DC attribute, the DC name is added with #1
-
But I think there are a lot of people that are using SketchUp for designing buildings? So when you make a good door or window component, that you can use in every opening, it is not very useful. When you have 5 doors with different dimensions, and you want to make a change in your component, you have to make this change in all the 5 components? The advantage of components is that you can work faster and you don't have to make to much adjustments.
In every case, the DC's are still useful, but I think it could be more useful if 1 DC could have different "shapes" in the same model.
-
That is what I tried to say...
If the DC doors are inserted them 'uniquifies' them, BUT copying them leaves them all them stay instances of the same component and they can therefore be changed globally.
If you want to nest parts like the doorhandles these should remain constant across all inserted copied but be able to be changed globally. -
@tig said:
copying them leaves them all stay instances of the same component and they can therefore be changed globally.
This isn't universally true. Here's the Gridbeam Component which makes itself unique even when copied. In the case of the gridbeam component, it would be better to be able to have just one instance of any given length. As it is, every instance becomes unique even when the same length.
Is there a better way to design this DC in order to make a single instance per length?
http://sketchup.google.com/3dwarehouse/details?mid=6e0fe3e9211f8537d4a71b11b6426b3a
-
An update - if I make a single copy using the Move tool, I get a new Definition (and Instance obviously) appended by #1.
If I use the Move tool to make a copy and enter x4 (for example,) the copied instances all use the original Definition.
So here is a work-around: If I make a copy using the Move tool, then enter x1 for the number of copies, I also do not get a new Definition.
I don't know why there is a difference between making a single copy using the Move tool and making a single copy by entering x1 after using the Move tool.
As another work-around, I found using Copy&Paste (Ctrl-C, Ctrl-V) to copy the Instance does not create a new Definition.
-
Inserted DC instances get uniquified.
I think that a single copy Move+Ctrl is regarded as the same as an insert, all other copying methods make duplicates of the instance so it's no longer unique.
This snippet will make all selected instances unique...Sketchup.active_model.selection.to_a.each{|e|e.make_unique if e.class==Sketchup;;ComponentInstance and e.definition.instances[1]}
Unlike the context-menu 'Make Unique' which works on a single instance OR makes multiple instances with the same uniquified definition ??
BUT if the DC contains nested DCs then even though the host DC is now unique the contents will not be! so editing the contents of one unique DC will edit the contents of its 'sibling' unique DCs... To fix that we need a 'miner' to uniquify those nested ones too...def miner_uniquer(instance) instance.make_unique if instance.definition.instances[1] instance.definition.entities.to_a.each{|e| miner_uniquer(e) if e.class==Sketchup;;ComponentInstance and e.definition.instances[1] } end#def Sketchup.active_model.selection.to_a.each{|e| miner_uniquer(e) if e.class==Sketchup;;ComponentInstance }
for example...
-
@tig said:
Dynamic Components that are inserted are automatically made unique.
This is also not "always" true - a component being made unique on insertion must depend on certain behaviors/configuration of the component or its sub-components.
This simple circle DC, for example does not create unique definitions upon insertion.
http://sketchup.google.com/3dwarehouse/details?mid=d30788b3ef62ff8ed4a71b11b6426b3a
Only when the options are changed does it become unique.
-
You are right - a DC that has no base attributes that change as it's inserted - like your simple circle - will not become unique unless an attribute is changed later on by the user, when presumably a DC observer spots it...
A DC with an attribute set like X/Y/Z will become unique upon insertion of the first additional instance, but thereafter further additional instances are not made unique any more - which is very confusing... -
Thank you so much TIG and Jim for explaining this. SketchUp's habit of making unique instances of identical components (but not ALL the time) was SO frustrating.
A big part of what I'm doing is using models to generate parts lists for projects. Since the otherwise-identical components "bolt", "bolt#1", and "bolt#2" list separately in my cutlist plugin, unwanted unique instances were causing me some real problems.
It seems to me that SketchUp's default behavior should be to make each instance of a component identical, so they can all be counted/edited as one. Make a component instance unique only if the user changes something about it. I'd at least like a setting for this, so I can force SketchUp to NOT make unique instances without the Move + x1 workaround.
-
Well, I found that when I use the Move tool and x1 to make a copy SketchUp does not create a new Definition. However, as soon as a Move either copy, a new Definition is then created.
-
I have the same problem, but for me its worst.
I made a building design, and needed to put like 500 windows. I have made a DC so I can simply tell the the windows is open or close with a combobox. When I change the "state" of the window it creates a new instance with the #n.
In a very short time I will have 500 components in my model, turning impossible to get a list of quantities.
For me it loses all the purpose to have a DC if it not remains unique despite the internal state, like you see in AutoCAD dynamic blocks. -
Same here. That changing the properties of a DC makes a unique component that is "de-linked" from the original component defeats the whole purpose of using components in the first place! You might as well just use groups.
Has any figured out a workaround or anything on this? ...seems like this issue has been around a while.
-
More than one year after the last reply. I am assuming no one found a solution?
I just started using dynamic components and I was starting to be happy of the possibilities they allow, but now I came across the same problem you guys have (it's what lead me to this thread).
It is very frustrating that I cannot seem to identify a rule as to why and when SketchUp decides to make a unique component. For example I have a pipe and users can input the lenght. The component works perfect, no renaming no unique copies, no problems.. no matter what kind of copy/move operation I do.
Now I designed a component a bit more complex. It includes 3 groups and one sub-component. The position of that sub-component plus the size of the groups change according to what the user chooses (drop-down list)
If I just insert the component and move it/copy it NO new instances are created. But If I go to attributes and select the second configuration, right after I press APPLY, a new instance is created #1. Now, copying this new component does not create a #2, BUT if I dare to change one of these copies back to the first configuration, it creates a new instance.
This really ruins the whole purpose of having dynamic components....
At least if we had control over the renaming, for example appending at the end of the initial name, the label of the attribute changed.
Advertisement