Functions

Old Content - visit altium.com/documentation

Parent page: JScript

JScript Functions

JScript functions are based on built-in objects such as the Math object and Data object, which can have their methods invoked to acquire the required data.

Built in functions

Altium Designer's scripting engine provides JScript language built-in objects that can be used in scripts. These objects have methods and properties that can be invoked in scripts.

Example using the built-in Date object

function DateDemo(){
   var d , s = "Today's date is: ";          //Declare variables
   d = new Date();                           //Create Date object
   s += (d.getMonth() + 1) + "/";            //Get month
   s += d.getDate() + "/";                   //Get day
   s += d.getYear();                         //Get year
   showmessage(s);                           //Display the date.
}

Built-in Objects table

Language Element

Description

ActiveXObject Object

Enables and returns a reference to an Automation object

Array Object

Provides support for creation of arrays of any data type

arguments Object

An object representing the arguments to the currently executing function, and the functions that called it

Boolean Object

Creates a new Boolean value.

Date Object

Enables basic storage and retrieval of dates and times.

Debug Object

An intrinsic object that can send output to a script debugger.

Enumerator Object

Enables enumeration of items in a collection.

Error Object

An object that contains information about errors that occur while JScript code is running.

Function Object

Creates a new function.

Global Object

An intrinsic object whose purpose is to collect global methods into one object.

Math Object

An intrinsic object that provides basic mathematics functionality and constants.

Number Object

An object representation of the number data type and placeholder for numeric constants.

Object Object

Provides functionality common to all JScript objects.

RegExp Object

Stores information on regular expression pattern searches.

Regular Expression Object

Contains a regular expression pattern.

String Object

Allows manipulation and formatting of text strings and determination and location of substrings within strings

VBArray Object

Provides access to Visual Basic safe arrays.

You are reporting an issue with the following selected text and/or image within the active document:
ALTIUM DESIGNER FREE TRIAL
Altium Designer Free Trial
Let’s get started. First off, are you or your organization already using Altium Designer?

If would like to speak with a representative, please contact your local Altium office.
Copyright © 2019 Altium Limited

In that case, why do you need an evaluation license?

If would like to speak with a representative, please contact your local Altium office.
Copyright © 2019 Altium Limited

Got it. You actually don’t need an evaluation license for that.

Click the button below to download the latest Altium Designer installer.

Download Altium Designer Installer

If would like to speak with a representative, please contact your local Altium office.
Copyright © 2019 Altium Limited

Please fill out the form below to get a quote for a new seat of Altium Designer.

By clicking “Get Your Free Trial”, you are agreeing to our Privacy Policy.
You may receive communications from Altium and can change your notification preferences at any time.

If you are on Altium Subscription, you don’t need an evaluation license.

If you are not an active Altium Subscription member, please fill out the form below to get your free trial.

By clicking “Get Your Free Trial”, you are agreeing to our Privacy Policy.
You may receive communications from Altium and can change your notification preferences at any time.

Why are you looking to evaluate Altium Designer?

If would like to speak with a representative, please contact your local Altium office.
Copyright © 2019 Altium Limited

You came to the right place! Please fill out the form below to get your free trial started.

By clicking “Get Your Free Trial”, you are agreeing to our Privacy Policy.
You may receive communications from Altium and can change your notification preferences at any time.

Sounds exciting! Did you know we offer special discounted student licenses? For more information, click here.

In the meantime, feel free to request a free trial by filling out the form below.

By clicking “Get Your Free Trial”, you are agreeing to our Privacy Policy.
You may receive communications from Altium and can change your notification preferences at any time.

Got it. You can download a free Altium Designer Viewer license which is valid for a 6 months.

Please fill out the form below to request one.

By clicking “Get Your Free Trial”, you are agreeing to our Privacy Policy.
You may receive communications from Altium and can change your notification preferences at any time.

That’s great! Making things is awesome. We have the perfect program for you.

Upverter is a free community-driven platform designed specifically to meet the needs of makers like you.

Click here to give it a try!

If would like to speak with a representative, please contact your local Altium office.
Copyright © 2019 Altium Limited

Got it. You can download a free Altium Designer Viewer license which is valid for a 6 months.

Please fill out the form below to request one.

By clicking “Get Your Free Trial”, you are agreeing to our Privacy Policy.
You may receive communications from Altium and can change your notification preferences at any time.