VisualCollectionAddNew Method (TypeIdentifier)

Spotfire 14.3 API Reference
Creates a new Visual with a visual of the type identified by visualTypeId and adds it to the collection.

Namespace:  Spotfire.Dxp.Application
Assembly:  Spotfire.Dxp.Application (in Spotfire.Dxp.Application.dll) Version: 65.0.19510.3242 (65.0.19510.3242)
Syntax

C#
public Visual AddNew(
	TypeIdentifier visualTypeId
)

Parameters

visualTypeId
Type: Spotfire.Dxp.Framework.DocumentModelTypeIdentifier
The visual type identifier.

Return Value

Type: Visual
The newly created Visual.
Exceptions

ExceptionCondition
ArgumentNullExceptionIf the visualTypeId is null.
ArgumentExceptionIf the visualTypeId is invalid.
Examples

The following example snippet shows how to add a bar chart to a visual collection.
C#
BarChart chart = page.Visuals.AddNew(VisualTypeIdentifiers.BarChart).As<BarChart>();
Version Information

Supported in: 14.3, 14.2, 14.1, 14.0, 12.5, 12.4, 12.3, 12.2, 12.1, 12.0, 11.8
See Also

Reference