| Append | File I/O MiniCAD |
VectorScript Declaration:
PROCEDURE Append
( fileName:STRING ) ; Python:
return None
def vs.Append(fileName): Description:
Procedure Append opens the specified file for writing and appends the data to the end of the file. Existing data in the file is NOT overwritten.
If the filename includes a fully qualified path, the path has to use the appropriate notation for the local operating system:
Macintosh HD:Applications:Vectorworks:Plug-Ins:Data:Notes.txt C:\Program Files\Vectorworks\Plug-Ins\Data\Notes.txt If the filename includes a path relative to the location of the Vectorworks executable, the subfolder delimiters have to be backslashes:
Plug-Ins\Data\Notes.txt If the filename does not include a path, the file is assumed to exist in the same folder as the Vectorworks executable.Parameters:
fileName Name of file to open for writing. Example:
PROCEDURE Example; VAR fileName :STRING; major, minor, maintenance, platform :INTEGER; BEGIN GetVersion(major, minor, maintenance, platform); IF platform = 1 THEN BEGIN fileName := 'Macintosh HD:Example.txt'; END ELSE BEGIN fileName := 'C:\Example.txt'; END; Append(fileName); WriteLn('example text'); Close(fileName); END; RUN(Example);
| Close | File I/O MiniCAD |
VectorScript Declaration:
PROCEDURE Close
( fileName:STRING ) ; Python:
return None
def vs.Close(fileName): Description:
Procedure Close closes the specified text file.
If the filename includes a fully qualified path, the path has to use the appropriate notation for the local operating system:
Macintosh HD:Applications:Vectorworks:Plug-Ins:Data:Notes.txt C:\Program Files\Vectorworks\Plug-Ins\Data\Notes.txt If the filename includes a path relative to the location of the Vectorworks executable, the subfolder delimiters have to be backslashes:
Plug-Ins\Data\Notes.txt If the filename does not include a path, the file is assumed to exist in the same folder as the Vectorworks executable.Parameters:
fileName Name of file to close. Example:
BEGIN Open('MyData'); WHILE NOT EOF('MyData') DO ReadLn(a,b,c,d); Close('MyData'); END;
| ConvertHSF2PosixPath | File I/O Vectorworks 2010 |
VectorScript Declaration:
FUNCTION ConvertHSF2PosixPath
( HSFPath :DYNARRAY[] of CHAR; VAR outPosixPath :DYNARRAY[] of CHAR ) :BOOLEAN ; Python:
return (BOOLEAN, outPosixPath)
def vs.ConvertHSF2PosixPath(HSFPath): Description:
Machintosh only!
Converts HSF (using ':' as delimiter) file path to Posix (using '/' as delimiter) file path.Parameters:
HSFPath The HSF path that is to be converted. outPosixPath Output parameter. Returns the converted path. If the function does not succeed the returned value is the passed 'HSFPath' value. Result:
Returns true if the conversion succeeds. False if it fails.
The resulted Posix path will be the same as the passed HSF path if the function fails.See Also:
ConvertPosix2HSFPath
| ConvertPosix2HSFPath | File I/O Vectorworks 2010 |
VectorScript Declaration:
FUNCTION ConvertPosix2HSFPath
( PosixPath :DYNARRAY[] of CHAR; VAR outHSFPath :DYNARRAY[] of CHAR ) :BOOLEAN ; Python:
return (BOOLEAN, outHSFPath)
def vs.ConvertPosix2HSFPath(PosixPath): Description:
Machintosh only!
Converts Posix (using '/' as delimiter) file path to HSF (using ':' as delimiter) file path.Parameters:
PosixPath The Posix path that is to be converted. outHSFPath Output parameter. Returns the converted path. If the function does not succeed the returned value is the passed 'PosixPath' value. Result:
Returns true if the conversion succeeds. False if it fails.
The resulted Posix path will be the same as the passed Posix path if the function fails.See Also:
ConvertHSF2PosixPath
| CreateFolder | File I/O Vectorworks 2014 |
VectorScript Declaration:
FUNCTION CreateFolder
( path:STRING ) :BOOLEAN ; Python:
return BOOLEAN
def vs.CreateFolder(path): Description:
Creates a folder on the hard drive.
| EOF | File I/O MiniCAD |
VectorScript Declaration:
FUNCTION EOF
( fileName:STRING ) :BOOLEAN ; Python:
return BOOLEAN
def vs.EOF(fileName): Description:
Function EOF returns TRUE if the file pointer of an open text file has reached the end of the file (EOF marker). Function EOF is used with Procedures Read and ReadLn to ensure proper file reading and closure. Parameter fileName specifies a text file which is open for reading or writing.
If the filename includes a fully qualified path, the path has to use the appropriate notation for the local operating system:
Macintosh HD:Applications:Vectorworks:Plug-Ins:Data:Notes.txt C:\Program Files\Vectorworks\Plug-Ins\Data\Notes.txt If the filename includes a path relative to the location of the Vectorworks executable, the subfolder delimiters have to be backslashes:
Plug-Ins\Data\Notes.txt If the filename does not include a path, the file is assumed to exist in the same folder as the Vectorworks executable.Parameters:
fileName Name of file. Example:
BEGIN Open('MyData'); WHILE NOT EOF('MyData') DO ReadLn(a,b,c,d); Close('MyData'); END;
| EOLN | File I/O MiniCAD |
VectorScript Declaration:
FUNCTION EOLN
( fileName:STRING ) :BOOLEAN ; Python:
return BOOLEAN
def vs.EOLN(fileName): Description:
Function EOLN returns TRUE if the file pointer of an open text file has reached a carriage return within the file. Parameter fileName specifies a text file which is open for reading or writing.
Parameters:
fileName Name of file. Example:
BEGIN Open('MyData'); WHILE NOT EOLN('MyData') DO Read(a,b,c,d); Close('MyData'); END;
| ExportIGES | File I/O Vectorworks 2014 |
VectorScript Declaration:
FUNCTION ExportIGES
( fileName :STRING; exportSolidAsSurface :BOOLEAN ) :BOOLEAN ; Python:
return BOOLEAN
def vs.ExportIGES(fileName, exportSolidAsSurface): Description:
Export the document in 3D IGES file.Parameters:
fileName Output file path. exportSolidAsSurface Export solit objects as surface. Result:
Return TRUE if succeeded.See Also:
ImportIGES
| ExportSAT | File I/O Vectorworks 2013 |
VectorScript Declaration:
FUNCTION ExportSAT
( filePath :STRING; solidAsSurface :BOOLEAN ) :BOOLEAN ; Python:
return BOOLEAN
def vs.ExportSAT(filePath, solidAsSurface): Description:
Export the selection into a SAT file.Parameters:
filePath Output file path. Result:
Return TRUE if successful.
| FindFileInPluginFolder | File I/O VectorWorks12.0 |
VectorScript Declaration:
FUNCTION FindFileInPluginFolder
( filename :STRING; VAR path :STRING ) :BOOLEAN ; Python:
return (BOOLEAN, path)
def vs.FindFileInPluginFolder(filename): 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.Example:
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);
| GetFile | File I/O MiniCAD |
VectorScript Declaration:
PROCEDURE GetFile
( VAR fileName:STRING ) ; Python:
return fileName
def vs.GetFile(): Description:
Procedure GetFile displays a standard file dialog which requests the user to select a text document.
It is advisable to call DidCancel after using this procedure and check that the user did not cancel the file selection process.
Parameters:
fileName Returns name of selected file. Example:
GetFile(fileName); IF NOT DidCancel THEN BEGIN Read(a,b,c); Close(fileName); END; {Select a file for reading via a file open dialog}
| GetFileInfo | File I/O VectorWorks12.0 |
VectorScript Declaration:
PROCEDURE GetFileInfo
( filename :STRING; VAR fullReadPath :STRING; VAR fullWritePath :STRING; VAR readFileExists :BOOLEAN; VAR writeFileExists :BOOLEAN; VAR locked :BOOLEAN; VAR hasReadPermission :BOOLEAN; VAR hasWritePermission :BOOLEAN; VAR hasFolderPermission :BOOLEAN ) ; Python:
return (fullReadPath, fullWritePath, readFileExists, writeFileExists, locked, hasReadPermission, hasWritePermission, hasFolderPermission)
def vs.GetFileInfo(filename): Description:
This function gets the attributes of a file.Example:
PROCEDURE Example; VAR fileName :STRING; fullReadPath, fullWritePath :STRING; readFileExists, writeFileExists, locked, hasReadPermission, hasWritePermission, hasFolderPermission :BOOLEAN; BEGIN fileName := Concat(GetFolderPath(1), 'ADINIT.DAT'); GetFileInfo(fileName, fullReadPath, fullWritePath, readFileExists, writeFileExists, locked, hasReadPermission, hasWritePermission, hasFolderPermission); ReWrite('Output.txt'); WriteLn('fileName: ', fileName); WriteLn('fullReadPath: ', fullReadPath); WriteLn('fullWritePath: ', fullWritePath); WriteLn('readFileExists: ', readFileExists); WriteLn('writeFileExists: ', writeFileExists); WriteLn('locked: ', locked); WriteLn('hasReadPermission: ', hasReadPermission); WriteLn('hasWritePermission: ', hasWritePermission); WriteLn('hasFolderPermission: ', hasFolderPermission); Close('Output.txt'); END; RUN(Example);
| GetFileN | File I/O Vectorworks 2014 |
VectorScript Declaration:
FUNCTION GetFileN
( title :STRING; defaultFolder :STRING; mask :STRING; VAR fileName :STRING ) :BOOLEAN ; Python:
return (BOOLEAN, fileName)
def vs.GetFileN(title, defaultFolder, mask): Description:
Returns the fully-qualified pathname of the selected file.
| GetFilesInFolder | File I/O Vectorworks 2014 |
VectorScript Declaration:
FUNCTION GetFilesInFolder
( folderName :STRING; index :INTEGER ) :STRING ; Python:
return STRING
def vs.GetFilesInFolder(folderName, index): Description:
Returns the Nth filename in a folder.
| GetFolder | File I/O Vectorworks 2014 |
VectorScript Declaration:
FUNCTION GetFolder
( promptStr :STRING; VAR directoryPath :STRING ) :INTEGER ; Python:
return (INTEGER, directoryPath)
def vs.GetFolder(promptStr): Description:
Gets the path to a user selected folder
| GetFolderPath | File I/O VectorWorks8.0 |
VectorScript Declaration:
FUNCTION GetFolderPath
( whichPath:INTEGER ) :STRING ; Python:
return STRING
def vs.GetFolderPath(whichPath): Description:
Function GetFolderPath returns the full path to the requested folder independent of localized folder names.
Table - Folder Path Selectors
Note that use of the negative values of these constants can be used to get the user-based folder path. The positive values are for application-based paths, which should not be used for writing.
Folder Name Constant Application 1 Plug-Ins 2 Workspaces 4 Templates 7 Standards 8 Help 9 Dictionaries 10 User App Data 12 Libraries 13 Defaults 14 Settings 15 PDF Resources 18 Plug-In Data 20 Plug-In Includes 21 Plug-In interfaces 22 Favorites 23 Renderworks - Textures 100 Cabinet - Handles 101 Door - Hardware 102 Attributes - Gradients 103 Hardscape - Hatches 104 Attributes - Hatches 105 Attributes - Image Fills 106 Plants 107 Toilet Stall - Fixtures 108 RenderWorks - Backgrounds 109 Seating Layout - Symbols 110 Tile - Symbols 111 Human Figure - Textures 112 Walls 113 Stairs 114 Drawing Border - Title Blocks 115 Section - Markers 116 Repetitive Unit 117 Door - Custom Leaves 118 Lighting Instrument - Gobos 119 Reports~Schedules 120 Lighting Instrument - Symbols 121 Plants - Hatches 124 Repetitive Unit: Flooring/Decking 125 Repetitive Unit: Framing 126 Repetitive Unit: Masonry Units 127 Repetitive Unit: Miscellaneous 128 Repetitive Unit: Roofing 129 Repetitive Unit: Siding 130 Walls - Hatches 131 Walls - Textures 132 Window - Custom Shutters 133 Sketch Styles 134 Plant Database 135 VW Plants 136 Color Palettes 137 Framing Member - Custom Profile 138 Spaces - Occupant Organization Name Lists 140 Spaces - Space Name Lists and Libraries 141 Structural Shapes 142
Parameters:
whichPath Path constant. Example:
PROCEDURE Example; BEGIN AlrtDialog(GetFolderPath(12)); END; RUN(Example);
| GetFPathName | File I/O Vectorworks 2014 |
VectorScript Declaration:
FUNCTION GetFPathName
:STRING ; Python:
return STRING
def vs.GetFPathName(): Description:
Returns the fully-qualified filename of the active document.
| GetLastFileErr | File I/O VectorWorks8.5 |
VectorScript Declaration:
FUNCTION GetLastFileErr
:INTEGER ; Python:
return INTEGER
def vs.GetLastFileErr(): Description:
Returns an error code indicating whether an error occured during a file operation.
This function should be called after file I/O calls such as Open() or Rewrite().Example:
UseDefaultFileErrorHandling(FALSE); Open(Concat(pathName, fileName)); errorCode := GetLastFileErr; IF errorCode <> 0 THEN CASE errorCode OF 2: AlrtDialog(Concat('The file "', fileName, '" cannot be processed because the hard drive is full.')); 4: AlrtDialog(Concat('End of file "', fileName, '" reached prematurely.')); 5: AlrtDialog(Concat('The file "', fileName, '" is locked.')); 6: AlrtDialog(Concat('The file "', fileName, '" not found.')); 10: AlrtDialog(Concat('The file "', fileName, '" currently in use by another program.')); 13: AlrtDialog(Concat('The file path "', pathName, '" does not exist.')); OTHERWISE AlrtDialog(Concat('The file "',fileName,'" has encountered an undetermined error.')); END;
| ImportIGES | File I/O Vectorworks 2014 |
VectorScript Declaration:
FUNCTION ImportIGES
( fileName:STRING ) :BOOLEAN ; Python:
return BOOLEAN
def vs.ImportIGES(fileName): Description:
Import a 3D IGES file.Parameters:
fileName full path to the file for import Result:
Return TRUE if succeeded.See Also:
ExportIGES
| ImportSAT | File I/O Vectorworks 2013 |
VectorScript Declaration:
FUNCTION ImportSAT
( filePath :STRING; doSingleSym :BOOLEAN ) :HANDLE ; Python:
return HANDLE
def vs.ImportSAT(filePath, doSingleSym): Description:
Import a SAT file.Parameters:
filePath full path to the file for import doSingleSym import the file as a symbol Result:
Return handle to the imported symbol, or to the first imported object (first selected).
| Open | File I/O MiniCAD |
VectorScript Declaration:
PROCEDURE Open
( fileName:STRING ) ; Python:
return None
def vs.Open(fileName): Description:
Procedure Open opens a ASCII text file for reading.
Remember to use Close when you are finished reading or writing to a file.
If the filename includes a fully qualified path, the path has to use the appropriate notation for the local operating system:
Macintosh HD:Applications:Vectorworks:Plug-Ins:Data:Notes.txt C:\Program Files\Vectorworks\Plug-Ins\Data\Notes.txt If the filename includes a path relative to the location of the Vectorworks executable, the subfolder delimiters have to be backslashes:
Plug-Ins\Data\Notes.txt If the filename does not include a path, the file is assumed to exist in the same folder as the Vectorworks executable.Parameters:
fileName Name of file to open. Example:
PROCEDURE Example; VAR fileName :STRING; BEGIN UseDefaultFileErrorHandling(FALSE); fileName := 'Plug-Ins\Common\Data\Callout Prefs.txt'; Open(fileName); AlrtDialog(Concat(GetLastFileErr)); Close(fileName); END; RUN(Example);
| PutFile | File I/O MiniCAD |
VectorScript Declaration:
PROCEDURE PutFile
( commentStr :STRING; defaultStr :STRING; VAR fileName :STRING ) ; Python:
return fileName
def vs.PutFile(commentStr, defaultStr): Description:
Procedure PutFile displays a standard file dialog which requests the user to select or create a text file for output.
Parameters:
commentStr User prompt string for dialog. defaultStr Default file name string. fileName Returns name of the user selected file. Example:
PROCEDURE PutFileExample; VAR fileName :STRING; BEGIN PutFile('Select the file to create:', 'New File.txt', fileName); Message(fileName); IF NOT DidCancel THEN BEGIN WriteLn('some text'); Close(fileName); END; END; RUN(PutFileExample);See Also:
GetLastFileErr Rewrite GetFile Open Close
| Read | File I/O MiniCAD |
VectorScript Declaration:
PROCEDURE Read
( VAR z :ANY ) ; Python:
return z
def vs.Read(): Description:
Procedure Read will read data from a currently open text file. The variable length parameter list returns the read data in the specified parameters.Supported data types include INTEGER, REAL, LONGINT, CHAR or STRING.
Non STRING data values must be separated by a tab or space to be correctly read into variables. If the procedure encounters an EOF(end-of-file) marker, an error is generated. Read does not position the file position pointer to the beginning of a new line after the procedure is called.
Read will detect tabs as delimiters, allowing multiple string values to be assigned to variables.
| ReadLn | File I/O MiniCAD |
VectorScript Declaration:
PROCEDURE ReadLn
( VAR z :ANY ) ; Python:
return z
def vs.ReadLn(): Description:
Procedure ReadLn will read data from a currently open text file. The variable length parameter list returns the read data in the specified parameters.
Supported data types include INTEGER, REAL, LONGINT, CHAR or STRING. If the procedure encounters an EOF(end-of-file) marker, an error is generated. ReadLn positions the file position pointer to the beginning of a new line after the procedure is called.
ReadLn will detect tabs as delimiters, allowing multiple string values to be assigned to variables.
Example:
PROCEDURE Example; VAR fileName, value1, value2, value3 :STRING; major, minor, maintenance, platform :INTEGER; BEGIN GetVersion(major, minor, maintenance, platform); IF platform = 1 THEN BEGIN fileName := '/Example.txt'; END ELSE BEGIN fileName := 'C:\Example.txt'; END; Open(fileName); ReadLn(value1, value2, value3); Close(fileName); AlrtDialog(lineOfText); END; RUN(Example);
| Rewrite | File I/O MiniCAD |
VectorScript Declaration:
PROCEDURE Rewrite
( fileName:STRING ) ; Python:
return None
def vs.Rewrite(fileName): Description:
Procedure Rewrite creates a new ASCII text file or opens an existing one prior to writing data to the file. If the file exists, new data written to the file will overwrite any data currently within the file.
If the filename includes a fully qualified path, the path has to use the appropriate notation for the local operating system:
Macintosh HD:Applications:Vectorworks:Plug-Ins:Data:Notes.txt C:\Program Files\Vectorworks\Plug-Ins\Data\Notes.txt If the filename includes a path relative to the location of the Vectorworks executable, the subfolder delimiters have to be backslashes:
Plug-Ins\Data\Notes.txt If the filename does not include a path, the file is assumed to exist in the same folder as the Vectorworks executable.Parameters:
fileName Name of file. Example:
PROCEDURE Example; VAR fileName :STRING; major, minor, maintenance, platform :INTEGER; BEGIN GetVersion(major, minor, maintenance, platform); IF platform = 1 THEN BEGIN fileName := '/Example.txt'; END ELSE BEGIN fileName := 'C:\Example.txt'; END; ReWrite(fileName); WriteLn('example text'); Close(fileName); END; RUN(Example);
| SaveActiveDocument | File I/O Vectorworks 2014 |
VectorScript Declaration:
FUNCTION SaveActiveDocument
( filePath:STRING ) :LONGINT ; Python:
return LONGINT
def vs.SaveActiveDocument(filePath): Description:
Saves a file with out presenting dialogs
| Space | File I/O MiniCAD |
VectorScript Declaration:
PROCEDURE Space
( n:INTEGER ) ; Python:
return None
def vs.Space(n): Description:
Procedure Space writes a space to the current output file.Parameters:
n Number of spaces. Example:
Space(5); {write 5 spaces to the output file}
| StdRead | File I/O VectorWorks8.0 |
VectorScript Declaration:
PROCEDURE StdRead
( VAR z :ANY ) ; Python:
return z
def vs.StdRead(): Description:
Procedure StdRead will read data from a currently open text file. The variable length parameter list returns the read data in the specified parameters.
Supported data types include INTEGER, REAL, LONGINT, CHAR or STRING. Non STRING data values must be separated by a tab or space to be correctly read into variables. If the procedure encounters an EOF(end-of-file) marker, an error is generated. StdRead does not position the file position pointer to the beginning of a new line after the procedure is called.
StdRead reads data according to the Pascal language standard. This differs from the Read procedure found in VectorScript primarily when reading STRING data. StdRead will read all characters, including tabs and spaces, as a single string value. Read will detect tabs as delimiters, allowing multiple string values to be assigned to variables.Example:
GetFile(fName); IF NOT DidCancel THEN BEGIN Open(fName); StdRead(partID,partName); END;
| StdReadLn | File I/O VectorWorks8.0 |
VectorScript Declaration:
PROCEDURE StdReadLn
( VAR z :ANY ) ; Python:
return z
def vs.StdReadLn(): Description:
Procedure StdReadLn will read data from a currently open text file. The variable length parameter list returns the read data in the specified parameters.
Supported data types include INTEGER, REAL, LONGINT, CHAR or STRING. Non STRING data values must be separated by a tab or space to be correctly read into variables. If the procedure encounters an EOF(end-of-file) marker, an error is generated. StdReadLn positions the file position pointer to the beginning of a new line after the procedure is called.
StdReadLn reads data according to the Pascal language standard. This differs from the ReadLn procedure found in VectorScript primarily when reading STRING data. StdReadLn will read all characters, including tabs and spaces, as a single string value. ReadLn will detect tabs as delimiters, allowing multiple string values to be assigned to variables.
Example:
GetFile(fName); IF NOT DidCancel THEN BEGIN Open(fName); StdReadLn(partID,partName); END;
| Tab | File I/O MiniCAD |
VectorScript Declaration:
PROCEDURE Tab
( n:INTEGER ) ; Python:
return None
def vs.Tab(n): Description:
Procedure Tab writes a tab character to the current output file.Parameters:
n Number of tab characters to be written to file. Example:
Tab(2); {writes two tabs to the output file}
| UseDefaultFileErrorHandling | File I/O VectorWorks8.5 |
VectorScript Declaration:
PROCEDURE UseDefaultFileErrorHandling
( enable:BOOLEAN ) ; Python:
return None
def vs.UseDefaultFileErrorHandling(enable): Description:
Enables or disables file I/O alert dialogs.
Use this function with GetLastFileErr() to implement custom error handling for file operations.Parameters:
enable Status of file error dialog usage. See Also:
GetLastFileErr
| Write | File I/O MiniCAD |
VectorScript Declaration:
PROCEDURE Write
( z :ANY ) ; Python:
return None
def vs.Write(z): Description:
Procedure Write outputs the specified data to an ASCII text file. The variable length parameter list specifies the data to be written to the file.
Parameters may be any valid data type, and data types may be mixed in a single call to the procedure. Write leaves the file pointer positioned at the end of the last data value written to the file; any data subsequently written to the file will be appended to the end of this value.
See the VectorScript Language Guide for details on formatting values using WriteLn.Example:
Write(Value1);
| WriteLn | File I/O MiniCAD |
VectorScript Declaration:
PROCEDURE WriteLn
( z :ANY ) ; Python:
return None
def vs.WriteLn(z): Description:
Procedure WriteLn outputs the specified data to an ASCII text file. The variable length parameter list specifies the data to be written to the file.
Parameters may be any valid data type, and data types may be mixed in a single call to the procedure. A carriage return is appended to the end of the line of data, so that the file pointer is at the beginning of a new line in the file, and any data written to the file after the procedure call will be on the new line.
See the VectorScript Language Guide for details on formatting values using WriteLn.
Example:
PROCEDURE Example; CONST Vendor = 'ACME'; Price = 123.45; Tax = 1.07; BEGIN ReWrite('Output.txt'); WriteLn('Mfr/Cost: ', Vendor, '/', Price + Tax); Close('Output.txt'); END; RUN(Example);See Also:
WriteLnMac
| WriteLnMac | File I/O VectorWorks9.0 |
VectorScript Declaration:
PROCEDURE WriteLnMac
( z :ANY ) ; Python:
return None
def vs.WriteLnMac(z): Description:
Writes a line of data to a text file using Macintosh character encoding for extended ASCII characters (128-255). This allows extended character data to be properly read and displayed by Vectorworks on Windows systems (Vectorworks by default uses Macintosh encoding for extended character values).
The line of data written to file is terminated with a return character combination appropriate for the platform on which the file is being written.
Example:
PROCEDURE Example; CONST Vendor = 'ACME'; Price = 123.45; Tax = 1.07; BEGIN Open('Output.txt'); WriteLnMac('Mfr/Cost: ', Vendor, '/', Price + Tax); Close('Output.txt'); END; RUN(Example);See Also:
WriteLn
| WriteMac | File I/O VectorWorks9.0 |
VectorScript Declaration:
PROCEDURE WriteMac
( z :ANY ) ; Python:
return None
def vs.WriteMac(z): Description:
Outputs the specified data to an ASCII text file. The variable length parameter list specifies the data to be written to the file.
Parameters may be any valid data type, and data types may be mixed in a single call to the procedure. WriteMac leaves the file pointer positioned at the end of the last data value written to the file; any data subsequently written to the file will be appended to the end of this value.
See the VectorScript Language Guide for details on formatting values using WriteLn.Example:
WriteMac(Value1);