Multiple tags on an entity: Is it possible?

Is it possible to assign multiple tags to an entity and then display the entities that have the selected tags?

I know you can assign a layer tag to an entity and then choose the layers you wish. But is it possible to assign multiple tags (layers or perhaps some other type of tag) to an entity. The entity would then be displayed if any of the tags assigned to it was selected.

An example would be a surface assigned to each of the two rooms that it abuts. Selecting the room on one side or the room on the other side would cause the entity to be displayed.

I realize you could assign a new layer A+B that you could enable, so you could have layers A, and B, and A+B, but after a while, all of the intersections between all of the rooms becomes unmanageable. Assigning an entity to Room1 and also to Room2 would allow common/shared walls to display with either room.

Is there some concept in Sketchup that would provide this functionality?

Not yet, but it has been requested for years. It has also been requested to filter the Outliner by tag.

I’m not sure that it’ll work this way when implemented. Keep in mind that tags are visibility toggles.
When the tag’s visibility flag is set true, entities using this tag will be displayed. When the flag is false those entities will be hidden.
Therefore, ALL of the tags used by any given entity would all need to have their visibility flag true in order for the entity to be displayed. It would taken only 1 visibility tag to be false for the entity that uses it to be hidden.

I think you would not use layer/tags for geometric contexts. This is what groups and components are for.

Layer/Tags are for categorizing and controlling visibility for sets of objects that span across the geometric hierarchy. (Examples, “Interior Doors”, “Windows”, “Furniture”, etc.)

1 Like

Visibility is EXACTLY what I am trying to accomplish.

I am actually producing 3D print files, and there is one STL export file for all items of the same color. One STL file per color.

So what I want to do is tag all of the objects, Groups, components, etc with a color tag. Then, I want to hide everything and view ONLY the items with the desired color tag. I then select those and use the Export to STL utility to export ONLY the selected items, which would be the visible items which would be all of the items of that particular filament color.

So controlling visibility as a group is exactly what I am after. I want to run on or off all of “Filament1” and of “Filament5”, etc.

In this project there are hundreds of objects, groups, and components. We know which color we want each to be, and it would be good to tag them.

We basically need to make visible all items with a particular filament tag.

Some items are boundary items, so those need to have two tags so that they display for each filament. Otherwise, with Groups we would need to draft every item twice…once for each side of the boundary between colors.

Consider it this way: Two rooms, a blue and a red one. They share a common wall. We would like the tag that wall as “Blue” and also as “Red”. The wall is needed to enclose the blue room and also to enclose the red room.

If we did groups, we would need to draft this wall twice…once in each group. As the rooms are often quite complex that would be an enormous amount of drafting.

To help you understand in more depth: We are 3D printing a complex printed circuit board with many hundreds of components. They are color coded based upon certain requirements, such as LEDs which must match up with light-pipes. As you can see, the shapes are complex.

This 3D print will help us see the board many months before we will have a production model. That way we can address the various mechanical and thermal requirements.

a non-proprietary example model will make it easier to see…

or some images, is that possible?

john

1 Like

I ask this from ignorance as I don’t have any 3D printer, let alone a multi-filament one: if you draw two touching but distinct objects in SketchUp and export that as stl, will the slicer and printer generate them as two objects or merge them as one?

The answer is vital to your goal, because in SketchUp an object can exist in only one context (model, group, or component definition) at a time, regardless of visibility. The only way to change an object from one context to another is to cut and paste it. So, making a wall and an adjacent room visible based on tags would still leave them as distinct SketchUp objects. If the slicer merges all contiguous objects into one, multiple tags would serve your goal. But if not, it won’t work regardless of whether SketchUp supports multiple tags.

2 Likes

That’s not how it would work. Tags could have three states, not two. ‘All visible’ ‘some visible’ and ‘none visible’.

So if you have everything visible, and you issue the command to hide the ‘Interior Walls’ tag, the ‘All Walls’ tag state will change from ‘all visible’ to ‘some visible’.

Without this feature why would they be called tags in the first place? Otherwise they’re just layers.

You seem to have a misunderstanding of how tags are used and given TO objects. Either a tag is visible or or it isn’t. The objects to which that tag is applied are either visible or they aren’t.

With tag folders you can collect some tags together and then either control the visibility of all of them by controlling the visibility of the folder or control the visibility of the individual tags within the folder.

2 Likes

Using folders doesn’t address the limitations. This isn’t really how “tags” in software are supposed to work. A tag is supposed to belong to an object, not the other way around. You don’t hide a tag, you hide objects that contain said tag.

Sorry. That’s not how Sketchup works.Tags are given to or put on objects (groups, components) and used to control the visibility of those objects. Only one tag can be given to any one object. Multiple objects can be given the same tag.

4 Likes

Respectfully, you’re not understanding.

