Skip to the page
Tutorial areas

What 'by class' attributes mean

Why an object can keep its own colour and line weight, or take them from its class, and how to tell which one an object uses.

ConceptIntermediate3 minMenu: Modify › Attributes › Make All Attributes by Class

A class holds a set of attributes, such as a fill colour, a pen colour and a line weight. Each object's attributes are either its own, or are taken from its class. Attributes taken from the class are said to be by class. The class is what decides how those objects look, so one class can style many objects at once.

What happens in the editor

Put an object into a class and it keeps its own look. Nothing changes on screen until you tell it to take the class's attributes.

Here, the orange rectangle was made into a class called Hazard with Create Class Using Object Attributes…. The class takes the orange rectangle's fill, and the orange rectangle goes into it with those attributes set by class. The blue rectangle is then put into Hazard with the Class drop-down in Object Info.

The blue rectangle in the Hazard class and still blue

The blue rectangle stays blue. Its class is Hazard, but its own attributes are still in use.

To make it take the class's attributes, select it and choose Modify › Attributes › Make All Attributes by Class. Every attribute group of the class is applied to the selection, so the blue rectangle turns orange.

Both rectangles orange, the second one now taking its fill from the Hazard class

Which one an object uses

Each attribute of an object can be its own or by class. The From class ticks in Object Info switch each one. An object whose attributes are all its own was not changed by being put into the class, as the blue rectangle showed above.

When to use which

  • Use by class when a kind of thing should always look the same, such as all the walls or all the furniture, and you may want to change them together.
  • Use an object's own attributes for a one-off colour that should not follow its class.
  • Remove by Class Settings under Modify › Attributes keeps each object drawing with what it currently shows, as its own attributes.

Limits

Making attributes by class replaces an object's own settings with the class's. Use Remove by Class Settings straight after if you want to keep the look and lose the link.