Appearances.add Method

Parent Object: Appearances
Defined in namespace "adsk::core" and the header file is <Core/Materials/Appearances.h>

Description

Creates a new Appearance in the Design using default values. The new appearance can be edited using the color, roughness, colorTexture, normalTexture, and roughnessTexture properties, or using appearanceProperties for finer control. This method only applies to the Appearances collection from a Design.

Syntax

"appearances_var" is a variable referencing an Appearances object.

# Uses no optional arguments.
returnValue = appearances_var.add(name)

# Uses optional arguments.
returnValue = appearances_var.add(name, surfaceType)
"appearances_var" is a variable referencing an Appearances object.

#include <Core/Materials/Appearances.h>

// Uses no optional arguments.
returnValue = appearances_var->add(name);

// Uses optional arguments.
returnValue = appearances_var->add(name, surfaceType);
"appearances_var" is a variable referencing an Appearances object.

// Uses no optional arguments.
returnValue = appearances_var.add(name);

// Uses Optional arguments.
returnValue = appearances_var.add(name, surfaceType);

Return Value

Type Description
Appearance Returns the newly created Appearance or null if the collection isn't from a Design. An error is raised if the name is empty or is already in use.

Parameters

Name Type Description
name string The name of the new Appearance. It must be non-empty and unique within the Design.
surfaceType AppearanceSurfaceTypes The surface type of the new Appearance. This defaults to OpaqueAppearanceSurface, which is appropriate for plastics, paints, ceramics, rubber, and other non-metallic, non-transparent materials.

This is an optional argument whose default value is AppearanceSurfaceTypes.OpaqueAppearanceSurface.

Version

Introduced in version July 2026