VS:GetVersionEx

From Vectorworks Developer
Jump to: navigation, search

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

Description

Returns version information about the Vectorworks application. Parameter major returns the major version number of the application. Parameters minor and maintenance return minor version information. Parameter platform returns the OS platform on which Vectorworks is running (1 = Macintosh, 2 = Windows).

Parameter buildNum returns the build number of the version.

Vectorworks 2008 has version major number 13, 2009 - 14 and so on.

For example:

Vectorworks 2010.0.1 running on a Macintosh would return:

major: 15
minor: 0
maintenance: 1
platform: 1
buildNum: 95668

PROCEDURE GetVersionEx(
VAR major  :INTEGER;
VAR minor  :INTEGER;
VAR maintenance  :INTEGER;
VAR platform  :INTEGER;
VAR buildNum  :LONGINT);
def vs.GetVersionEx():
    return (major, minor, maintenance, platform, buildNum)

Parameters

major INTEGER Returns major version number of application.
minor INTEGER Returns minor version number of application.
maintenance INTEGER Returns maintenance version number of application.
platform INTEGER Returns platform of application.
buildNum LONGINT Returns the build number of application.

Example

PROCEDURE Example;
VAR 
	osMajor, osMinor, osIncr :LONGINT; 
	appMajor, appMinor, appMaint, platform :INTEGER;
	buildNum  :LONGINT;
	platformStr :STRING;
BEGIN
	GetVersionEx(appMajor, appMinor, appMaint, platform, buildNum);
	GetOSVersion(osMajor, osMinor, osIncr);
	IF (platform = 1) 
		THEN platformStr := 'MacOS'
		ELSE platformStr := 'Windows';
	Message('Vectorworks ', appMajor, '.', appMinor, '.', appMaint, ' build ', buildNum, ' running on ', platformStr, ' ', osMajor, '.', osMinor, '.', osIncr);
END;
RUN(Example);

Version

Availability: from Vectorworks 2010

See Also

VS:GetVersion
[[VS:GetVersion]]
Personal tools
NamespacesFFFF

Variants
Actions
Advanced Search
See Also
Navigation
Toolbox