The Blog for Rhapsody (Power) Users.

Month: September 2018

Switzerland

On the Road again

This week started with a flight to Switzerland. On Saturday night to be precise, my plane left Sunday morning at 7 from Schiphol, I cannot make that in time. So I slept in a hotel near the airport.

It turned out to be a “sporty” day, the hotel Shuttle brought me to Terminal 3 while I had to be in terminal 1…. also the first shuttle left the hotel at 6, drive took 15 minutes, all quite “sporty” to be in time.

But I made it with some running and I still had time to buy a present for my hosts.

Switzerland is a beautiful country, the flight brought me to Geneva, first time I’ve been there. From there the train took me to Neuchâtel, a really beautiful city next to the lake. The problem for us “other Europeans” is that Switzerland is expensive. Really expensive. The simplest things costs about 3 times what they cost in Germany. I always joke that when you want to have dinner you first have to raise your mortgage.
a bit exaggerated but with a slight truth in there.

But, as already said, the country is beautiful so I decided to enjoy it and not mind the costs.

Unfortunately it was not just fun and vacation… i had to work as well. But it was quite successful, that helps!

This weeks Rhapsody problem was mostly trouble with license keys. Mostly when everything works, it will continue to work. But before it works… and when it stops working…
After installing Rhapsody you should install the license. There are multiple ways to have a license, Authorised User or Floating )or Tokens), File or Dongle, EUSIII, Developer, Designer or Architect.

Authorised or Floating

A floating license is installed on a server. It can be used by multiple people though not at the same time. The license file will have a line that points to the server.

An authorised license can only be used by one person. You can, of course, change this person when a project ends or somebody quits but not multiple times a day.

You can have a dongle license but then you still have a license file, one with the dongle ID in there.

You should keep a document (Excel Sheet) with the names of the persons that use certain licenses. (In fact you have to according to the license agreement)

If you want to use Rhapsody in a continuous build environment you have to have a floating license.

The Rhapsody version is determined in the license file (and you have to start the right version of course! I have written a lot about starting the right version, try: (Un-)Installing and Configuring Rhapsody or Installing Rhapsody

The license file must be in a place where Rhapsody looks for it. this is determined by an Environment Variable: TELELOGIC_LICENSE_FILE. This points to the path where the license lives. (Only the path if the license file is called license.lic, otherwise the complete path.

To make things a bit more complicated, flex-lm also looks in the registry where it stores all previous paths where it found a license.
There is a neat program that you can use to check if the license is found and if it is correct, it is called lmtools. use that to check if your flex-lm is OK.

The pictures

 

That was it! Happy modeling with Rhapsody

Walter van der Heiden ( wvdheiden@willert.de )

Reverse Engineering for Dummies

How to import external sources to an Rhapsody Model

Sometimes it is necessary  to use data-types and/or functions defined in header files given by an other developer. In this case the best way is to import these header files as external files to the working model. For external files no code is generated.

In the following article two models are mentioned. A working model with whom the application is developed and an import model to perform Reverse Engineering.

1 – Initial import

To import external sources to a Rhapsody model Reverse Engineering can be used. In the following steps the import process is described.

    1. Open Rhapsody (depending on the language of the given source files choose Rhapsodoy in C or Rhapsody in C++)
    2. Create a new project (the import model).
    3. Open Tools > Reverse Engineering
    4. Choose Logical Modelling

      image2018-9-10_15-46-7

    5. Browse to file which have to be imported and select them.
      image2018-9-10_15-49-12
    6. Click Next and set External elements and Single top level package.
      image2018-9-10_15-52-38
    7. Import files with Next  and Finish. After that you should get something like in the next figure

      image2018-9-10_16-1-0
      At the package icon the small yellow arrow shows that no code is generated for the content of this package.

    8. (Optional) If the sources are in C and should be used in an C++ model (the working model) the language of the unit has to be changed to C++. With a right click of the package open the context menu and choose Unit > Edit Unit… and open the following window.
      image2018-9-10_16-6-26
      Switch the language to C++ and click OK.
    9. Close the import model and open the working model in which the sources should be used.
    10. Choose  File > Add to model… and browse to the created package.
      image2018-9-10_16-14-15
      As options choose As Unit and Copy Into Model.
    11. Now the data-types and functions can be referenced in the working model. In the following picture some samples of usage are shown.

      Select return type

      or argument type

      image2018-9-10_16-23-9

      or with the shortcut Ctrl + Space in the implementation.

image2018-9-10_16-24-40


Attention

When executed again, other GUID are assigned to the data types and functions. As a result, they are no longer recognised in the working model and must be reassigned.
If changes occur to the imported sources, they must be manually added to the imported package.
To prevent accidental overwriting, it is recommended to delete the import model used for reverse engineering after importing the package into the working model  


2 – Add additional header files

If new header files has to be imported to the externalSources package proceed as follows:

  1. Open Rhapsody (depending on the language of the given source files choose Rhapsodoy in C or Rhapsody in C++)
  2. Create a new project (the import model).
  3. Open Tools > Reverse Engineering
  4. Choose Logical Modelling

    image2018-9-10_15-46-7
  5. Browse to file which have to be imported and select them.

    image2018-9-12_9-59-0
  6. Click Next and set External elements and Single top level package. Choose another package name (externalSources_new) than in the working model.

    image2018-9-12_10-2-12


  7.  Import files with Next  and Finish. After that you should get something like in the next figure.
    image2018-9-12_10-3-44At the package icon the small yellow arrow shows that no code is generated for the content of this package.
  8. (Optional) If the sources are in C and should be used in an C++ model (the working model) the language of the unit has to be changed to C++. With a right click of the package open the context menu and choose Unit > Edit Unit… and open the following window.
    image2018-9-12_10-5-34
    Switch the language to C++ and click OK.

     

  9. Close the import model and open the working model in which the sources should be used
  10. Choose  File > Add to model… and browse to the created package.
  11. Now the new file can be moved to the externalSources package. It is easier to handle only one external package.
    image2018-9-12_10-8-4
  12. After that you should get something like in the next figure.
    image2018-9-12_10-9-56
  13. Now the new file can be moved to the externalSources package. It is easier to handle only one external package.
  14. Following video shows step 9 to 13:
    [wpvideo aFGPYz13]

     

That was it! Thanks to Dennis Koelbel for creating this article and video!

Happy Modeling with Rhapsody!

Walter van der Heiden (wvdheiden@willert.de)

© 2025 Rhapsody Tech Blog

Theme by Anders NorenUp ↑