Jump to content
Developer Wiki and Function Reference Links ×

BuildResourceList From a Specific File


Recommended Posts

  • Vectorworks, Inc Employee

I have a custom library folder called 'My Libraries' in the Libraries > Defaults folder, that contains three files:


Libraries > Defaults > My Libraries > File 1.vwx

Libraries > Defaults > My Libraries > File 2.vwx

Libraries > Defaults > My Libraries > File 3.vwx


I want to build a resource list for symbols for just one of these files, so to access say File 3.vwx, I can pass the full file path to that file as follows:


sPath := Concat(GetFolderPath(-14), 'My Libraries', 'File 3.vwx');

MyList := BuildResourceListN(16, sPath, i1);


and I get just the symbols in File 3.vwx. If attempt to access File 2.vwx, the list also includes File 3.vwx, and if I attempt to access File 1.vwx, I get the symbols from all three files. Is there a way to do this so I only get the resources from the nominated file?



Link to comment
  • Vectorworks, Inc Employee

Try BuildResourceListN2() I think it accepts a fully qualified path to a file.
The BuildResourceList calls are really designed to use folders so the users can add a file to a folder and the developer can update the original file without overwriting user created content.

Link to comment
  • Vectorworks, Inc Employee

Thanks Kevin. I will try BuildResourceListN2(). 

Thanks Pat. The reason I am attempting to do this is to speed up the list building process because the resource lists are very extensive. I am therefore attempting to split the resources over a number of files in some organised way, so that I can then just nominate which file to access in a custom dialogue, and then only build the list from that file.

Link to comment
  • Vectorworks, Inc Employee

Thanks Miguel. I know that would work if the folder names were known, however I can't see a way to get the folder names which would be required in order to plug into the path string. For this case the PIO will be used for different purposes so users will want to name the files or folders as required. All the BuildResourceList calls only seem to search for files. Does anyone know if there is a way to get the names of folders within a designated folder?

Link to comment
  • 2 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...