VS:IsLayerReferenced

From Vectorworks Developer
Revision as of 14:34, 12 August 2013 by Root (talk | contribs) (1 revision)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

.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