Copy Component without creating new instance component

components

#1

Hi guys… please help me out. I’m currently having an issue about component. When I create a component as usually (ex. Component Name : Box), then I was using Move-Copy tools to create a similar component, it should under same name also “Box”, right? but, I don’t know why it became to Box#1 as another intended new component which unrelated to that component Box. so, when I edit the component those Box ad Box#1 are not affected between each other. And I also see that there is no way to click Make Unique for any of those components.
So, please advice me what should I do? Thanks

see here pls : https://ufile.io/m5g85


#2

@Hepi,
When you make a copy of the component box the model should appear as follows. Both copies are defined as box

two copies of box component.png

After you right click the second box and select make unique, the model looks like this. The first box is still defined as box and the second unique one is assigned the definition box#1.
If this is all that is in the model, when you try to right click either of these components the selection Unique is grayed out because both components are already unique at this point.

box and one box made unique.png

Zaz1


#3

It seems that this is not what actually happened with @Hepi … Or maybe I do not understand myself

Anyway, check the Component Window here


Sketchup
the program may be understanding that when copying, a “box” is an internal component and another box is another external component to the file you are working on


#4

Also, your template may be uncleaned. Try either to purge the file:


…and then, model a box component and copy it


#5

Hi @zaz1
thanks for your response, but unfortunately your opinion doesn’t work in my case. please see the reference video for getting better understanding on my issue : https://ufile.io/m5g85
anyway, appreciated your idea as well :slight_smile:
after you see that video, please see what’s your suggestion to solve that please
thanks very much :slight_smile:


#6

Hi @Eduardo
Thanks for your response too…
I’ve just tried your idea to my SKP as a new file, so not really matter about the purge unused bcoz it’s just a box and no other object may effect to it. Well, in your first idea also same, the original box and the duplicate box both are in internal component.
please see this reference video for better understanding my issue and please help me out with any new idea :slight_smile:
thanks very much :slight_smile:

see here : https://ufile.io/m5g85


#7

Sounds to me like you have some bad extension installed that doesn’t honor SketchUp’s way of working with components.

Both internal and external components should behave the same when copied. Something is actively making the second instance unique.


#8

Hi @eneroth3
Yes, you got the point… but, I dont know what exactly causing this issue. If it is as you said coz by a bad extension, then would you please advice me how to detect which bad extension and how to remove this to solve my issue? any idea please :slight_smile:


#9

What happens if you start a new file, make an identical box component, then copy it, all using native SU tools only?


#10

Here’s a short Ruby snippet that prints out the backtrace to any method using Sketchup::ComponentInstance#make_unique. You can paste it into the Ruby console and press enter to run it, then copy the component and see what is making it unique.

class Sketchup::ComponentInstance
  unless defined?(ene_original_make_unique)
    alias_method :ene_original_make_unique, :make_unique
    private :ene_original_make_unique
  end

  def make_unique(*args)
    puts caller
    ene_original_make_unique(*args)
  end
end

Note that this is not intended to be installed in the plugin folder, and after identifying the misbehaving extension I would recommend to restart SketchUp before continue working, as the snippet modifies API base classes.


#11

Hi, in my video it showed that is already made in a new file. but, It didnt work


#12

Then maybe you should upload the file itself in case anyone can see what is happening?


#13

Hi @eneroth3,
I have followed your instruction to paste that coding to ruby console as seen in my video here : https://ufile.io/wkvig but, it’s still the same… doesnt solve yet


#14

The snippet doesn’t alter the behavior but prints out from where make_unique was called, so you can identify the plugin.


#15

are these item need to be removed just by remove/delete in that plugin folder, right?
c:/users/tc_ye/appdata/roaming/sketchup/sketchup 2017/sketchup/plugins/3hfurniture_sketch/3hfurniture_sketch_observer_func.rbe:81:in onElementAdded' c:/users/tc_ye/appdata/roaming/sketchup/sketchup 2017/sketchup/plugins/3hfurniture_sketch/3hfurniture_sketch_observer_func.rbe:81:inonElementAdded’


#16

Hi @eneroth3
bingo… you suggestion it’s working. after uninstall that plugin, I restart sketchup then everything is fine now. you are great ! Appreciated and Thanks a lot :slight_smile:


#17

You can also contact the plugin author and tell them their plugin breaks SketchUp, so they can fix it.


#18

@eneroth3
Ok, noted and will follow your suggestion to give them feedback


#19

@eneroth3
this is the plugin developer : http://3hfurniture.net/support.html
I have sent a feedback to them for rectify their plugin :slight_smile:

have a nice day