VS:FindFileInPluginFolder: Difference between revisions
Jump to navigation
Jump to search
m (1 revision) |
(No difference)
|
Revision as of 21:56, 27 April 2008
.VectorScript|VectorScript ..VS:Function Reference|Function Reference ..VS:Function_Reference_Appendix|Appendix
Description
Searches for filename in all plug-in folders. Returns TRUE if the file is found, FALSE otherwise. If found, the result is returned in the path parameter.
FUNCTION FindFileInPluginFolder(
filename :STRING;
VAR path :STRING) : BOOLEAN;
def vs.FindFileInPluginFolder(filename): return (BOOLEAN, path)
Parameters
filename STRING path STRING
Remarks
On the Mac, path will use colons instead of foreslashes as the folder delimiter.
Example
VectorScript
PROCEDURE Example; VAR filename, path :STRING; BEGIN filename := 'Callout.vso'; IF FindFileInPluginFolder(filename, path) THEN AlrtDialog(path) ELSE AlrtDialog('Could not find file.'); END; RUN(Example);
Python
def Example(): filename = 'Callout.vso'; ifFileExist, path = vs.FindFileInPluginFolder(filename) if ifFileExist: vs.AlrtDialog(path) else: vs.AlrtDialog('Could not find file.') Example()
Version
Availability: from VectorWorks12.0