Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - Michael Proske

Pages: [1]
1
General Board / Experiences with Update Style in RTF Templates
« on: July 30, 2011, 02:50:05 am »
I just wanted to write down my frustration with the Update Style feature in EA 9. I have twenty of RTF Templates and there was no the task to change it to a new company style.
First task:
Change the page size and change borders. I tried to change the size in the normal.rtf file but this only works for new documents. Update style does not update the page size and borders. By that i was wondering why page size stil was the same even if i changed it under Program Files\Sparx Systems\EA\DocTemplates\Normal.rtf. I found out that EA always generates a copy of this file under C:\Documents and Settings\<username>\Application Data\Sparx Systems\EA\RTF Templates and only use this one for update style but does not change it when i edit the one under the program directory. Caused a lot of trouble so when you change the styles always delete the one in %APPDATA% it will be created immediately when style info is needed.

Second problem i had was that even i have changed Normal Style to Arial 10 after update style it was changed to Arial 10. This problem was solved after i changed the default paragraph font also and gave hime a concrete Font and size information. {\cs1\f0\fs20\cf0\sa120\sl240 Default Paragraph Font;} and here is the font definition {\fonttbl{\f0 \fswiss Arial;}{\f1 \fswiss \fcharset2 Symbol;}{\f2 \froman Lucida Sans;}}

Third problem is that after update style all font information like Bold or colored text is changed to standard normal style. Also Headings are resetted to normal but they keep their style information. You have to set the style again and also switch on numbering.  Didn't find a solution for that.

Fourth problem i had was that the table size was greater than the page size. I exported the document to an rtf file and changed the table site manually in the rtf file what was eays. Then import the file again and ... nothing changed. I found out that you have to close the rtf template and import only works when is open without any change. Could be a memory problem. So any change to the rtf file should be imported only to a newly open template otherwise it fails.

I still have some bugs in when generating documents with the new templates. One is that text in color will not generated when displaying a tagged value (ValueOf(...)). Also sometimes the style of a figure note ist not centrally but left but this happens only ion MS Mode not in Open Office mode. I made the experience that most errors appear in MS mode.

On the other hand style usage is much bette in EA 9. Where i had before hundered of styles in my word doc because very size change of normal style generated a new style this is gone so i have only the styles that i have defined in my word doc.

Hopes information helps somebody out there wis the same problem.

2
General Board / Menue option to keep headers in tables
« on: August 10, 2011, 02:00:04 am »
I have the problem that the table header should be repeated when table is larger than one page. This is an option in word and also in rtf documents if you wrote \trhdr in the definition of the table after the first row. It cannot be set with the table header style.
I did not find a menue point in EA to set this inside the template editor. I can set it manually in the rtf file with export and import. Then it works for generation. Any clue where to find the option ?
Regards Michael

3
General Board / Search order in EA
« on: August 10, 2011, 02:04:13 am »
I have creaated a long list of Abbreviations in EA as stereotyped class elements. EA sorts them by name but capital letters come before small letters what is not normal in Germany. Is there any possibility to change the sort order EA is using. Even when i use a SQL statement with the correct order for rtf generation it still sorts by name or by tree order and not in the order in the query

4
Is it possible to clone an element via automation interface completely like it is done in the gui via copy/paste element. Or is it possible to create an xmi file that just contains one element. I want just copy an element between two repositories.

5
I search for a way to automate profile generation. As i have several profiles to integrate in my technology i would like to use the "save as UML Profile" function via the automation interface. I only find the function to export the package as xmi.
Is there a secret repository command or something like that ?

6
I have created a tagged value to use the AddinBroadcast Function

Type=AddinBroadcast;
Values=SiemensEnvironment.EA_OnElementTagEdit;

Then i created an event function to listen to the event.

public void EA_OnElementTagEdit(EA.Repository Repository, long ObjectId, String TagName, ref String TagValue, ref String TagNotes)
{
     TagNotes = "Hallo";
}

When i klick on the ellipse nothing happens. Any idea what is wrong.

7
Automation Interface, Add-Ins and Tools / Insert images by API
« on: March 09, 2012, 10:07:20 pm »
Is there a way to upload images to the repository or project via automation interface ?

8
Hello

I try to add user defined compartments to my class. This is my code

        public String EA_QueryAvailableCompartments(EA.Repository Repository)
        {
            String sReturn;
            sReturn = "first";
            return sReturn;
        }

        public String EA_GetCompartmentData(EA.Repository Repository, String sCompartment, String sGUID, EA.ObjectType oType)
        {

            String sCompartmentData = "";
            String sData = "";
            EA.Element elem = Repository.GetElementByGuid(sGUID);

            sCompartmentData = sCompartmentData + "Name=" + sCompartment + ";";
            sCompartmentData = sCompartmentData + "OwnerGUID=" + sGUID + ";";
            sCompartmentData = sCompartmentData + "Options=SkipIfOnDiagram&_eq_^1&_sc_^";

            return sCompartmentData;
        }

It should do nothing except adding a new compartment to my class. I know how to add data but that is not the problem. When i debug my application it goes through the code for the object on my diagram. However the compartment is not visible. Is there any option i have to enable ?
Regards Michael

9
Hello

I have written an short extension to EA which exports ans extracts the RTF Templates from an EAP File and also pack and import it back to the database.

This works fine until the RTF Template contains images. To explain what i am doing i read the table t_documents for all with element type SSDOCSTYLE. Then i read the blob field binContent in the row and save the binary stream to a file. The file is a zip file. Then i extract the file inside the zip into a text file. The file is in UTF Format. In this file included is the rtf as an base64encoded string that i extract decode and save as rtf. The way back is the same but the problem occurs durcing decoding.

With rtf files without images these method and the export method of the editor have the same results. The files are identical. But with images inside the result differs and i have no idea why.

Does anyone has an idea how images are encoded maybe one of the admins here.

Regards Michael  

10
During RTF generation i use the flag Use style defined in templates for notes. The result is that i get a lot of variants of the normal word style. Sometimes with different space between lines always with the font included etc. Instead of having one normal style i have twenty of different ones. Same is when integrating linked documents.

Any idea where this comes from or how to get rid of it ?

11
Hello
I want to print tagged values in shape script. script look like the following

shape main
{
      rectangle(0,0,100,100);
 
      addsubshape("domaincompartment", 100, 33);
      addsubshape("orgcompartment", 100, 33);
      addsubshape("usercompartment",100,34);
      shape orgcompartment
       {
               h_align = "center";
                   v_align = "center";
                   moveto(0,0);
                   lineto(100,0);
               printwrapped("#TAG:SIARC::Organization#");
       }

       shape domaincompartment
       {
                   v_align = "center";
               h_align = "center";
               println("#TAG:SIARC::Domain#");
       }
       shape usercompartment
       {
                   v_align = "center";
               h_align = "center";
                   moveto(0,0);
                   lineto(100,0);
               println("#TAG:SIARC::Users#");          
       }
}

SIARC is a technology name. Everything works fine for Users and Domain. But Organisation is empty. The definition is

Type=RefGUID;
Values=Class;
Stereotypes=BMM_OrganizationUnit;

Is this a bug or is something wrong.

Michael

12
Maybe i did not understand the procedure but the problem i have is the following. I created an MDG Technology and selected some images to be transferred. The images have been imported as EMF metafiles. I copy the technology just under my EA folder under MDGTechologies and open a new EA File. I can find all my profiles, models, RTF Templates etc. but the images are not visible under reference data.

If i import the technology in addition the images are visible.

Do i misunderstand the procedere or is this a bug.

Thanks for answers in advance
Michael  

Pages: [1]