Template:WorkingWithResrouceList

From Vectorworks Developer
Revision as of 20:18, 10 July 2014 by Maziar (talk | contribs) (Created page with "==== VectorScript ==== <code lang="pas"> PROCEDURE Test; CONST ObjectType = 97; { Texture Definition } FolderIndex = 100; { BuildResourceList Def for Texture Folder ...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

VectorScript

PROCEDURE Test; 
CONST
    ObjectType = 97; { Texture Definition } 
    FolderIndex = 100; { BuildResourceList Def for Texture Folder See Func. Ref } 
    SubFolderName = ''; { Nul subfolder get all folders and subfolders } 

VAR
    MyName : STRING; 
    MyList : LONGINT; 
    NumItems : LONGINT; 

BEGIN
    MyList := BuildResourceList(ObjectType, FolderIndex, '', NumItems); 
    MyName := GetNameFromResourceList(MyList, 1); { change this number to get the names of other textures } 
    Message( Date(2, 2), ': The Name is ', MyName, ' *** Total items in list: ', NumItems); 
END; 
RUN(Test);

Python

def Test():
    ObjectType = 97; #{ Texture Definition } 
    FolderIndex = 100; #{ BuildResourceList Def for Texture Folder See Func. Ref } 
    SubFolderName = ''; #{ Nul subfolder get all folders and subfolders } 

    MyList, NumItems = vs.BuildResourceList(ObjectType, FolderIndex, ''); 
    MyName = vs.GetNameFromResourceList(MyList, 1); #{ change this number to get the names of other textures } 
    vs.Message( vs.Date(2, 2), ': The Name is ', MyName, ' *** Total items in list: ', NumItems); 
Test()