How convert XML to STEP(p21) format? - c++

I am new STEP and Express modeling. How can I convert XML data into STEP "p21" file using C++ bindings and CAA module? Where can I find a good tutorial for the EXPRESS modeling language? If I am missing something, suggest me to learn them. I would like someone to explain me the way we do it or show some guidelines to approach the problem.

You should definitively take a look at the CAA V5 Encyclopedia. The chapter about ENOVIA V5 contains several articles such as:
STEP Overview - Understanding STEP, Express, and SDAI
Building Components - How to build an Express schema
Generating the ENOV_DATAX Data Structure - How to migrate data to
ENOVIA
... as well as a few use cases and quick API reference.
Since you must use the CAA, you also have the option take a course directly from Dassault Systèmes

Related

Open Source Tools for MDA/MDD

I need to do some research in MDA/MDD to find Open-Source-Tools which will help me to develop code-generators and transformators.
But there are only a few tools which are actually supported. Do I search in the wrong direction?
Do You know open source tools for MDA/MDD?
Greetings Dominic
I found andromda, Eclipse Modelling Framework and a few tools like plantuml, which help to create diagrams .
My plan is to read diagrams with plantuml and convert them with emf to code and the reverse way.
Telosys could be a solution to your need (https://doc.telosys.org/)
Telosys has its own DSL to define the models (based on text files with a simple grammar), see https://doc.telosys.org/dsl-model
A Telosys model can be used to generate any kind of target language (including PlantUML) but Telosys cannot parse PlantUML files, so the input model must be a Telosys model (or a database schema if you create the model from a relational DB).

How to Show C++ Results in Excel

I am trying to create C++ code that allows User Input in selecting a variety of fields, then it will calculate many different angles and show the users the results, as well as a graph.
However, it has been suggested to us by our lecturer that it may be a good idea to write the code to these calculations etc in C++, then input the results into Excel.
Does anyone have any idea how to do this? Literally looking for a way for the user to fill in the required values on C++ and then to be AUTOMATICALLY taken to the excel file to show the results in the table and graph format.
If this is not possible, is there a way to display the results in the table and graph format through C++?
Thanks very much in advance
Excel provides COM interface which you can use from your C++ application.
This can be done in the way described in this article:
http://support.microsoft.com/kb/216686
This link might also be useful:
http://www.codeproject.com/Articles/10886/How-to-use-Managed-C-to-Automate-Excel
I think the second link would be better for you as its more of a step by step guide which should help you to workout the answer.
Use COM Automation to automate excel.
The best way to do this is to use the vole library by Matthew Wilson at
http://vole.sourceforge.net/
Take a look at the examples. I do not think there is an example for excel, but there is one for microsoft word at http://www.codeproject.com/KB/COM/VOLE_word.aspx
I have used vole in the past, and it makes it a whole lot easier

AnthillPro - CCTray integration

Does anyone know if you can use CCTray (or an equivalent) with AnthillPro? I'm not finding a lot of documentation and am new to using AHP.
Thanks.
You should be able to use CCTray type tools with AnthillPro. You would need to create a custom report to generate the XML though.
Shoot me an email at eric#urbancode.com I may be able to write this later in the week.
Otherwise, you could experiment with report writing.
You can find the cc xml format here: http://confluence.public.thoughtworks.org/display/CI/Multiple+Project+Summary+Reporting+Standard
Example AP report code that iterates over each build workflow and spits out data about the latest build is here: https://bugs.urbancode.com/browse/AHPSCRIPTS-13
The "Recent Build Life Activity (RSS)" report that I think ships with the product would give you an XML example.

building objects from xml file at runtime and initializing, in one pass?

I have to parse the XML file and build objects representation based on that, now once I get all these data I create entries in various database for these data objects. I have to do second pass over that for value as in the first pass all I could do is build the assets in various databases. and in second pass I get the values for all the data and put it in the database.
I have a feeling that this can be done in a single pass but I just want to see what are your opinions. As I am just a student who started with professional work, experienced ppl please help.
Can someone who have ideas or done similar work, please provide some light on the topic so that I can think over the possibility of the work and get the prototype going based on your suggestion.
Thanks a lot for your precious time, I honestly appreciate it.
You might be interested in learning several techniques of building XML parsers like DOM or SAX. As it is said in SAX description the only thing which requires second pass could be the XML validation but not the creating the tree.
Beside DOM and SAX parsing, you can use XQuery for querying data from XML files.It is fast, robust and efficient.
here is a link
You can use Qt Xml module for DOM ,SAX and XQuery, btw it is open source.
Another option is xml - C++ data binding, Here is the link.You can create C++ codes from definition directly.It is an elegant solution.
EDIT:
the latter one is at compile time.
You can also use Apache Licensed http://xmlbeansxx.touk.pl/. It works under Windows and Linux.
you could take a look at the somewhat simpler 'pull' api called stax instead of using sax (event based).

library for doing diffs

I've been tasked with creating a tool that can diff and merge the configuration files for my company's product. The configurations are stored as either XML or URL-encoded strings. I'm looking for a library, preferably open source with a license compatible with commercial software, that can do these diffs. Our app is written in C++, so C++ libraries would be best, but I'm willing to look at libraries that are C#-specific since I can write a wrapper that exposes it to C++ via COM. Three-way diffs would be ideal, but two-way is acceptable. If it has an understanding of XML, that would also be a plus (since XML nodes can be reordered without changing the document, etc). Any library suggestions? Should I even consider writing my own diff tools in the hopes of giving it semantic knowledge of our formats?
Thanks to this similar question, I've already discovered this google library, which seems really great, but I'm still looking for other options. It also seems to be able to output the diffs in HTML format (using the <ins> and <del> tags that I didn't know existed before I discovered it), which could be really handy, but it seems to be a unified diff only. I'm going to need to display the results in a web browser, and probably have to build an interface for doing the merges in the browser as well. I don't expect a library to be able to help with these tasks, but it must produce output in a format that is amenable to me building this on top of it. I'm currently envisioning something along the lines of TortoiseMerge (side-by-side diffs, not unified), except browser-based. Any tips/tricks/design ideas on how to present this would be appreciated too.
Subversion comes with libsvn_diff and libsvn_delta licensed under Apache Software License.
Here is a C++ library that can diff what the author calls semistructured data. It deals nicely with HTML and XML. Since your data is XML it would make a lot of sense to use this instead of plain text diff. This is especially the case when the files are machine generated.
I am currently trying to use this library to build a tool that diffs Visual Studio project files. These are basically XML files and using a plain diff tool like Winmerge is too painful because Visual Studio pretty much mucks up the whole file by crazy reordering. The idea is to do some kind of a structured diff to address the problem.
For diffing the XML I would propose that you normalize it first: sort all the elements in alphabetic order, then generate a stream of tokens/xml that represents the original document but is independent of the original formatting. After running the diff, parse the result to get a tree containing what was added / removed.