'
' This example demonstrates how to create hidden parameters
'
NewScene , false
' -------------------------------------
' Method 1: Using the Show method
dim oPset1, oParam
set oPset1 = Application.ActiveSceneRoot.AddProperty( "CustomProperty", false, "HiddenWithShow" )
set oParam = oPset1.AddParameter2( "Hidden", siDouble )
oParam.Show( false )
oPset1.AddParameter2 "NotHidden", siDouble
InspectObj oPset1 , , , siLock
' -------------------------------------
' Method 2: Create a Property Page layout excluding this parameter
dim oPset2, oLayout
set oPset2 = Application.ActiveSceneRoot.AddProperty( "CustomProperty", false, "HiddenWithLayout" )
oPset2.AddParameter2 "Hidden", siDouble
oPset2.AddParameter2 "NotHidden", siDouble
set oLayout = oPSet2.PPGLayout
oLayout.Clear
oLayout.AddItem "NotHidden"
InspectObj oPset2 , , , siLock
' In either case you can still read and write the
' the values from the Object Model
Application.LogMessage "Old Value for " & oPset1.FullName & ": " & oPset1.Parameters("Hidden").Value
oPset1.Parameters("Hidden").Value = 5
Application.LogMessage "New Value for " & oPset1.FullName & ": " & oPset1.Parameters("Hidden").Value
Application.LogMessage "Old Value for " & oPset2.FullName & ": " & oPset2.Parameters("Hidden").Value
oPset2.Parameters("Hidden").Value = 25
Application.LogMessage "New Value for " & oPset2.FullName & ": " & oPset2.Parameters("Hidden").Value
' Output of above script:
'INFO : Old Value for HiddenWithShow: 0
'INFO : New Value for HiddenWithShow: 5
'INFO : Old Value for HiddenWithLayout: 0
'INFO : New Value for HiddenWithLayout: 25 |