VS:BuildResourceListN2

From Vectorworks Developer
Jump to: navigation, search

.VectorScript|VectorScript ..VS:Function Reference|Function Reference ..VS:Function_Reference_Appendix|Appendix

Description

Build a resource list from the specified file.
FUNCTION BuildResourceListN2(
TYPE  :INTEGER;
fullPath  :DYNARRAY[] OF CHAR;
VAR numItems  :LONGINT;
useDefaultContent  :BOOLEAN) : LONGINT;
def vs.BuildResourceListN2(type, fullPath, useDefaultContent):
    return (LONGINT, numItems)

Parameters

type INTEGER the type of resource to put in the list
fullPath DYNARRAY[] of CHAR The path to the file that provides the resources.
numItems LONGINT the number of items in the list built
useDefaultContent BOOLEAN determine if the list should contain default content

Remarks

Orso, 2016.02.29: It supports also posix paths on mac ("/"). It can't be used to retrive the resources in the active document. The useDefaultContent variable doesn't make sense to me: it doesn't seem to make any difference.

Here some usage examples:

resID := 127; { wall styles }
pathID := 113; { Wall ~ Slabs folder }
path := Concat(GetFolderPath(pathID), 'Walls~Slabs Styles Metric.vwx'); { pick a file within the shipped default content }

list := BuildResourceListN2(resID, path, cnt, TRUE); { chosen document }
list := BuildResourceListN2(resID, path, cnt, FALSE); { chosen document again }

list := BuildResourceListN2(resID, GetFPathName, cnt, FALSE); { WARNING: it always returns zero }

Version

Availability: from Vectorworks 2014

See Also

VS Functions:

VS:BuildResourceListN | VS:BuildResourceList | VS:BuildResourceList2

VS Functions:

[[VS:BuildResourceListN]] | [[VS:BuildResourceList]]

| [[VS:BuildResourceList2]]
Personal tools
NamespacesFFFF

Variants
Actions
Advanced Search
See Also
Navigation
Toolbox