C. Andrew Dunning Posted April 26, 2012 Share Posted April 26, 2012 Have any of you ever figured out a way to use BuildResourceList (or, similar) for a specific file in a given folder - and not simply gather all of the resources in all of the files in a folder? Thanks... Quote Link to comment
Miguel Barrera Posted April 26, 2012 Share Posted April 26, 2012 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. Quote Link to comment
C. Andrew Dunning Posted April 26, 2012 Author Share Posted April 26, 2012 Miguel - Thanks for the quick reply. Using subfolder is an option, but I was hoping to be able to have a folder of, let's say, "Cars," and then a file each for "Ford," "GM," "Nissan," etc. and extract Symbol names for a selected file. Quote Link to comment
JBenghiat Posted April 26, 2012 Share Posted April 26, 2012 It's not possible to differentiate between files. Using sub folders is the only way to get different lists. Also note, any symbols in symbol folders are ignored by the resource list. -Josh Quote Link to comment
Assembly Posted April 30, 2012 Share Posted April 30, 2012 josh is correct. it would be good to be able to point to a specific file Quote Link to comment
Scott Stanelle Posted January 28, 2020 Share Posted January 28, 2020 JBenghiat, 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? Thanks, Scott Master Symbols --> Data Tags Graphics Resources Sign_Images Symbol_Captions Symbol_Images Signs Symbols Quote Link to comment
Pat Stanford Posted January 28, 2020 Share Posted January 28, 2020 @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. Quote Link to comment
JBenghiat Posted January 31, 2020 Share Posted January 31, 2020 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. Quote Link to comment
Scott Stanelle Posted January 31, 2020 Share Posted January 31, 2020 JBenghiat and Pat Stanford, thank you both for your responses! Yes, I was asking about resource folders in a single VW file. I think I will follow the suggestion to have a separate file for each resource folder. That will make what I need to do easy and straightforward. Quote Link to comment
Vectorworks, Inc Employee TomWhiteLight Posted March 18, 2020 Vectorworks, Inc Employee Share Posted March 18, 2020 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... Quote Link to comment
JBenghiat Posted March 18, 2020 Share Posted March 18, 2020 @TomWhiteLight The discussion here is really for providing a list of resources to a user interface. I think using data records and reports will suit your customer. You can build the initial worksheet with Create Report... 1 Quote Link to comment
Andrew Davies Posted March 18, 2020 Share Posted March 18, 2020 I would make a symbol library in a separate file - then reference that into your master drawing. Reports and data records etc still work 1 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.