PropertyObject.SetTypeDefinitionProtection

Syntax

PropertyObject.SetTypeDefinitionProtection( newValue, [passwordString])

Purpose

Sets the protection level and, optionally, the password of a type definition.

Remarks

You can call this method on any property of the type definition, not just the root object of the type.

Note TestStand supports password-protecting type definitions to deter unauthorized users from editing the types in the sequence editor. However, any TestStand user can continue to programmatically edit a locked type by using the TestStand PropertyObject API. National Instruments does not recommend password-protecting types as the only way of protecting intellectual property.

Parameters

newValue As Long

[In] Specifies one of the supported ProtectedObjectOptions . For type locking, this method supports only ProtectedObjectOption_None and ProtectedObjectOption_NotEditable .

passwordString As Variant

[In] [ Optional ] Specifies the password you require to unlock the type. This password can be empty only if the value for the newValue parameter is ProtectedObjectOption_None . TestStand uses this password and the password history of a type during type conflict resolution to determine whether a newer version of the type can replace an older version without requiring the password for the older version.

See Also

Engine.DisplayPasswordProtectTypeDefinitionsDialog

Engine.DisplayUnlockTypeDefinitionsDialog

Password Protect Type Definitions dialog box

PropertyObject.ClearTypeDefinitionPasswordHistory

PropertyObject.GetTypeDefinitionProtection

PropertyObject.LockTypeDefinition

PropertyObject.TypeDefinitionLocked

PropertyObject.UnlockTypeDefinition

ProtectedObjectOptions

Thread Safety of the PropertyObject API and TestStand Variables