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.


Messages - Michael Proske

Pages: 1 2 3 [4] 5
46
I think it could be interesting to play around with it i will next try to raise a dialog to edit my tagged value. I give you input about the results.

47
The answer from Sparx is
Hello Michael,

Thank you for your enquiry.

The "AddinBroadcast" tagged value type should only specify the name of
the add-in to be called - not the method.

E.g.

Type=AddinBroadcast;
Values=CS_AddinFramework;

Not:

Type=AddinBroadcast;
Values=CS_AddinFramework.EA_OnElementTagEdit;

Try removing the ".EA_OnElementTagEdit" part from your tagged value
definition.

Geert you are right with your tip. I did it and it works. qweryt what do you mean by it takes not back the parameter values ? I just put in

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

and it works correctly.
Is "geerting" a kind oy joke between you and Paolo  ;)

48
Yes i defined it correctly. The proposed ellipse button also appeared. But nothing happend. I will submit a bug (maybe i reach 100 bug reports befor summer ...)

Thanks for your support

49
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.

50
Automation Interface, Add-Ins and Tools / Re: Insert images by API
« on: March 12, 2012, 10:53:20 pm »
Thanks. I did not search for the other topic

51
Automation Interface, Add-Ins and Tools / Re: Insert images by API
« on: March 12, 2012, 02:55:03 am »
Can you post the insert statement and how to code the images in the database

52
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 ?

53
A code to save time thats reads a s specific technology file and gets the stereotypes

        public void open()
        {
            //  XmlTextReader m_handle = new XmlTextReader(m_technology);

            m_xmlDoc = new XmlDocument();
            m_xmlDoc.Load(m_technologyName);
            m_stereotypeList = new List<Stereotype>();
            XmlElement root = m_xmlDoc.DocumentElement;

            XmlNodeList profiles = m_xmlDoc.SelectNodes("//UMLProfiles/UMLProfile/Documentation");
            foreach (XmlNode profile in profiles)
            {
                XmlNodeList stereotypes = profile.SelectNodes("../Content/Stereotypes/Stereotype");
                //Select Stereotype attribute
                foreach (XmlNode stereotype in stereotypes)
                {
                    XmlNode apply = stereotype.SelectSingleNode("./AppliesTo/Apply");
                    if ((apply != null) && apply.Attributes.GetNamedItem("type").Value == "ToolboxPage") continue;
                    Stereotype st = new Stereotype();
                    st.Technology = profile.Attributes.GetNamedItem("name").Value;
                    st.Name = stereotype.Attributes.GetNamedItem("name").Value;
                    if (apply != null) st.Apply = apply.Attributes.GetNamedItem("type").Value;
                    try
                    {
                        st.Generalize = stereotype.Attributes.GetNamedItem("generalizes").Value;
                    }
                    catch { }
                    XmlNodeList taggedValues = stereotype.SelectNodes(".//TaggedValues/Tag");
                    foreach (XmlNode tag in taggedValues)
                    {
                        st.taggedValues.Add(tag.Attributes.GetNamedItem("name").Value);
                    }
                    m_stereotypeList.Add(st);
                }
            }
        }

    public class Stereotype
    {
        public String Technology;
        public ArrayList taggedValues;
        public String Name;
        public String Apply;
        public String Generalize;

        public Stereotype()
        {
            taggedValues = new ArrayList();
        }
    }

It reads stereotypes and also the tagged values associated to it

54
I think it is in an internal memory table filled at startup. Definetely it is not copied in the internal database i have checked all tables in an empty ea file.

55
Thank you. I manged to see something.

56
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

57
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  

58
Automation Interface, Add-Ins and Tools / Re: Ghost language profile
« on: October 04, 2011, 06:11:16 pm »
Have you checked the ressources view in the project. Maybe you have imported the profile before in the project file or database then it comes before the MDG file.

59
The easiest way is to deploy the image with the profile together as a technology. But then you have to reference the image as <Technology Name>::<Image Name> because otherwise it is not found.

60
Automation Interface, Add-Ins and Tools / Re: Alternate image in MDG
« on: April 22, 2010, 05:45:25 am »
What exactly to you mean with "alternate image" ? Do you mean the icon that will be shown in the MDG Technologies dialog ? This icon should be only a 16x16 bitmap maybe this is the problem.

Pages: 1 2 3 [4] 5