SceneItem.AddProperty

説明

Property を作成し、SceneItem オブジェクトに追加します。

クラスタプロパティの中には常に完全な Cluster オブジェクトに追加できるものもあります(Cluster.IsAlwaysComplete を参照)。これらの制限事項は、Preset 引数の「指定可能な値」セクションにリストされています。

C#構文

Property SceneItem.AddProperty( Object in_Preset, Boolean in_Branch, String in_name );

スクリプト構文

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

戻り値

ClusterPropertyCustomPropertyPropertyUserDataBlob、または UserDataMap(使用されたプリセットによる)

パラメータ

パラメータ タイプ 説明
Preset String この引数には、Property Preset の名前またはファイル名やプリセット ファイルへの完全パスを含む文字列が格納されます。すべてのプリセットが、すべての SceneItem オブジェクトに対して有効とは限りません。これら個々のプリセット タイプのページに制限が一覧表示されています(ClusterProperty PresetsCustomProperty PresetsProperty (Object) PresetsUserDataBlob Presets、および UserDataMap Presets)。

作成されるプロパティのタイプはこの引数により決定されます。たとえば、"CustomProperty" は空の CustomProperty を作成し、"UserDataBlob" は UserDataBlob を作成します。
BranchFlag Boolean ture の場合は、新しく作成されたプロパティも、SceneItem の下にネストされたすべてのオブジェクトの下に表示されます。

デフォルト値: false

Name String 新しいプロパティの名前を表します(SIObject.Name を参照)。

1. JScript の例

// 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 の例

'VBScript example

set sceneItem = Application.ActiveProject.ActiveScene.Root.AddNull

set prop = sceneItem.AddProperty("CustomProperty",false, "MyCustomParam")

LogMessage "SceneItem's custom property name: " & prop.FullName

関連項目

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