Difference between revisions of "VS:SaveActiveDocument"

From Vectorworks Developer
Jump to: navigation, search
m (1 revision)
(add remark and example)
Line 30: Line 30:
  
 
-----------------------------------------------------------------------------------------------------------
 
-----------------------------------------------------------------------------------------------------------
<remark></remark>
+
<remark>
 +
([[User:Orso.b.schmid|Orso]], 2014.09.20): Introduced by VW 10 (not 2010!), made public for VW 2014. This is predestinated to usage with Applescript, since it's dialog-free. Probably created for that precise usage, since I am not aware of a single command in the main application that could be using it.
 +
</remark>
  
 
-----------------------------------------------------------------------------------------------------------
 
-----------------------------------------------------------------------------------------------------------
<sample></sample>
+
<sample><code lang="pas">
 +
PROCEDURE Test;
 +
VAR
 +
temp_l : LONGINT;
 +
BEGIN
 +
{ save the current file in the application folder }
 +
temp_l := SaveActiveDocument(concat(getFolderPath(1), 'try.mcd'));
 +
END;
 +
Run(Test); { orso }</code>
 +
</sample>
  
 
-----------------------------------------------------------------------------------------------------------
 
-----------------------------------------------------------------------------------------------------------

Revision as of 13:50, 20 September 2014

.VectorScript|VectorScript ..VS:Function Reference|Function Reference ..VS:Function_Reference_Appendix|Appendix

Description

Saves a file with out presenting dialogs
FUNCTION SaveActiveDocument(
filePath  :STRING) : LONGINT;
def vs.SaveActiveDocument(filePath):
    return LONGINT

Parameters

filePath STRING

Remarks

(Orso, 2014.09.20): Introduced by VW 10 (not 2010!), made public for VW 2014. This is predestinated to usage with Applescript, since it's dialog-free. Probably created for that precise usage, since I am not aware of a single command in the main application that could be using it.

Example

PROCEDURE Test;
VAR
	temp_l	: LONGINT;
BEGIN
	{ save the current file in the application folder }
	temp_l := SaveActiveDocument(concat(getFolderPath(1), 'try.mcd'));
END;
RUN(Test); { orso }

Version

Availability: from Vectorworks 2014
Personal tools
NamespacesFFFF

Variants
Actions
Advanced Search
See Also
Navigation
Toolbox