Index

C/C++ Functions

pdPropSetAsRef

DT_SWORD pdPropSetAsRef(DT_PDDOC power_doc, DT_ID_SLONG obj, DT_SLONG name, DT_ID_SLONG ref_obj, DT_SLONG ref_name)

Short Description: Change existing property by reference

The pdPropSetAsRef function changes the value of an existing PowerDoc property within the PowerDoc object referenced by obj. This function is compatible with pdPropSet, which means that the properties changed by this function can be used in the same capacity as if they were changed by pdPropSet. However, unlike pdPropSet which sets a property by value, this function only sets a reference to another existing property in the document (which is called the target property or referenced property). In this way, the changed property is a virtual copy of the target property and occupies a very small amount of storage space in the object obj (only the amount it takes to store the reference). The value of this property always equals the value of its target property. In other words, whenever the value of the target property changes, the value of the referencing property set by this function also changes to that same value.

The target property can be located anywhere in the document (i.e. it can be in the same object or it can be in some other PowerDoc object) and can even be a property reference itself.

Parameters

ParameterDescription

power_doc

Handle of the associated Power Engine document.

obj

Object's index in the Power Engine document.

name

A numerical value that identifies the property to be changed. Can be a user-defined value or one of the predefined PowerDoc values. For a list of predefined name values, see the pdPropAdd function.

ref_obj

Index of the PowerDoc object that holds the referenced (target) property.

ref_name

A numerical value that identifies the referenced (target) property in the object ref_obj.

Return Value

See pdPropSet.

Comments

See pdPropSet.

Related Functions

pdPropGetAsRef
pdPropAddAsRef

 

Index