Group Abstract Group Abstract

Message Boards Message Boards

0
|
39 Views
|
5 Replies
|
1 Total Like
View groups...
Share
Share this post:

Help to retrieve hidden cells/part of a notebook

I wonder if anyone can help to solve a - to me - rather mysterious matter. I wrote a notebook containing some calculations. At the beginning of the code, a drop-down menu is presented from which the user can select, by clicking, the input data that the notebook should use. The input data are stored in a GitHub repository, and the purpose of the drop-down menu is just to choose which GitHub input file should be read and downloaded for the subsequent calculations. I wrote the piece representing the drop-down menu with the help of the AI Assistant, because my knowledge was not sufficient to write it.

The notebook worked very well, and it still does. The problem is that now, by opening the notebook, I can only see the visual representation of the drop-down menu, see the attached screenshot. screenshot of the part of the Notebook

However, if I want to see its content, and hence I click on the marker on the right hand side of the margin, the code does not appear, only the expression "Null". This is already seen above the drop-down menu in the attached screenshot, which was taken after I clicked on the marker on the r.h.s. margin.

The true mystery (for me) is that the piece of code, which generates the drop-down menu, must be still there, because THE DROP-DOWN MENU STILL WORKS! My wondering is why I cannot see the hidden piece of code, and how I could make it visible again.

For the information of the kind people who are prepared to help me to solve this puzzle, here is the code (taken from an earlier version of the notebook where it is still visible):

ClearAll["Global`*"]\[IndentingNewLine]Manipulate[\[IndentingNewLine]  data=Import[\[IndentingNewLine]    StringJoin[\[IndentingNewLine]      "https://raw.githubusercontent.com/imre-chalmers-se/IET_book/refs/heads/main/data/active/",\[IndentingNewLine]      fileName,\[IndentingNewLine]      ".json"\[IndentingNewLine]    ],\[IndentingNewLine]    "RawJSON"\[IndentingNewLine]  ];\[IndentingNewLine]  \[IndentingNewLine]  (* Display the imported data or a message *)\[IndentingNewLine]  Column[{\[IndentingNewLine]    "Selected file: " <> fileName <> ".json",\[IndentingNewLine]    "Data preview: ",\[IndentingNewLine]    Short[data]\[IndentingNewLine]  }],\[IndentingNewLine]  \[IndentingNewLine]  {{fileName,"SFR"},{"SFR","Allegro","MSDR","PWRSMR","LWRSMR","MSFR","LFRSMR","FHR"},ControlType->PopupMenu}] 

The notebook itself, from which the above screenshot was taken, is attached to this note. It was also uploaded to the Wolfram Repository, and can be downloaded from the Notebook Archive:

https://notebookarchive.org/2025-05-7dypmeq

The drop-down menu is seen in Section 1: "Select the reactor for the calculations and read the corresponding data file". Clickiing on the cell margin will show the text "Null" instead of the above snippet.

I am very grateful if someone can help solve this mystery. The significance of the matter is that the Notebook in the Archive was used to do the calculations and the plots in the newly published book "Surveillance and Diagnostics of Next Generation Nuclear Reactors", and it is referred to in the book. The readers are encouraged to run the Notebook, reproduce the figures in the book, do calculations with modified input data, or even upload new data to the GitHub repository. The way the data is collected, and the address of the GitHub repository, are in the now invisible snippet; this is why it is important to me to make the content visible. I am grateful for any possible help.

Attachments:
POSTED BY: Imre Pazsit
5 Replies

If I edit the code back into the input cell in place of Null, hide the code, save the notebook, quit Mathematica, reopen the notebook, unhide the code; then code is there and everything seems to be as you wish.

I don't know how the original code was overwritten by Null in the notebook you posted, but the code is no longer in the notebook. It does not happen under normal circumstances, in my experience.

POSTED BY: Michael Rogers

Thank you very much for devoting more attention to this. I apologise for being difficult, but this is still not what I want. It is not the results of an operation/command which I am looking for, rather for the piece of code which creates the drop-down menu and the reading commands.

I can illustrate it by using an earlier version of the Notebook, where I can still make the content of the cell visible. In that older version, when I open the notebook, still the same drop-down menu is visible as in the recent code (that you also run), but the code generating it is hidden: The drop-down menu without the code

Now to make the code visible, I click on the vertical line second from the left at the right margin (the one which has a semi-arrow on the top), to make the rest of the cell visible, and then it looks like this: The full content of the cell

This is what I cannot achieve with the current Notebook, i.e. to make the piiece of code visitble above the drop-down menu. The vertical lines on the right hand side margin look different (see the included figure in my original post, i.e. on the top of this conversation). And if I click on the right hand side line (which is marked blue in the figure), then, instead of the piece of code shown in the last figure above, only the text "Null" appears (again, this is also shown in the first figure).

But the piece of code is still in my Notebook, since the drop-down menu still works, but I cannot make it visible. I want this piece of code to be possible to make visible, because this is from where the users can find out the data of the GitHub repository, if they want to upload further data (as I ask them in the book, which refers to the Notebook in the Repository.

I would appreciate very much if you could help me to make the code "snippet" visible.

POSTED BY: Imre Pazsit
Posted 23 hours ago

I get this below if I first evaluate the cell in the Preamble section

enter image description here

POSTED BY: Hans Milton

Thank you for looking at this. The post you show confirms that the cell works, because your notebook successfully read the data corresponding to the SFR (Sodium Fast Reactor) core.

My problem is that I cannot make the content of the cell visible, which performs the reading through the choice in the drop-down menu.

POSTED BY: Imre Pazsit
Posted 16 hours ago

Ok, I think I understand now. You want the drop-down menu to actually return the downloaded data, and not just return Null and then propagate the data as a “side effect”. Check this:

POSTED BY: Hans Milton
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard