[Framers] Another Simple Structured App

cuc tu cuc2u at hotmail.com
Tue Mar 22 08:05:50 PDT 2022


Hi Framers,

Our engineering group is giving me an XML file to build a dictionary of programming commands. I'm still a novice at structured frame and have two basic question s about using the XML content.

All content is in attribute values. I'm sure I can make certain attributes visible, apply formatting, and add prefix/suffix. Can I automatically change the order of the content? They are presenting the definition before the command word. Can attribute values be pulled in from other elements?

Here is an example:

<Command
          ClassName="PresetSetupType"
          ClassLongName="Preset Setup Type"
          ClassDescription="Sets the system preset setup type. Outputs the system preset setup type."
          String=":SYSTem:PRESet:TYPE"
          Overlapping="false"
          Lockable="false"
          Type="Both">
        <CommandParameters>
          <Parameter Name="PresetSetupType" Type="Enum" Enum="PresetSetup" Description="System preset setup type to be set" />
        </CommandParameters>
        <QueryResultParameters>
          <Parameter Name="PresetSetupType" Type="Enum" Enum="PresetSetup" Description="System preset setup type to be read" />
        </QueryResultParameters>
        <Examples>
          <Example Name="SYST:PRES:TYPE DEF" Description="Sets the system preset setup type to Default." />
          <Example Name="SYST:PRES:TYPE?" Description="Outputs the system preset setup type." />
        </Examples>
      </Command>
...
<EnumList Name="PresetSetup">
      <Enum Name="Default" Value="DEF" LongValue="DEFAULT" />
      <Enum Name="Saved" Value="SAV" LongValue="SAVED" />
    </EnumList>


In all commands, I want to print the String value as a heading first, then follow with ClassDescription as a paragraph, but the order is reversed.
In the CommandParameters element, I want to print the values of the appropriate EnumList element attributes found in the appropriate element

So above would be something like:

:SYSTem:PRESet:TYPE
Description: Sets the system preset setup type. Outputs the system preset setup type.
Command Parameters: DEFAULT, SAVED
Query Result Parameters:  DEF, SAV
Examples: SYST:PRES:TYPE DEF
Sets the system preset setup type to Default.
SYST:PRES:TYPE?
Outputs the system preset setup type.


Thanks
C2



More information about the Framers mailing list