Creates and adds a Property to a SceneItem object.

Notice that some cluster property types can only be added to Cluster objects that are always-complete (see Cluster.IsAlwaysComplete). These restrictions and others are listed in the Possible Values section for the Preset argument.

Scripting Syntax

oReturn = SceneItem.AddProperty( Preset, [BranchFlag], [Name] );

Return Value

ClusterProperty, CustomProperty, Property, UserDataBlob or UserDataMap, depending on the preset that was used.


Parameter Type Description
Preset String This argument contains either the name of a Property Preset or a string with the filename or full path to a Preset file. Not all presets are valid for all SceneItem objects: restrictions are listed on these individual preset type pages (ClusterProperty Presets, CustomProperty Presets, Property (Object) Presets, UserDataBlob Presets, and UserDataMap Presets).

The type of property that is created is determined by this argument. For example, "CustomProperty" creates an empty CustomProperty and "UserDataBlob" creates a UserDataBlob.
BranchFlag Boolean When true the newly created Property will also appear under all the nested objects beneath the SceneItem

Default Value: false

Name String Represents the name of the new property (see SIObject.Name).


1. JScript Example

// Very simple example of AddProperty
// Create an Annotation property,
// fill in some content and show the Property
// Page.
var oA = ActiveSceneRoot.AddProperty( "Annotation" ) ;
oA.text = "This is a comment" ;
InspectObj( oA ) ;

2. VBScript Example

'VBScript example
set sceneItem = Application.ActiveProject.ActiveScene.Root.AddNull
set prop = sceneItem.AddProperty("CustomProperty",false, "MyCustomParam")
LogMessage "SceneItem's custom property name: " & prop.FullName

See Also

SceneItem.AddCustomProperty SceneItem.Properties SceneItem.LocalProperties CustomProperty UserDataMap UserDataBlob PluginRegistrar.RegisterProperty