Message Boards Message Boards

0
|
690 Views
|
1 Reply
|
0 Total Likes
View groups...
Share
Share this post:

Opening & displaying the contents of a notebook within a notebook

Posted 1 day ago

Hi;

In the code sample below, I am trying to open and display the contents of a notebook named "StereographicProjection" from within an open notebook with both notebooks being in the same directory. My thinking is that with the exact same code in an existing notebook, I should be able to access that information without needing to duplicate or copy it into another notebook.

In[1]:= NotebookOpen["StereographicProjection"]

Out[1]= $Failed

Thanks,

Mitch Sandlin

POSTED BY: Mitchell Sandlin
Posted 1 day ago

The working directory may not be the same directory as the notebook directory for the notebook in which you're running the code. Use Directory[] to find out where your working directory is. Also, if SterographicProjection is a notebook, then it likely has the .nb extension, and NotebookOpen expects a full filename, including the extension. You could change your working directory, but personally I find it simpler to just create the file path:

NotebookOpen[FileNameJoin[{NotebookDirectory[], "StereographicProjection.nb"}]]
POSTED BY: Eric Rimbey
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract