Parameter.Capabilities

Parameter.Capabilities operator

説明

オブジェクトの機能すべてのビットフィールドである Long 数(siCapabilities を参照)を戻します。

便宜上、最も使用頻度の高い Capabilities はプロパティ(Parameter.ReadOnlyParameter.Keyable、および Parameter.Animatable)として直接表示されます。

C#構文

// get accessor

Int32 rtn = Parameter.Capabilities;

VBScript の例

'

'	This example demonstrates how to query parameter capabilities

'

NewScene , false

set oRoot = Application.ActiveProject.ActiveScene.Root

set oGrid = oRoot.AddGeometry("Grid","MeshSurface")

set oProp = oGrid.AddProperty("Custom_parameter_list",,"b")

set oParam = oProp.AddParameter ("Int2CustomParam", siInt2, siClassifVisualization , _

	siAnimatable, "ShortName", "LongName", , -1, -5, 5)

oCaps = oParam.Capabilities

Application.LogMessage "Object has capabilities : " & oCaps

if (oCaps and siAnimatable) then

	Application.LogMessage "Object is Animatable."

else

	Application.LogMessage "Object is NOT Animatable."

end if

if (oCaps and siPersistable) then

	Application.LogMessage "Object is Persistable."

else

	Application.LogMessage "Object is NOT Persistable."

end if

if (oCaps and siNotInspectable) then

	Application.LogMessage "Object is NotInspectable."

else

	Application.LogMessage "Object is NOT NotInspectable."

end if

if (oCaps and siNotPresetPersistable) then

	Application.LogMessage "Object is NotPresetPersistable."

else

	Application.LogMessage "Object is NOT NotPresetPersistable."

end if

if (oCaps and siKeyable) then

	Application.LogMessage "Object is keyable."

else

	Application.LogMessage "Object is NOT keyable."

end if

if (oCaps and siNonKeyableVisible) then

	Application.LogMessage "Object is non-keyable visible."

else

	Application.LogMessage "Object is NOT non-keyable visible."

end if

' Expected results:

'INFO : Object has capabilities : 2053

'INFO : Object is Animatable.

'INFO : Object is Persistable.

'INFO : Object is NOT NotInspectable.

'INFO : Object is NOT NotPresetPersistable.

'INFO : Object is keyable.

'INFO : Object is NOT non-keyable visible.

関連項目

siCapabilities Parameter.SetCapabilityFlag CustomProperty.AddParameter