Vectorworks, Inc Employee Julian_Carr Posted September 24, 2023 Vectorworks, Inc Employee Share Posted September 24, 2023 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? Thanks! Quote Link to comment
Vectorworks, Inc Employee klinzey Posted September 24, 2023 Vectorworks, Inc Employee Share Posted September 24, 2023 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. Quote Link to comment
Pat Stanford Posted September 24, 2023 Share Posted September 24, 2023 Alternatively, just build the resource list from all the files and then loop through the list with GetNameFromResourceList. This will return the name of the file the resource is from in parentheses. Check and see if it is from the correct library file and is not use DeleteResourceFromList. Untested but it should work. Quote Link to comment
Vectorworks, Inc Employee Julian_Carr Posted September 24, 2023 Author Vectorworks, Inc Employee Share Posted September 24, 2023 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. Quote Link to comment
Miguel Barrera Posted September 25, 2023 Share Posted September 25, 2023 Have you tried placing each resource file in different folders? Quote Link to comment
Vectorworks, Inc Employee Julian_Carr Posted September 25, 2023 Author Vectorworks, Inc Employee Share Posted September 25, 2023 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? Quote Link to comment
Miguel Barrera Posted October 6, 2023 Share Posted October 6, 2023 With Python you should be able to find out. Quote Link to comment
Recommended Posts
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.