ObjectProxySetTemplate(String, Boolean) Method

Sets a new template for this object.

Definition

Namespace: Articy.Api
Assembly: QueryLayer (in QueryLayer.dll) Version: 1.0.0
C#
public void SetTemplate(
	string aTechnicalName,
	bool aSetColor = true
)

Parameters

aTechnicalName  String
the technical name of the new template or null or "" to remove an already set template
aSetColor  Boolean  (Optional)
set to false if you do not want that the template change also changes the objects color

Exceptions

ArticyApiExceptionif the specified technical name belongs to no valid template, ErrorCode.UnknownTemplate is thrown
ArticyApiExceptionif the object is read-only, ErrorCode.WriteDenied is thrown
ArticyApiExceptionif the object is not customizable, ErrorCode.ObjectNotCustomizeable is thrown
ArticyApiExceptionif the the specified template is not allowed for this type of object, ErrorCode.TemplateNotAllowedForObject is thrown

See Also