Skip to content

Latest commit

 

History

History
68 lines (48 loc) · 1.35 KB

File metadata and controls

68 lines (48 loc) · 1.35 KB

IsResourceReferenced

Description

Returns whether a resource is workgroup referenced, and if so, the path to the source document is returned.

FUNCTION IsResourceReferenced(
				resource     : HANDLE;
				VAR pathname : STRING) : BOOLEAN;
def vs.IsResourceReferenced(resource):
    return (BOOLEAN, pathname)

Parameters

Name Type Description
resource HANDLE Handle to the resource
pathname STRING On return, a string containing the path to the source document

Returns

Returns true if the resource is referenced, false otherwise.

Examples

PROCEDURE DoIt(h :HANDLE);

VAR

    pathname: STRING;

    isref: BOOLEAN;

BEGIN

    isref := IsResourceReferenced(h, pathname);

    IF (isref) THEN Message(pathname);

END;
resultOK := IsResourceReferenced(resource, 'file.txt');
import vs

# Returns whether a resource is workgroup referenced, and if so, the path to
# the source document is returned.
resource = vs.FSActLayer()  # handle to the first selected object on the active layer

ok, pathname = vs.IsResourceReferenced(resource)
vs.Message('IsResourceReferenced returned: ' + str((ok, pathname)))

See Also

VS Functions: IsLayerReferenced

Version

Availability: from Vectorworks 2024

Category

  • [Object Info](../Categories/Object Info.md)