In Sketchup, an object can only be assigned one ‘tag’ at a time. Ergo, the object belongs to the tag but not the other way around. I’m sure in the code references to objects are stored in a collection for each defined tag. The fact you have to define a tag first makes this even more obvious.

This is not what ‘tag’ means in the software world. This is more like a layer. Which makes sense as that’s what it used to be called in older versions of Sketchup. The fact they changed the name to tag implies they intended to add actual tagging functionality, but it doesn’t exist yet. Probably because it breaks a bunch of other things they didn’t anticipate, who knows.

Also this isn’t just for visibility. It’s also for selecting.

The transition from the name Layers to Tags was done because many users expected “layers” to function more like layers in a 2D program, separating raw geometry to prevent it from interacting or displaying one object “in front” of another, neither of which are what Tags do in SketchUp. Many users were merging invisible raw geometry that they had assigned different layers and generally making a mess of their models do to this misunderstanding. So the name was changed to better reflect the functionality they already had, and to avoid confusion, nothing about their function changed at that time.

1 Like

Yes, I agree, you’re right, but I don’t bother arguing about it here anymore. The functionality is what it is, and the name is just semantics. The idea of layers started in hand drafting, and particularly formalized with pin-bar registration drafting. Early AutoCAD mimicked that with layers, and was still closely tied to output devices of the time, pen plotters, that still put ink lines on Mylar. Only Mac programs using Quickdraw and Adobe Postscript had the obscuring properties (i.e. “bring to front” and “send to back”). The functionality of SU tags/layers is exactly like CAD layers, and not like graphic design layers. If SU tags did have the functionality of, say, Lightroom’s keywords where a photo can be “tagged” with “butterfly”, “summer”, “vacation”, and “Maine” simultaneously, that would add some interesting functionality to the program that I know I would welcome, but I don’t expect it.

5 Likes

No. The code shown that you can set (associate) tag (layer) to the object (drawingelement)
Drawingelement#layer= instance_method

To be able to associate the tag (layer) to the object, you have to define the tag (layer) first.

2 Likes

Alas, you are doing some bad reasoning based on lack of information, and it is leading you to incorrect conclusions.

It is false that ability to assign only one tag at a time means “the object belongs to the tag”. That is an invalid leap of logic. What really happens in SketchUp is that each object has a single data attribute holding a reference to a single tag. There is no collection in either the tag or the object (BTW that means a global search is the only way to find all the objects that use a particular tag. That wasn’t an issue in the original SketchUp design because tags/layers references were examined only while drawing to the screen, when the renderer needs to examine the properties of each object anyway). Because multiple objects can reference the same tag, the tag does not belong to any one object, nor vice-versa.

On Windows you have to define a tag first because an object can’t reference something that doesn’t yet exist. In previous versions of SketchUp on Mac one could type a new tag name into the field in Entity Info and that would cause a new tag to be created if no existing one matched the name. The developers could have resolved this inconsistency by adding the same ability to WIndows, but for some technical reason they decided it was better to remove it from Mac, much to the annoyance of some Mac users.

Actually the reason they changed the name is that “layer” has different semantics in LayOut as well as in various 2D apps, and the difference was causing confusion. That’s a separate question from whether there is or might be some intent to build a more general tagging system someday - which indeed would likely break the existing system of tags.

6 Likes

Then what is the rationale for objects only being able to have one tag?

You are reading too much into the word Tag and how it is used in other situations. Threads in this forum can have mutiple of tags, models in the warehouse can have a multitude of Tags.
Tag in sketchup is a method for giving objects an identifier so you can turn their visibility on and off. More than one object can be given the same identifier so that multiple objects can be turned on and off together. But an object cant have multiple identifiers of this type.
The word Tag could be replaced with Banana or Elephant or Bicycle and it would still do the same thing. There was quite some discussion about what to change the name to from Layers, Tags was chosen, some may not agree with it.
Someone once said something along the lines of What’s in a name…

5 Likes

I still think the name change was unnecessary and, as it still, after more than 2 years, causes confusion, probably harmful. Coming from 35 years of CAD use, I find the “tags” function quite identical to layers in CAD and BIM applications. I have no problem to live with it, but…

4 Likes

It began with the sole purpose being to switch visibility on or off simultaneously for a set of objects. It would be meaningless for an object to be marked visible and invisible at the same time. Which would win? I suppose there could be a hierarchical system of tags and the “parent” would dominate. But since SketchUp already has a structural hierarchy based on nesting, that would risk causing more confusion than benefit except in specific cases.

1 Like

Yes it is possible, but not with ‘Presentation Layers’ (called Tags). If you wanna organize your model in a more BIM like way, you could use the classifier tool:

in this model, 4 classifications are added in the model info > classifications:

and tagged Sumele multiple times (srry, @saruofor ):

The Dynamic Components Option dialog can be used to enter data, which could then be used in callouts or labels in LayOut (some refer to labels as ‘tags’, btw:)

2 Likes

Is there a way to show/hide drawing elements by class?