To open any link in a new tab, preserving your position in the current article, just hold down the <CTRL> key on your keyboard before clicking the link or click using your mouse wheel.

Functions - ExecuteScript - FD

Functions - ExecuteScript

Executes the script property, passing a CRLF delimited list of parameters. Returns the value assigned to Result in the script.

Syntax:

Function: ExecuteScript(ParamList: String ''): Variant;

API Calls

Delphi

Using IItem Object Model
procedure psExecuteScript;
var
  ps: IPlanSwift;
  itm: IItem;
  prop: IPropertyObject;
  formula: string;
begin
  //Create The Planswift Interface
  ps := coPlanswift.Create;
  //Get the Selected Item
  itm := ps.SelectedItem;
  //Check if var is empty
  if varisclear(itm) then begin
    showmessage('Please Select an Item');
    ps := nil;
    Exit;
  end;
  //write The Script to execute
  formula :=  'ShowMessage(' + chr(39) + 'Script has been Executed' + chr(39) + ');';
  //Create a New Property and set its type to script
  prop := itm.NewProperty('Custom Script',formula,ptscript);
  //Set the Script type to method
  prop.ScriptType := stMethod;
  //Set the language to pascal
  prop.ScriptLanguage := slPascal;
  //Execute the Script
  prop.ExecuteScript('');
  //Free Planswift interface
  ps := nil;
end; 
Using PlanSwift Object Model
 

C#

Using IItem Object Model
 
Using PlanSwift Object Model
 

VB/VBA (OLE)

Using IItem Object Model
 
Using PlanSwift Object Model
 

Pascal Scripting (OLE)

Item Object Model
 
Root Object Model
 

Pascal Scripting

Item Object Model
 
Using the PlanSwift Object Model
 


Copyright 2023 ConstructConnect