VS:IsLayerReferenced
.VectorScript|VectorScript ..VS:Function Reference|Function Reference ..VS:Function_Reference_Appendix|Appendix
Description
Returns whether a layer is workgroup referenced, and if so, the path to the source document is returned.
FUNCTION IsLayerReferenced(
layer :HANDLE;
VAR pathname :STRING) : BOOLEAN;
def vs.IsLayerReferenced(layer): return (BOOLEAN, pathname)
Parameters
layer HANDLE Handle to the layer pathname STRING On return, a string containing the path to the source document
Return Value
Returns true if the layer is referenced, false otherwise.
Remarks
This returns FALSE on broken references to layers belonging to files residing on external disks.
It is not correct, even if the reference is broken, the layer is nevertheless referenced, so the routine should return TRUE. (VW 13-83388).
Use the pref object boo 700, instead, it is more secure: <pre>IsReferenced := GetObjectVariableBoolean(handleToResourceDefinition, 700); { locked/referenced status }</pre>
Version
Availability: from VectorWorks10.0