-
Notifications
You must be signed in to change notification settings - Fork 28
/
Copy pathsnap_bom.ulp
758 lines (677 loc) · 20.2 KB
/
snap_bom.ulp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
#require 6.0200
//
// Revision: 1.06
//
// Revision history:
//
// 1.00
// - Initial release
//
// 1.01
// - Dialog mask for text or html output selection corrected
//
// 1.02
// - CSV export added after a suggestion of Christian Schlittler
// - File extension for text file output changed from .bom to .txt
//
// 1.03
// - Added missing description column in value mode.
//
// 1.04
// - List also Packages bei Value
//
// 1.05
// - 2012-03-01 change PartValue[], PartDevice[], PartPackage[], PartHeadline[], PartDescription[] to normal string. [email protected]
// numeric strings with only numericasl characters, sorts up to 8 characters!
//
// 1.06
// - 2012-05-25 support now populated variants
// switch on/off attributes
// is now the standard bom.ulp [email protected]
//
// 1.07
// - 2012-06-22 set correct variant
//
// 1.08
// - 2012-11-08 list different values of attributes
//
// 1.09 - M.Battistello
// - 2012-12-04 now can change the separator character for CSV files.
// change the character in line Separator = ',';
string Version = "1.10";
char Separator = ','; // 2012-12-04
#usage "en: <b>Export a Bill Of Material</b>\n"
"<p>"
"Generates a project's <i>Bill Of Material</i> in .csv format that is optimized for RMC's SNaP MRP (Material Resource Planning) Software"
"<p>"
"<author>A free trial of SNaP Materials Resource Planning Software can be downloaded from <a href=\"http://www.rmc-inst.com\">www.rmc-inst.com</a></author><br>"
"<p>"
"<author>Original ULP Author: [email protected]</author><br>"
"<author>Latest Update: RMC Engineered Solutions</author>",
"de: <b>Stückliste exportieren</b>\n"
"<p>"
"Erstellt eine optimierte<i>Stückliste</i> (Bill Of Material) im csv-Format, das fur RMC SNaP Materialplanung Software"
"<p>"
"Eine kostenlose Testversion von SNaP, Material Resource Planning Software, kann heruntergeladen werden <a href=\"http://www.rmc-inst.com\">www.rmc-inst.com</a>"
"<p>"
"<author>Original-ULP Autor: [email protected]</author><br>"
"<author>Letzte Aktualisierung: RMC Engineered Solutions</author>"
// THIS PROGRAM IS PROVIDED AS IS AND WITHOUT WARRANTY OF ANY KIND, EXPRESSED OR IMPLIED
string HelpTextEN =
"<b>How to generate the Bill Of Material</b>\n"
"<p>\n"
"<b>List type</b>\n"
"<p>\n"
"The <i>Bill Of Material</i> can be generated either as a list\n"
"of parts (where every part is listed on a line of its own),\n"
"or as a list of values, where all parts with the same value are grouped\n"
"together in one line. Use the <b><u>P</u>arts</b> and <b><u>V</u>alues</b>\n"
"radio buttons to select the list type.\n"
"<p>\n"
"<b>Output format</b>\n"
"<p>\n"
"Choose between pure ASCII <b><u>T</u>ext</b> format, <b><u>C</u>SV</b> or <b><u>H</u>TML</b>.\n"
;
string HelpTextDE =
"<b>Erzeugen der Stückliste</b>\n"
"<p>\n"
"<b>Listen-Typ</b>\n"
"<p>\n"
"Die <i>Stückliste</i> kann entweder als Liste der Bauteile generiert werden\n"
"(wobei jedes Bauteil in einer eigenen Zeile aufgeführt wird),\n"
"oder als Liste der Werte, wobei alle Bauteile mit dem gleichen Wert in einer Zeile\n"
"zusammengefasst werden. Mit den Radio-Buttons <b><u>B</u>auteile</b> und <b><u>W</u>erte</b>\n"
"kann zwischen den beiden Listen-Typen gewählt werden.\n"
"<p>\n"
"<b>Ausgabeformat</b>\n"
"<p>\n"
"Wählen Sie zwischen reinem ASCII-<b><u>T</u>ext</b>, <b><u>C</u>SV</b> oder <b><u>H</u>TML</b>"
"-Format.\n"
;
string I18N[] = {
"en\v"
"de\v"
,
"<hr><b>ERROR: No schematic!</b><p>\nThis program can only work in the schematic editor.\v"
"<hr><b>FEHLER: Kein Schaltplan!</b><p>\nDieses Programm kann nur in einem Schaltplan verwendet"
" werden.\v"
,
"Part\tValue-Part\tDevice\tPackage\tDescription\v" //MJB - part based export headers. also need to change in program as these are lookups
"Bauteil\tWert\tDevice\tPackage\tDescription\v"
,
"Qty\tPart Number\tDevice\tPackage\tRef. Desig.\v" // MJB - value based export headers.
"Menge\tWert\tDevice\tGehäuse\tBauteile\v" // Qty\tPart Number\tDevice\tPackage\tRef. Desig.\tDescription\t
, // Qty\tValue\tDevice\tPackage\tParts\tDescription\t
"Partlist exported from %s at %s\v"
"Stückliste exportiert aus %s am %s\v"
,
"Bill Of Material - Preview\v"
"Stückliste - Vorschau\v"
,
"-Close\v"
"-Schließen\v"
,
"Save Bill Of Material\v"
"Stückliste speichern\v"
,
"File '\v"
"Datei '\v"
,
"' exists\n\nOverwrite?\v"
"' existiert\n\nÜberschreiben?\v"
,
"+&Yes\v"
"+&Ja\v"
,
"-&No\v"
"-&Nein\v"
,
"&No\v"
"&Nein\v"
,
"Name already defined!\v"
"Name ist bereits definiert!\v"
,
" Header\v"
" Spaltenüberschrift\v"
,
"&Name:\v"
"&Name:\v"
,
"+OK\v"
"+OK\v"
,
"Name can't be empty!\v"
"Name kann nicht leer sein!\v"
,
"-Cancel\v"
"-Abbrechen\v"
,
"&Headers\v"
"&Spaltenüberschriften\v"
,
"Bill Of Material - Help\v"
"Stückliste - Hilfe\v"
,
"Bill Of Material\v"
"Stückliste\v"
,
"List type\v"
"Listen-Typ\v"
,
"&Parts\v"
"&Bauteile\v"
,
"&Values\v"
"&Werte\v"
,
"Output format\v"
"Ausgabeformat\v"
,
"&Text\v"
"&Text\v"
,
"&CSV\v"
"&CSV\v"
,
"&HTML\v"
"&HTML\v"
,
"+Vie&w\v"
"+&Vorschau\v"
,
"&Save...\v"
"&Speichern...\v"
,
"H&elp\v"
"H&ilfe\v"
,
"Current &variant \v"
"Aktuelle &Variante \v"
,
"List &attributes\v"
"&Attribute auflisten\v"
};
int Language = strstr (I18N [0], language ()) / 3;
string tr (string s)
{
string t = lookup (I18N, s, Language, '\v');
return t ? t : s;
}
if (!schematic)
{
dlgMessageBox (usage + tr ("<hr><b>ERROR: No schematic!</b><p>\nThis program can only work in"
" the schematic editor."));
exit (1);
}
string SeparatorString;
int NumParts;
numeric string Lines[];
numeric string PartName[];
string PartValue[], PartDevice[], PartPackage[], PartHeadline[];
numeric string PartDescription [];
int PartValueOn[];
int Selected;
string CurrentVariant = "";
string Variants[] = { "" }; // 2012-04-16
int cntVD = 0;
int VDsel = 0;
// cwi: Added arrays for an arbitraty number of attributes.
int UseAttributes = 0;
int FoundAttributes = 0; // # of different attribute names found in schematic.
numeric string AttributesList[]; // Sorted list of all attributes found in the schematic.
numeric string PartAttributes[]; // Adjusted list of attributes per part.
enum { ltParts, ltValues }; // List Types
enum { ofText, ofCSV, ofHTML }; // Output Formats
int ListType = 1; /* 0=Parts, 1=Values */
int OutputFormat = 1; /* 0=Text, 1=CSV, 2=HTML */
string StripWhiteSpace (string s)
{
while (s && isspace (s[0]))
s = strsub (s, 1);
while (s && isspace (s[strlen (s) - 1]))
s = strsub (s, 0, strlen (s) - 1);
return s;
}
// Collect part data from the schematic.
//
// Arguments: -
//
// Returns: NumParts - # of found parts
// ParteName[]
// PartValue[]
// PartDevice[]
// PartPackage[]
// PartHeadline[]
// PartDescription []
// PartValueOn[] - 0=part value off, 1= part value on, 2=override with attr. VAL
// FoundAttributes - # of different attribute names found in schematic.
// AttributesList[] - Sorted list of all attributes found in the schematic.
// PartAttributes[] - Adjusted list of attributes per part.
void CollectPartData (string var)
{
int Found = 0;
int i;
string attr[];
NumParts = 0;
// First, collect the names of all available attributes.
FoundAttributes = 0;
if (UseAttributes) {
schematic (SCH)
{
SCH.parts (P)
{
if (P.device.package)
{
if (P.populate)
{
P.attributes (A)
{
if (0 == FoundAttributes)
{
// First one
AttributesList[0] = A.name;
FoundAttributes = 1;
}
else
{
Found = 0;
for (i = 0; i < FoundAttributes; i ++)
{
if (A.name == AttributesList[i])
{
// Found an already listed atrribute
Found = 1;
break;
}
}
if (0 == Found)
{
// Attribute not listed, add at the end.
AttributesList[FoundAttributes] = A.name;
FoundAttributes ++;
}
}
}
}
}
}
}
sort (FoundAttributes, AttributesList);
}
// Second, collect all data
schematic (SCH)
{
SCH.parts (P)
{
if (P.device.package)
{
if (P.populate)
{
PartName[NumParts] = P.name;
PartValue[NumParts] = P.value;
PartDevice[NumParts] = P.device.name;
PartPackage[NumParts] = P.device.package.name;
PartHeadline[NumParts] = P.device.headline;
PartDescription [NumParts] = P.device.description;
PartValueOn[NumParts] = P.device.value == "On";
// Zero all strings
for (i = 0; i < FoundAttributes; i ++)
attr[i] = "";
P.attributes(A)
{
for (i = 0; i < FoundAttributes; i ++)
if (A.name == AttributesList[i])
{
attr[i] = A.value;
break;
}
if ("VALUE" == A.name && 0 < strlen (A.value))
// Override old fashioned value information!
PartValueOn[NumParts] = 2;
}
PartAttributes[NumParts] = strjoin(attr, Separator);
NumParts ++;
}
}
}
}
}
void GeneratePartList(void)
{
int NumLines = 0;
string attr[], s;
if (UseAttributes) s = strjoin(AttributesList, '\t');
Lines[NumLines ++] = tr ("Part\tValue\tDevice\tPackage\tDescription\t") + s;
for (int i = 0; i < NumParts; i ++)
{
strsplit (attr, PartAttributes[i], Separator);
if (UseAttributes) s = strjoin(attr, '\t');
Lines[NumLines] = PartName[i] + "\t" + PartValue[i] + "\t" + PartDevice[i] + "\t" +
PartPackage[i] + "\t" + PartHeadline[i] + "\t" + s;
NumLines ++;
}
Lines[NumLines] = "";
}
// Generate list with one entry per value.
// 'VALUE' is replaced by the value of attribute 'VAL', if existing.
void GenerateValueList_Original (void)
{
int NumLines = 0;
int Index [];
string attr[], s, s_val;
if (UseAttributes) s = strjoin(AttributesList, '\t');
// 2010-04-17 cwi: Included description.
Lines[NumLines ++] = tr ("Qty\tValue\tDevice\tPackage\tParts\tDescription\t") + s; // 2011-04-08
sort (NumParts, Index, PartValue, PartDevice, PartPackage, PartAttributes, PartName, PartHeadline); // 2011-11-08 Partattribute jetzt nach Package [email protected]
for (int n1 = 0, n2 = 0; ++ n2 <= NumParts; )
{
int i1 = Index [n1];
strsplit (attr, PartAttributes[i1], Separator);
if (UseAttributes) s = strjoin(attr, '\t');
s_val = attr[i1];
if (n2 < NumParts)
{
int i2 = Index [n2]; // 2012-11-08
strsplit (attr, PartAttributes[i2], Separator);
if (PartValue[i1] == PartValue[i2] && PartDevice[i1] == PartDevice[i2] && PartAttributes[i1] == PartAttributes[i2]) // 2012-11-08 check diffent values of attributes
continue;
}
string Quantity;
sprintf (Quantity, "%d", n2 - n1);
Lines[NumLines] = Quantity + "\t" + PartValue[i1] + "\t" + PartDevice[i1] + "\t" + PartPackage[i1] + "\t";
for (;;)
{
Lines[NumLines] += PartName[i1];
if (++n1 < n2)
{
i1 = Index [n1];
Lines[NumLines] += ", ";
}
else
break;
}
// cwi: add extra information from attributes
// 2010-04-17 cwi: Included description.
Lines[NumLines] += "\t" + PartHeadline[i1] + "\t" + s;
NumLines ++;
}
Lines[NumLines] = "";
}
//MJB - New version with columns moved for SNAP integration
void GenerateValueList (void)
{
int NumLines = 0;
int Index [];
string attr[], s, s_val;
if (UseAttributes) s = strjoin(AttributesList, '\t');
// 2010-04-17 cwi: Included description.
//Lines[NumLines ++] = tr ("Qty\tValue\tDevice\tPackage\tParts\tDescription\t") + s; // 2011-04-08
//sort (NumParts, Index, PartValue, PartDevice, PartPackage, PartAttributes, PartName, PartHeadline); // 2011-11-08 Partattribute jetzt nach Package [email protected]
//Value => Part Number and Parts => Reference Designator.
Lines[NumLines ++] = tr ("Qty\tPart Number\tDevice\tPackage\tRef. Desig.\tDescription\t") + s; // 2011-04-08
sort (NumParts, Index, PartValue, PartDevice, PartPackage, PartAttributes, PartName, PartHeadline); // 2011-11-08 Partattribute jetzt nach Package [email protected]
for (int n1 = 0, n2 = 0; ++ n2 <= NumParts; )
{
int i1 = Index [n1];
strsplit (attr, PartAttributes[i1], Separator);
if (UseAttributes) s = strjoin(attr, '\t');
s_val = attr[i1];
if (n2 < NumParts)
{
int i2 = Index [n2]; // 2012-11-08
strsplit (attr, PartAttributes[i2], Separator);
if (PartValue[i1] == PartValue[i2] && PartDevice[i1] == PartDevice[i2] && PartAttributes[i1] == PartAttributes[i2]) // 2012-11-08 check diffent values of attributes
continue;
}
string Quantity;
sprintf (Quantity, "%d", n2 - n1);
Lines[NumLines] = Quantity + "\t" + PartValue[i1] + "\t" + PartDevice[i1] + "\t" + PartPackage[i1] + "\t";
for (;;)
{
Lines[NumLines] += PartName[i1];
if (++n1 < n2)
{
i1 = Index [n1];
Lines[NumLines] += ", ";
}
else
break;
}
// cwi: add extra information from attributes
// 2010-04-17 cwi: Included description.
Lines[NumLines] += "\t" + PartHeadline[i1] + "\t" + s;
NumLines ++;
}
Lines[NumLines] = "";
}
void GenerateList (void)
{
switch (ListType)
{
case ltParts: GeneratePartList (); break;
case ltValues: GenerateValueList (); break;
}
}
string MakeListHeader (void)
{
string s;
schematic(SCH)
sprintf (s, tr ("Partlist exported from %s at %s"), SCH.name, t2string (time ()));
return s;
}
string MakeListText(void)
{
int l, Width [];
string List;
int numHeaders;
for (l = 0; Lines[l]; l ++)
{
string a [];
for (int n = strsplit (a, Lines[l], '\t'); n --; )
Width [n] = max (Width [n], strlen (a [n]));
}
List = MakeListHeader () + "\n\n";
for (l = 0; Lines[l]; l ++)
{
string line, a [];
int n = strsplit (a, Lines[l], '\t');
if (l == 0)
numHeaders = n;
else
n = numHeaders; // for the hidden key!
for (int i = 0; i < n; i ++)
{
string s;
sprintf (s, "%s%-*s", line ? " " : "", Width [i], a [i]);
line += s;
}
List += line + "\n";
}
return List;
}
// 2008-11-24 Christian Schlittler:
// Make comma-serparated list, with all values double-quoted.
string MakeListCSV (void)
{
string List;
int numHeaders;
for (int l = 0; Lines[l]; l ++)
{
string a [];
int n = strsplit (a, Lines[l], '\t');
if (l == 0)
numHeaders = n;
else
n = numHeaders; // for the hidden key!
for (int i = 0; i < n; i ++)
List += "\"" + a[i] + "\"" + SeparatorString;
List += "\n";
}
return List;
}
string MakeListHTML (void)
{
string List;
int numHeaders;
List = "<b>" + MakeListHeader() + "</b>\n<p>\n";
List += "<table>\n";
for (int l = 0; Lines[l]; l++)
{
List += "<tr>";
string a [];
int n = strsplit (a, Lines[l], '\t');
if (l == 0)
numHeaders = n;
else
n = numHeaders; // for the hidden key!
for (int i = 0; i < n; i ++)
{
if (l == 0)
a[i] = "<b>" + a[i] + "</b>";
List += "<td>" + a[i] + "</td>";
}
List += "</tr>\n";
}
List += "</table>\n";
return List;
}
string MakeList (void)
{
switch (OutputFormat)
{
case ofText: return MakeListText(); break;
case ofCSV: return MakeListCSV(); break;
case ofHTML: return MakeListHTML(); break;
}
return "";
}
void ViewList (void)
{
dlgDialog (tr ("Bill Of Material - Preview"))
{
string s = MakeList ();
if (OutputFormat == ofText || OutputFormat == ofCSV)
s = "<pre>" + s + "</pre>";
dlgHBoxLayout dlgSpacing (400);
dlgHBoxLayout
{
dlgVBoxLayout dlgSpacing (300);
dlgTextView (s);
}
dlgHBoxLayout
{
dlgStretch (1);
dlgPushButton (tr ("-Close")) dlgReject ();
}
};
}
void SaveList (void)
{
// 2008-11-24 cwi:
// - Added new format extension .csv
// - Changed from .bom to .txt for text format.
string FileName;
string FileExt;
switch (OutputFormat)
{
case ofText: FileExt = ".txt"; break;
case ofHTML: FileExt = ".html"; break;
case ofCSV: FileExt = ".csv"; break;
}
schematic(SCH) FileName = filesetext (SCH.name, FileExt);
FileName = dlgFileSave (tr ("Save Bill Of Material"), FileName);
if (FileName)
{
string a [];
//check if file exists and if it does then
if (!fileglob (a, FileName) ||
dlgMessageBox (tr ("File '") + FileName + tr ("' exists\n\nOverwrite?"), tr("+&Yes"), tr("-&No")) == 0)
{
output (FileName, "wt")
{
printf ("%s", MakeList ()); // using "%s" to avoid problems if list contains any '%'
}
}
}
}
void DisplayHelp (void)
{
dlgDialog (tr ("Bill Of Material - Help"))
{
dlgHBoxLayout dlgSpacing (400);
dlgHBoxLayout
{
dlgVBoxLayout dlgSpacing (300);
dlgTextView (language () == "de" ? HelpTextDE : HelpTextEN);
}
dlgHBoxLayout
{
dlgStretch (1);
dlgPushButton (tr ("-Close"))
dlgReject ();
}
};
}
schematic(SCH) {
sprintf(SeparatorString, "%c", Separator);
CurrentVariant = variant();
SCH.variantdefs(VD) {
if (CurrentVariant == VD.name) VDsel = cntVD;
sprintf(Variants[cntVD], "%s", VD.name);
cntVD++;
}
}
setvariant(CurrentVariant);
CollectPartData(CurrentVariant);
//GenerateList();
GenerateValueList();
dlgDialog (tr ("SNAP Bill of Materials Exporter"))
{
/*
dlgHBoxLayout {
dlgLabel(tr ("Current &variant "));
dlgComboBox(Variants, VDsel) {
CurrentVariant = Variants[VDsel];
setvariant(CurrentVariant);
CollectPartData(CurrentVariant);
GenerateList();
}
dlgStretch(1);
}
*/
dlgListView ("", Lines, Selected);
/*
dlgHBoxLayout
{
dlgGroup(tr ("List type"))
{
//dlgRadioButton(tr ("&Parts"), ListType) GeneratePartList ();
dlgRadioButton(tr ("&Values"), ListType) GenerateValueList ();
dlgCheckBox(tr ("List &attributes"), UseAttributes) {
if (!UseAttributes) {
NumParts = 0;
}
CollectPartData(CurrentVariant);
GenerateList();
}
}
dlgGroup (tr ("Output format"))
{
// 2008-10-09: Entries swapped for correct function.
//dlgRadioButton(tr ("&Text"), OutputFormat);
// 2008-11-24 cwi: New format added.
dlgRadioButton(tr ("&CSV"), OutputFormat); //sets output to be CSV
//dlgRadioButton(tr ("&HTML"), OutputFormat);
}
dlgStretch(1);
}
*/
dlgHBoxLayout {
//dlgPushButton (tr ("+Vie&w")) ViewList ();
dlgPushButton (tr ("&Save...")) SaveList (); //MJB - Initiates export of file
dlgPushButton (tr ("-Close")) dlgAccept ();
dlgStretch(1);
dlgLabel("Version " + Version);
}
};