Book a Demo

Author Topic: Add "summary break" support for notes.  (Read 10813 times)

stevesavage

  • EA User
  • **
  • Posts: 119
  • Karma: +4/-0
    • View Profile
Add "summary break" support for notes.
« on: August 19, 2016, 11:57:41 pm »
I'm finding that I'm making more use of the "notes" for an element in my diagrams.  Either directly in the body of the element or as a linked Text Annotation/Note.
It would be useful to be able to add a "text break" in to my notes where everything before the break is shown in the diagram, and everything after is hidden.

At the moment I adjust the character length for notes showing in the body of the element (Feature and Compartment Visibility -> Element Notes -> maximum chars)
But don't have a work around for linked Annotation/Note.

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Add "summary break" support for notes.
« Reply #1 on: August 22, 2016, 09:38:55 am »
I'm finding that I'm making more use of the "notes" for an element in my diagrams.  Either directly in the body of the element or as a linked Text Annotation/Note.
It would be useful to be able to add a "text break" in to my notes where everything before the break is shown in the diagram, and everything after is hidden.

At the moment I adjust the character length for notes showing in the body of the element (Feature and Compartment Visibility -> Element Notes -> maximum chars)
But don't have a work around for linked Annotation/Note.
+10

We'd make extensive use of the same concept.  Our definitions are often broken into at least two parts:
  • A normative definition
  • A narrative explanation - elaborating on the normative
The latter can be quite discursive and we'd like to limit the normally visible amount to the normative only.

Paolo
« Last Edit: August 22, 2016, 09:40:36 am by Paolo F Cantoni »
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Add "summary break" support for notes.
« Reply #2 on: August 22, 2016, 11:46:16 am »
Can I suggest using the notes for your summary and linked documents for complete documentation?

This will automatically do what you are requesting, and have the further advantage of allowing tables, nested lists, etc.

With version 13 this becomes even better, as there is a docked window for the linked document.

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Add "summary break" support for notes.
« Reply #3 on: August 22, 2016, 05:14:53 pm »
Can I suggest using the notes for your summary and linked documents for complete documentation?

This will automatically do what you are requesting, and have the further advantage of allowing tables, nested lists, etc.

With version 13 this becomes even better, as there is a docked window for the linked document.
Splitting causes maintenance problems.  Also, at enterprise scale, there is significant blowout.  We could do similar with tagged values, but found it didn't suit the needs.

Again, it's bout reducing friction for the (especially casual) users.  We want to show them enough on the diagram to entice them to select the item and see the full detail.  The functionality is almost already available, in the tool tips...  All we are saying here is to use a predetermined marker to delimit the amount shown on the diagram.  As Steve says, we can do it programatically but it's a hassle.

Paolo
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

stevesavage

  • EA User
  • **
  • Posts: 119
  • Karma: +4/-0
    • View Profile
Re: Add "summary break" support for notes.
« Reply #4 on: August 23, 2016, 03:41:28 am »
Can I suggest using the notes for your summary and linked documents for complete documentation?

This will automatically do what you are requesting, and have the further advantage of allowing tables, nested lists, etc.

With version 13 this becomes even better, as there is a docked window for the linked document.

I'll look at trying that once we role out version 13... a bit of a training overhead with the interface redesign before we do that.  :-\

To give you an idea of the type of information I'm capturing, everything "before" the Schedule 5... is shown in the diagram, I'm using this to verify with clients that the fields listed for a report are all identified and captured in a data dictionary for the project.   The rest is there for reports and other walk through.

If they selected S5.4(a) subparagraph 34(1)(a)(i), a new Stack Test
S5.5(a)(i):
The Date the Stack Test was conducted
S5.5(a)(ii): [CR] Confirmation that the regulations were satisfied
S5.5(a)(iii): [FU] Fuel Used for the Test
S5.5(a)(iv): [MU] Method used to measure NOx Concentration
S5.5(a)(iv): [RA] Identifier of Alternate Rule if used.  The Replaced Rule(s) were identified as part of the application for the Alternative Rule, and therefore do not need to be provided again.
S5.5(a)(v): [EI] NOx Emission-Intensity

Schedule 5: Classification Report — Information Required
S5.5 The following information respecting a test on the boiler or heater referred to in paragraph 34(1)(a) of these Regulations conducted to determine its classification NOx emission intensity:
S5.5(a) for a stack test,
S5.5(a)(i) the date on which the stack test was conducted,
S5.5(a)(ii) confirmation that each test run of the stack test was conducted while the boiler or heater met the conditions set out in paragraphs 27(2)(a) to (e) of these Regulations,
S5.5(a)(iii) an indication as to whether the type of gaseous fossil fuel that was combusted during that stack test was natural gas or alternative gas,
S5.5(a)(iv) the method set out in subsection 28(1) of these Regulations that was used for the stack test to measure the concentration of NOx and, if an alternative rule as approved under subsection 113(1) of these Regulations to replace a rule set out in that method was used, an indication of that rule, as approved, and of rule it replaced, and
S5.5(a)(v) the classification NOx emission intensity of the boiler or heater, as determined by means of the stack test; and

stevesavage

  • EA User
  • **
  • Posts: 119
  • Karma: +4/-0
    • View Profile
Re: Add "summary break" support for notes.
« Reply #5 on: August 23, 2016, 04:46:22 am »
Quick and dirty script to show a "summary" for notes.  Only works for showing the notes in elements.  E.g. Feature and Compartment Visibility -> Element Notes. 
The script looks for 4 dashes in your notes, and sets the character limit to just before the dashes ----, will replace the ---- with null when I run my reports.

