Difference between revisions of "VS:BuildResourceListN"

From Vectorworks Developer
Jump to: navigation, search
m (1 revision)
(add remark and usage example)
 
Line 40: Line 40:
  
 
-----------------------------------------------------------------------------------------------------------
 
-----------------------------------------------------------------------------------------------------------
<remark></remark>
+
<remark>
 +
[[User:Orso.b.schmid|Orso]], 2016.02.29:  It supports also posix paths on mac ("/"). It can't be used to retrive the resources in the active document.
 +
 
 +
Here some usage examples:
 +
<code lang="vs">
 +
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 := BuildResourceListN(resID, path, cnt); { chosen document }
 +
list := BuildResourceListN2(resID, GetFPathName, cnt); { WARNING: it always returns zero }
 +
</code>
 +
</remark>
  
 
-----------------------------------------------------------------------------------------------------------
 
-----------------------------------------------------------------------------------------------------------

Latest revision as of 05:31, 29 February 2016

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

Description

Build a resource list from the specified file.
FUNCTION BuildResourceListN(
TYPE  :INTEGER;
fullPath  :DYNARRAY[] OF CHAR;
VAR numItems  :LONGINT) : LONGINT;
def vs.BuildResourceListN(type, fullPath):
    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

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.

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 := BuildResourceListN(resID, path, cnt); { chosen document }
list := BuildResourceListN2(resID, GetFPathName, cnt); { WARNING: it always returns zero }

Version

Availability: from Vectorworks 2013

See Also

VS Functions:

VS:BuildResourceList

VS Functions: [[VS:BuildResourceList]]
Personal tools
NamespacesFFFF

Variants
Actions
Advanced Search
See Also
Navigation
Toolbox