Book a Demo

Author Topic: Populate model elements/tagged values using data from a set of xml files  (Read 3942 times)

pmd203

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Hi,

I'm a systems engineer trying to model a fairly complex system. I have a set of xml files that describe each element in the system (one xml per element) and the features it supports. Is there a way that I can use these xml files as a starting point in a SysML model so that I can then go ahead and use EA to define the interconnections between each element in the system?

Here are some more specifics: The system consists of a central controller and each of the sub-systems with which it interfaces support one or more features that can be controlled by the controller. For example on some systems the controller can command the sub-systems to go into test mode. On others it can load software to it. The xml files I have describe the sub-systems, which features they support and the options for each feature. I also have the xsd for the xml files used to describe the sub-systems.

What I would like to end up with is a SysML model that has each of the sub-systems as a block and (perhaps) each of the features and options defined as tagged values for that block. My hope is to eventually document the sub-systems the options they support and their relationship to the controller using EA's document generation

pmd203

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Re: Populate model elements/tagged values using data from a set of xml files
« Reply #1 on: January 22, 2016, 03:26:41 am »
I should also say I'm open to other ideas on how to solve this!

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Populate model elements/tagged values using data from a set of xml files
« Reply #2 on: January 22, 2016, 05:04:05 am »
Hi,

The good news is that this is in fact possible.
The bad news is that you'll have to write some code to get it done.

There are a few possibilities here. You could make a standalone program or EA add-in in a language such as C#. See http://bellekens.com/writing-ea-add-ins/ for some more info on that.
You could do something in Excel VBA or the likes. See http://bellekens.com/2015/10/24/simple-vba-excel-to-ea-importer-v4/ for an example of such a tool.
Or you could do something with the built-in scripting module. See http://bellekens.com/2015/12/27/how-to-use-the-enterprise-architect-vbscript-library/ to find a bunch of VBscript examples to get you going.

Geert

pmd203

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Re: Populate model elements/tagged values using data from a set of xml files
« Reply #3 on: January 22, 2016, 08:36:18 pm »
Thanks I'll give that a go.