Hi folks,
As all too often with these things, going through the steps to accurately
and succinctly describe the problem to someone else helps you figure it out
yourself. Hopefully this is of use to somebody else.
If the sample name is a single column and nothing else (e.g. [COL_A]), then
the additional brackets are not added. If this is all you ever use spreadsheets
for, then you can stop right there and not worry about it.
If your sample name starts with a [COL_*] and ends with some plain text, then
it breaks the import procedure and you will have to restart IconNMR. The code
change here fixes this problem.
The files I thought were important (AutoSet_SpreadSheet.tcl, AutoSet_SpreadSheet_ui.tcl)
turned out to not have the processing logic in them. They are mostly just for
setting up the dialog box, although the clue for the next step was looking at
the callback for the load button, and then doing a plain text search of the tcl
folder to follow it around.
The code you need to change is actually in
<TSHOME>\prog\tcl\libtix\iconnmr\inmrlib\Automation\lib\Auto_UserCustomizableCode.tcl,
and while there are substantial differences between 3.6.0, 3.8.0 and 4.5.0, the
key lines to change are the same. You just need to remove the "\{" and "/}" from
the following two lines.
Before:
set regsubconv [regsub -all {\[} $combostring_unparsed {\{\[} newstr]
incr regsubconv [regsub -all {\]} $newstr {\]\}} combostring_parsed]
After:
set regsubconv [regsub -all {\[} $combostring_unparsed {\[} newstr]
incr regsubconv [regsub -all {\]} $newstr {\]} combostring_parsed]
In principle you should be able to just comment these lines out by preceding
with "#" since as far as I can tell these lines now do nothing to the imported
text from the spreadsheet. However this breaks everything, I think because
of some side-effects to do with regsubconv that I don't understand tcl well
enough to figure out.
Obviously as and when you update TopSpin to a newer version you'll have to
make this change manually, but this is considerably less work than
hand-editing hundreds of brackets.
Thanks
Geoff
> From: main_at_ammrl.groups.io On Behalf Of Akien, Geoffrey via groups.io
> Sent: 21 November 2025 13:53
> To: main <main_at_ammrl.groups.io>
> Subject: [External] [AMMRL] Removal of curly braces from IconNMR spreadsheet import?
Hi folks,
We're encountering a nuisance issue to do with emailing users data from IconNMR,
and was hoping someone might have a better solution. My enquiries to Bruker
have not gone anywhere.
We're using a spreadsheet for undergraduate teaching use that gets the users
to input their names and email addresses so the right person gets the right
data without having to mess about with accessing our fileserver.
For whatever reason, a configuration change on our university SMTP server has
meant that any emails with attachments containing curly braces ("{" and "}")
or square brackets ("["] and "]") are being silently rejected, and our local
IT can't figure out what's going on to the point they've given up.
This collides with a behaviour change in IconNMR between TopSpin <=3.5pl7
and >=3.6.0, where if you import from a spreadsheet using the e.g. [COL_A]
functionality, IconNMR will put curly braces around every field you generate
from the spreadsheet. Taking the trivial example of importing a spreadsheet
with "Sample_[COL_A]", and the cell being "42" you'd get:
<=3.5pl7: "Sample_42"
>=3.6.0: "Sample_{42}"
If you have "Mail PDF" or "Mail ZIP" flags on that user account, then the
attached files end up with the same name, and so have curly braces in their
names, and then the email doesn't go out.
The current "fix" for this is to hand edit the imported dataset names to remove
the curly braces, but obviously this is extremely tedious and if you have three
fields and a full 60-slot autosampler rack you end up having to manually remove
180 curly braces. Still better than hand-typing 60 email addresses without
error, but still very annoying for the demonstrators nonetheless.
I'm currently supporting instruments on 3.8.0 and 4.5.0, and I naively assumed
it would be easy to modify the offending code, but the TCL codebase is impenetrable
to me. It doesn't help that curly braces are a standard syntax element so
tracking down where these braces get brought in is not easy. I thought I'd
located the key bits in
<TSHOME>\prog\tcl\libtix\iconnmr\inmrlib\Automation\lib\AutoSet_SpreadSheet.tcl,
but diff'ing 3.6.0 and 3.5pl7 appears to only show some refactoring of
variable names and nothing else.
Has anyone else had a go at wrestling with the IconNMR codebase? Should I be
looking for a different function for the key machinery? Any suggestions welcome!
Thanks
Geoff
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#3048): https://urldefense.com/v3/__https://ammrl.groups=
.io/g/main/message/3048__;!!PvDODwlR4mBZyAb0!SGbnffjGpq1FjWQs3jqPpg5Myaf6vw=
6fZyk11HtyNqrwMW-Pfk6yuuEAfJcEdyKEJ_Qdk4_It1xSqQB5YW8u4Q2xA4Bg$
Mute This Topic: https://urldefense.com/v3/__https://groups.io/mt/116409079=
/7559972__;!!PvDODwlR4mBZyAb0!SGbnffjGpq1FjWQs3jqPpg5Myaf6vw6fZyk11HtyNqrwM=
W-Pfk6yuuEAfJcEdyKEJ_Qdk4_It1xSqQB5YW8u4aIDnbkk$
Group Owner: main+owner_at_ammrl.groups.io
-=-=-=-=-=-=-=-=-=-=-=-
Received on Fri Dec 12 2025 - 08:22:04 MST