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 - Digo

Pages: [1]
Bugs and Issues / Update Styles in RTF template seems incomplete
« on: January 31, 2012, 12:38:59 am »

This is my situation: I started out with a template based on (model document: basic template).  After I adapted the structure to suit my needs, I started fidling with the normal.rtf to get the company style in.  Amongst other changes, I created a list item (edit > list and overrides > create list item), I created an override for it and applied it to my heading styles.

And now here's the problem:  when I do 'File > Update styles', most of my styles get in right.  E.g. the color of my Heading1 becomes the color I've set in my normal.rtf, but the bold style was not imported (which I could get right by selecting 'Heading 1' once again in the template) and I didn't get any numbering at all.

If I look at my lists, the list I created in my normal.rtf has been imported into my template.
If I look at my overrides, the override I created in my normal.rtf is not there.
If I look at my heading numbering style, it just takes some override from a list with a strange name (all numbers).

Now I have 3 templates: one for my master document and two different ones for my model documents.  When combining my templates in generating one document, my section numbering gets all wrong (it restarts from '1' for every other template).

Does anyone have an idea how I can get round this?




I've just spent half a day trying to dynamically create hyperlinks on a diagram.

I've succeeded to create a hyperlink to a package:

Code: [Select]
     var newel as EA.Element;
      newel = thePackage.Elements.AddNew("$package://{555834AE-3C56-4860-AEDA-16DF8592A50F}", "Text");
      newel.Subtype = 19; // This one is important for hyperlinks to packages!!
      newel.Notes = "NEW LINK";
      AddElementToDiagram(newel, theDiagram);

with the AddElementToDiagram function being this:

Code: [Select]
function AddElementToDiagram(theElement, theDiagram)
      var diagramObjects as EA.Collection;
      var obj as EA.DiagramObject;

      diagramObjects = theDiagram.DiagramObjects;
      obj = diagramObjects.AddNew( "l=200;r=400;t=200;b=400;", "" );
      obj.ElementID( theElement.ElementID );
      obj.Style = "BackColor=-1;BorderColor=-1;BorderWidth=-1;FontColor=-1;VSwimLanes=1;HSwimLanes=1;BorderStyle=0;" ;
      Session.Output("Added object " + theElement.Name)

I can't really explain the magic number 19 for subtype, but I've got it from the XMI export.

I did not however succeed to create a hyperlink to a diagram.  There's only a few differences from what I've done in the code above:

Code: [Select]
     newel = thePackage.Elements.AddNew("$diagram://{9F181280-8ECF-4bcd-9C28-4A3B138BC68C}", "Text");
      newel.Subtype = 0;      // This one is for hyperlinks diagram to diagrams.

I get something on my diagram, but it doesn't work.  If I compare the XMI export for my generated link and a manually added link, I see that seem to miss a tag called 'diagram' which holds the GUID of the diagram I'm referring to once more.  I can't find it back in the scripting object howerver (I've traced almost the entire object).

Code: [Select]
<UML:TaggedValue tag="diagram" value="EAID_9F181280_8ECF_4bcd_9C28_4A3B138BC68C"/>

Is there anyone who has ever succesfully added hyperlinks to diagrams and who can explain to me how I should do it?  Or someone who can tell me what I'm missing?

Thanks in advance and have a nice weekend,


Pages: [1]