Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save UweRaabe/69a8bc074fc3b69721f745a2642f33cb to your computer and use it in GitHub Desktop.
Save UweRaabe/69a8bc074fc3b69721f745a2642f33cb to your computer and use it in GitHub Desktop.
procedure TdmScripting.PrepareScripter(AScripter: TIDEScripter);
begin
AScripter.DefineClassByRTTI(TTwinCATVar);
AScripter.DefineClassByRTTI(TTwinCATVarBOOL);
AScripter.DefineClassByRTTI(TTwinCATVarBYTE);
AScripter.DefineClassByRTTI(TTwinCATVarINT);
AScripter.DefineClassByRTTI(TTwinCATVarLONG);
AScripter.DefineClassByRTTI(TTwinCATVarSINGLE);
AScripter.DefineClassByRTTI(TTwinCATVarDOUBLE);
AScripter.DefineClassByRTTI(TTwinCATVarSTRING);
AScripter.DefineClassByRTTI(TTwinCATVarBYTES);
AScripter.AddComponent(Self);
AScripter.AddObject('PLC', PLC);
AScripter.AddObject('NC', NC);
end;
@UweRaabe
Copy link
Author

UweRaabe commented Nov 3, 2016

This is some real project code that allows creation and access to custom classes from the script.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment