IDLitTool::DoSetProperty

Syntax | Return Value | Arguments | Keywords | Version History | See Also

The IDLitTool::DoSetProperty function method sets the value of a registered property on a target component object, and places the change in the undo/redo transaction buffer.

Note
In order to commit the change to the undo/redo transaction buffer, you must call the IDLitTool::CommitActions method. The property change is not actually undoable until it has been committed.

The separation of addition of the change to the buffer and commit of the change allows you to "package" several property changes into a single undo/redo transaction. The call to the CommitActions method will commit any changes that have been performed but not committed. For example, the following statements change two properties on an iTool component (oTarget) and commit them together:

targetID = oTarget->GetFullIdentifier() 
status = oTool->DoSetProperty(targetID, 'Property1', 'Value 1') 
status = oTool->DoSetProperty(targetID, 'Property2', 'Value 2') 
oTool->CommitActions 

If the user later undoes the action, both property value changes will be reversed in one step.

Syntax

Result = Obj->[IDLitTool::]DoSetProperty(TargetIdentifier, PropertyIdentifier, Value)

Return Value

Returns 1 if the SetProperty was successful, or 0 otherwise.

Note
If successful, you are responsible for calling IDLitTool::CommitActions to complete the transaction.

Arguments

TargetIdentifier

A scalar string or a string array containing the full object identifiers of the objects on which the property is being set.

PropertyIdentifier

A scalar string containing the identifier of the property whose value is being changed. PropertyIdentifier must be a registered property of the target objects.

Value

The new property value.

Keywords

None

Version History

6.0

Introduced

See Also

IDLitTool::CommitActions