evCreate API 5.7 Help

SetPartColor Function

Paints given parts from a 3D model edited in an active 3D editing session with a given color.

SetPartColor(parts: [[[EvItem|canvas-envision-document-items.html#part-items]]][], color: string): Promise<void>

Parameters

parts: EvItem[]

An array of Part item objects, one or more given parts of a 3D model currently edited in an active 3D editing session that should have the given color.

color: string

A string, a given new color of the given parts from the 3D model edited in the active 3D editing session specified as an RGB hex triplet in the following format: #rrggbb.

Return value

Promise<void>

A Promise that, if fulfilled, resolves to void if the given parts from the 3D model edited in the active 3D editing session have successfully gotten the given color.

Discussion

The function will throw an error if the 3D editing mode has not been activated.

26 April 2025