Book a Demo

Author Topic: Import scripts in repository  (Read 5616 times)

MatthiasVDE

  • EA User
  • **
  • Posts: 196
  • Karma: +1/-0
    • View Profile
Import scripts in repository
« on: January 22, 2020, 07:31:09 pm »
How can I import existing scripts from one repository to another repository?

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Import scripts in repository
« Reply #1 on: January 22, 2020, 08:01:16 pm »
import/export reference data.

See also my refdata splitter for a more finegrained control of which scripts to include in the refdata file.
https://github.com/GeertBellekens/EARefDataSplitter

Geert

MatthiasVDE

  • EA User
  • **
  • Posts: 196
  • Karma: +1/-0
    • View Profile
Re: Import scripts in repository
« Reply #2 on: January 22, 2020, 08:03:41 pm »
That functionality uses xml files, but how does it works for *.vbs files?

Uffe

  • EA Practitioner
  • ***
  • Posts: 1859
  • Karma: +133/-14
  • Flutes: 1; Clarinets: 1; Saxes: 5 and counting
    • View Profile
Re: Import scripts in repository
« Reply #3 on: January 22, 2020, 08:26:18 pm »
That functionality uses xml files, but how does it works for *.vbs files?

It doesn't. You can export scripts with the Save As button, but you can't import them that way.

Only way to get a .vbs file into a project (that I know of, and I don't know everything) is to open it in an editor, copy the text, create a new script in the EA project and paste.

/Uffe
My theories are always correct, just apply them to the right reality.

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Import scripts in repository
« Reply #4 on: January 22, 2020, 09:06:07 pm »
That functionality uses xml files, but how does it works for *.vbs files?

It doesn't. You can export scripts with the Save As button, but you can't import them that way.

Only way to get a .vbs file into a project (that I know of, and I don't know everything) is to open it in an editor, copy the text, create a new script in the EA project and paste.

/Uffe
I also have a script to import/export script via .vbs files:
Load scripts: https://github.com/GeertBellekens/Enterprise-Architect-VBScript-Library/blob/master/Framework/Tools/Script%20Management/LoadScripts.vbs
Save Scripts: https://github.com/GeertBellekens/Enterprise-Architect-VBScript-Library/blob/master/Framework/Tools/Script%20Management/SaveAllScripts.vbs

But using refdata import/export is the preferred way.

Geert

MatthiasVDE

  • EA User
  • **
  • Posts: 196
  • Karma: +1/-0
    • View Profile
Re: Import scripts in repository
« Reply #5 on: January 22, 2020, 09:11:13 pm »
That functionality uses xml files, but how does it works for *.vbs files?

It doesn't. You can export scripts with the Save As button, but you can't import them that way.

Only way to get a .vbs file into a project (that I know of, and I don't know everything) is to open it in an editor, copy the text, create a new script in the EA project and paste.

/Uffe
I also have a script to import/export script via .vbs files:
Load scripts: https://github.com/GeertBellekens/Enterprise-Architect-VBScript-Library/blob/master/Framework/Tools/Script%20Management/LoadScripts.vbs
Save Scripts: https://github.com/GeertBellekens/Enterprise-Architect-VBScript-Library/blob/master/Framework/Tools/Script%20Management/SaveAllScripts.vbs

But using refdata import/export is the preferred way.

Geert

I'll try that script Geert, but doesn't that LoadScripts.vbs script has dependencies on other scripts that you need to import/create first?

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Import scripts in repository
« Reply #6 on: January 22, 2020, 09:36:45 pm »
You can also try https://github.com/GeertBellekens/Enterprise-Architect-VBScript-Library/blob/master/Framework/Tools/Script%20Management/LoadScriptsBootstrap.vbs, but really you should not do it this way.

Use refdata import/export instead; it'll save you some headaches in the future.

Geert