Component/instance same name?

Good Morning,

I’m not sure if anyone can help me…

I’ve started using sketchup pro 2017 to make gaming maps, where I export them as .vmf files and then import to hammer.

I need a work around where I can call components the same names for example a square callled ENT_info_player_start and a cylinder called ENT_info_player_start. I need them to have the same name.

I’ve added some pictures of this where it says it’ll be replaced. Is there a work around to tell sketchup not todo this.


Replacing can be stopped by quitting the ‘Make Component’ operation. That’s not much of an option, I know.
But each component (definition) name is unique. There can’t be two different components having the same definition.
Each component also has a ‘Name’ field that you can name anything you like. So different components, whether copy instances or completely different in geometry (with different definition names) can be named the same.

Okay, so if I name them different things could the Definition remain the same?

The instance name can be the same on multiple instances but the definition name can never be the same on multiple definitions. The definition name is the reference to the component definition, similarly to how a file path is the reference to a file. No two files can have the same path and no two definitions can have the same name.

No. Different geometry grouped as components have different definition names. The names can be the same though.
I’ve said this before, the ‘Create Component’ window is confusing in that it doesn’t say definition where it should.
See the ‘Entity Info’ when having a component selected. You can change its name any thing you like. But the definition is unique.

Can’t agree. The make component window should say name because it’s the name of the definition. The Entity Info should really say Definition Name and Instance Name because that what it refers to. The current labels are just confusing and suggest you can swap definition by writing the name of a different one.

I’m getting mixed up with all those terms :smile:

Okay that makes sense, is there a way I can force it to have the same name? Like making two files have the same address. Atm I having to export it into hammer and change all of definitions to the same name manually in a sense doing it twice.

Oops, I never noticed that SU2017 has definition in its ‘Create Component’ window now, unlike in earlier versions, (SU2015 and before). I can’t check version SU2016 now.
And in SU2017 in ‘Entity Info’ you can change the definition (a unique name) and also name the instances of components.
It’s an improvement although now new users may wonder what to enter for the definition for newly created components. Definition name and Instance name would have been better but I guess its a matter of saving space in these windows.

1 Like

Yes, starting since version 2017, the entity info is also making a distinction between instance and definition


I don’t think you understand what a definition name is. Two different places can’t both have the same address, two different people can’t have the same social security number, two different days can’t have the same date etc; that’s not how it works.

What are definition names used for when you are exporting? It seams like the same string is used for a completely separate field in that data format.

1 Like

I’m using hammer it’s a 3D source software. The definitions were are the codes for the game so ENT_info_player_start is. A starting point. It there are others like ENT_function_door. And each geometry is different. The great thing with sketch up is its more user friendly than hammer.

There are loads of commands but the definitions are all the same.

That is not what a definition in SketchUp is. Each definition in SketchUp must have its own name to distinguish it from other definitions. I haven’t used hammer in years and never imported SketchUp models to it so I don’t know how that process works. However it seems like hammer uses the phrase definition for something completely different, something that much more resembles a layer in SketchUp than a definition name.

I don’t have hammer installed on this computer. Could you share a printscreen of the window that lets you define an object as ENT_info_player, ENT_func_door etc?

The Definition name in sketchup relates to the class name in hammer.
So I need to have the same for things like doors, buttons, actions etc. which in sketch up all start ENT_
then the hammer class reads anything after ENT_.

1 Like

If definition name maps to class names there seems to be something wrong with the exporter/importer you are using. Maybe the people who created it didn’t know what either a definition name in SU or a class name in hammer means. In hammer there can be multiple different looking doors, right?

Maybe the exporter/importer only fallbacks to using the definition name if the instance name field is empty. Have you tried giving the component an instance name?

or just use named groups instead of components?

1 Like

I haven’t tried either of those. I will have a look and let you know :slight_smile:

OR perhaps if the exporter is using the component-instance name - which defaults to “” - this snippet when run in the Ruby Console [copy+paste+enter] will rename all component-instances to match their definition-name…
That might fix things ?

m=Sketchup.active_model;m.start_operation("inamer",true);m.definitions.each{|d|next if || d.image?;d.instances.each{|i|}};m.commit_operation;

It is one step undo-able.

1 Like