Jump to content
Sam Jones

Getting VW file list

Recommended Posts

It is possible to import resources from a file into the current file.  There are a variety of ways to do this with BuildResourcList() and ImportResourceToCurrentFile() and CopySymbol().  All of these require that the script maker know the file name or folder name containing the resource.  Is it possible to present the user with a Finder brower or Director trouser similar to the one presented with the PutFile() command?  I would like to present the user with a way to find a file or folder from which to import resources.  Possible ??

 

Share this post


Link to post

I don't see how these help.  They don't let the user look around their hard disk for the file they want to get resources from.  With "PutFile", the user can look around their hard disk for the text file they desire.  Perhaps, you have nifty little algorithm that simulates this functionality for finding .vwx files?????

 

Share this post


Link to post

Unfortunately, I cannot get that to work.  This code from the developer wiki fails to allow the selection of a .vwx file.

 

PROCEDURE Example;

VAR

    fileName, title :STRING;

    defaultFolder :STRING;

    mask :STRING;

BEGIN

    title := 'Select the object library file...';

    defaultFolder := '';

    mask := '*.vwx';

    fileName := 'Drafting Tools.vwx';

    IF GetFileN(title, defaultFolder, mask, fileName) THEN

        AlrtDialog(fileName);

END;

RUN(Example);

Share this post


Link to post

Unfortunately, I don't think Vectorscript has any commands dealing with files outside of text files for logs or resources.  I think you might need to use Python's ability to deal with files using PythonBeginContext and PythonExecute to pull Python coding into Vectorscripts.  As a disclaimer, I have not yet tried this, but I suspect it's very possible.

Share this post


Link to post

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.

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


 

7150 Riverwood Drive, Columbia, Maryland 21046, USA   |   Contact Us:   410-290-5114

 

© 2018 Vectorworks, Inc. All Rights Reserved. Vectorworks, Inc. is part of the Nemetschek Group.

×
×
  • Create New...