!INC Local Scripts.EAConstants-JScript
function OnDiagramScript()
{
   var local = {};
   local.currentDiagram = Repository.GetCurrentDiagram();
   if ( local.currentDiagram != null )
   {
      // Get a reference to any selected connector/objects
      local.selectedObjects = local.currentDiagram.SelectedObjects;
      if ( local.selectedObjects.Count > 0 )
      {
         for ( local.i = 0 ; local.i < local.selectedObjects.Count ; local.i++ )
         {
            local.EADiagramObject = local.selectedObjects.GetAt(local.i);
            local.EAElementID = local.EADiagramObject.ElementID
            local.EAElement = Repository.GetElementByID(local.EAElementID);
            local.sNotes = local.EAElement.Notes;
            local.iSummary = local.sNotes.indexOf('----');
            if(local.iSummary < 0) local.iSummary = local.sNotes.length;
            
            Session.Output(local.EAElement.Name);
            local.sStyle = local.EADiagramObject.Style;
            local.iStart = local.sStyle.indexOf('Notes=');
            if(local.iStart >= 0)
            {
               // remove the Notes character length parameter in the Style property.
               local.iEnd = local.sStyle.indexOf(';',local.iStart);
               local.sStyle = local.sStyle.substring(0,local.iStart-1) + local.sStyle.substring(local.iEnd);
            }
            local.iStart = local.sStyle.indexOf('Formatted=');
            if(local.iStart >= 0)
            {
               // remove the Formatted flag parameter in the Style property.
               local.iEnd = local.sStyle.indexOf(';',local.iStart);
               local.sStyle = local.sStyle.substring(0,local.iStart-1) + local.sStyle.substring(local.iEnd);
            }
            // append the Formatted flag to the Style property.
            local.sStyle = local.sStyle + 'Formatted=1;';
            // append the Notes character length parameter to the Style property.
            local.sStyle = local.sStyle + 'Notes=' + local.iSummary + ";";
            local.EADiagramObject.Style = local.sStyle;
            // Session.Output(local.sStyle);
            local.EADiagramObject.Update();
         }
         // One or more diagram objects are selected
      }
   }
   else
   {
      Session.Prompt( "This script requires a diagram to be visible.", promptOK)
   }
}

OnDiagramScript();
« Last Edit: August 23, 2016, 05:39:23 am by stevesavage »

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Add "summary break" support for notes.
« Reply #6 on: August 23, 2016, 08:38:11 am »
Splitting causes maintenance problems.  Also, at enterprise scale, there is significant blowout.  We could do similar with tagged values, but found it didn't suit the needs.

Again, it's bout reducing friction for the (especially casual) users.  We want to show them enough on the diagram to entice them to select the item and see the full detail.  The functionality is almost already available, in the tool tips...  All we are saying here is to use a predetermined marker to delimit the amount shown on the diagram.  As Steve says, we can do it programatically but it's a hassle.

Paolo
I expected you of all people to be all about splitting those fields. What you are asking for is in effect a way to split the single notes field into two fields with different behavior. Or put another way, to cram two different logical fields into one physical field. I don't think the training associated with doing that would be any more than the training to put in a magic marker to separate two fields.

Of course, it was just a suggestion.

Glassboy

  • EA Practitioner
  • ***
  • Posts: 1367
  • Karma: +112/-75
    • View Profile
Re: Add "summary break" support for notes.
« Reply #7 on: August 23, 2016, 09:14:10 am »
Of course, it was just a suggestion.

Just get on with it and build us a full CMS\Wiki under the EA bonnet :-)

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Add "summary break" support for notes.
« Reply #8 on: August 23, 2016, 09:43:35 am »
Splitting causes maintenance problems.  Also, at enterprise scale, there is significant blowout.  We could do similar with tagged values, but found it didn't suit the needs.

Again, it's bout reducing friction for the (especially casual) users.  We want to show them enough on the diagram to entice them to select the item and see the full detail.  The functionality is almost already available, in the tool tips...  All we are saying here is to use a predetermined marker to delimit the amount shown on the diagram.  As Steve says, we can do it programatically but it's a hassle.

Paolo
I expected you of all people to be all about splitting those fields. What you are asking for is in effect a way to split the single notes field into two fields with different behavior. Or put another way, to cram two different logical fields into one physical field. I don't think the training associated with doing that would be any more than the training to put in a magic marker to separate two fields.

Of course, it was just a suggestion.
In theory, theory and practice are identical, in practice.... :)

You're right, I wrestled with this a lot, but we decided we had one conceptual field, "Definition" with two sub-fields: Normative and Explanatory.

Since Steve's provided a script, we'll have a look at that...

Paolo
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Add "summary break" support for notes.
« Reply #9 on: August 23, 2016, 05:18:02 pm »
So I adapted Steve's script for our circumstances (Thanks, Steve!)

It works a treat except that it reinforces (at least to me) why it is best to be built-in.  (if you accept that it's really one concept (Definition), in two parts: Normative and Explanatory - in our case.  I'm sure Steve could provide his sub-setting for his circumstances.

You can set the character limit for the text as it is now.
But in an enterprise environment, there are MANY diagrams where you might want the normative notes only.  If the text changes (so that the length is different, you need to find every diagram and readjust it.

This got me thinking... (dangerous, I know).
What would be truly general is to provide the ability, in addition to setting a specific length, to allow the specification of a start and end marker to delimit what you want to show on a specific diagram.

[X] Show Notes     [X] Render as Formatted Notes
Maximum characters [ nnnnnn ]
Between [ <start> ] and [ <end> ]

If either the start or end markers is missing, it means from the start  (or to the end).

I think that would be pretty cool! (and Useful)

Thoughts?

Paolo
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!