Jump to content
Developer Wiki and Function Reference Links ×

File-Specific BuildResourceList

Recommended Posts

I have not used it for a specific file yet but will be testing it in the next few days. I have thought of using the subfolder parameter and placing just one file in that folder. What I need to test is the format of the parameter, which by definition can be a partial path (Mac or Windows?). So if I place the subfolder immediately under the predefined folder index with a negative value, the subfolder parameter should be just the name of the subfolder and should search only in the one file in the subfolder.

Link to comment
  • 7 years later...



How would I specifiy a subfolder using BuildResourceList. Say, I have the following structure. How do I get just the symbol definitions in the Sign_Images subfolder?





Master Symbols -->

                             Data Tags








Link to comment

@JBenghiat please correct me here if necessary.


I think you are going to have to rethink where you are storing your files as Build Resource List has to be passed a constant that specifies a limited number of folders to look in. In your case I might store the Master Symbols folder directly inside the Libraries folder (Folder Index 13) of either your user folder or a workgroup folder. Assuming you are looking for symbol definitions (Type 16)


You should then be able to use:


ListID:=BuildResourceList(16, 13, 'Master Symbols:Resources:Sign_Images', NumItems);


Where list ID is a LongInt that specifies the list (so you can reuse it instead of always rebuilding it), and NumItems is a LongInt that tells you how many items are in the list.


If you are on Windows you will probably need to replace the colons with back slashes as the path delimiter.



Link to comment

A number of things have changed since this thread started in 2012.


First, now you can specify a specific file for the resource list instead of a folder. The API has a couple of new commands for this.


Second, resource lists will now include items in resource folders.


Third, there are a bunch of new commands for 2020. In the posts above, "subfolder" refers to different OS folders with a separate VW file in each folder. I believe you are asking about resource folders in a single VW file. The SDK has a function to get the folder of a resource in the list, but I don't think this is available to VS at the moment. There is a VS command that implements resource filters, but I'm not quite sure how this works with VS.


Your easiest option would be to have a separate file for each resource folder.



Link to comment
  • 1 month later...
  • Vectorworks, Inc Employee

I have a customer building Expo stands (Booths) who uses alot of symbols to create designs and is looking for solutions to create a list of parts. Is there a non developer and user workflow documented for this, he is reasonably savy but has not got access here...

Link to comment

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...