Book a Demo

Author Topic: SysML script read a textfile?  (Read 4545 times)

blabla

  • EA User
  • **
  • Posts: 21
  • Karma: +0/-0
    • View Profile
SysML script read a textfile?
« on: May 29, 2015, 10:15:47 pm »
Hello
Is it possible to read a textfile with the script in JAVASCRIPT of a constraint block?

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: SysML script read a textfile?
« Reply #1 on: May 29, 2015, 11:58:23 pm »
Have you tried?

blabla

  • EA User
  • **
  • Posts: 21
  • Karma: +0/-0
    • View Profile
Re: SysML script read a textfile?
« Reply #2 on: June 03, 2015, 06:13:20 pm »
I used this programm line

readTextFile("C:\Users\ma\Desktop\Hello.txt");


Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: SysML script read a textfile?
« Reply #3 on: June 04, 2015, 11:29:09 am »
You'll need to use FileSystemObject. The help for simulation contains instructions for creating an ActiveX object from Javascript.