<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How to import external notebook into Pro? in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/how-to-import-external-notebook-into-pro/m-p/1574014#M91766</link>
    <description>&lt;P&gt;To refer to an existing notebook with a static location, browse to the notebook file in the Catalog and Right Click → Add To Project.&lt;/P&gt;&lt;P&gt;But I assume that's not what you're looking for and you want the users to retain a copy of a "master" file in their own projects. In that case:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;def import_notebook(project_path: str = "CURRENT"):
    from os import path
    import shutil
    SOURCE_BOOK = r"\\the\path\to\the\notebook.ipynb"

    prj = arcpy.mp.ArcGISProject(project_path)
    new_book = path.join(prj.homeFolder, path.basename(SOURCE_BOOK))
    shutil.copy(SOURCE_BOOK, new_book)
    return new_book&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And that's as far as Python can take you (unless I'm missing some obscure CIM method). The Pro SDK has an Add Item method but making an addon just to clone a book properly seems a bit much, you might be better off instructing the user to add the book themselves.&lt;/P&gt;</description>
    <pubDate>Thu, 09 Jan 2025 17:06:06 GMT</pubDate>
    <dc:creator>DavidSolari</dc:creator>
    <dc:date>2025-01-09T17:06:06Z</dc:date>
    <item>
      <title>How to import external notebook into Pro?</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/how-to-import-external-notebook-into-pro/m-p/1573978#M91758</link>
      <description>&lt;P&gt;How can I import an notebook that is not part of a project already?&lt;/P&gt;&lt;P&gt;I have a standalone notebook on a drive and the idea is allow other people to import this into their Pro projects. How can I do this?&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've only found&amp;nbsp;&lt;A href="https://pro.arcgis.com/en/pro-app/3.3/arcpy/get-started/pro-notebooks.htm#ESRI_SECTION1_DDBD5F6E669B4963BC0CCEC5BB0A93AC" target="_self"&gt;this&lt;/A&gt;&amp;nbsp;which does not answer my question.&lt;/P&gt;&lt;P&gt;Maybe the notebook can added to the computer and then accessed through the catalog pane?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 09 Jan 2025 16:50:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/how-to-import-external-notebook-into-pro/m-p/1573978#M91758</guid>
      <dc:creator>chris_del101</dc:creator>
      <dc:date>2025-01-09T16:50:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to import external notebook into Pro?</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/how-to-import-external-notebook-into-pro/m-p/1573997#M91761</link>
      <description>&lt;P&gt;I don't really use notebooks, so what I'm about to suggest may be erroneous? How about copying that external notebook file into the project folder then follow the instructions you link to, to add it to the project?&lt;/P&gt;</description>
      <pubDate>Thu, 09 Jan 2025 16:52:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/how-to-import-external-notebook-into-pro/m-p/1573997#M91761</guid>
      <dc:creator>DuncanHornby</dc:creator>
      <dc:date>2025-01-09T16:52:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to import external notebook into Pro?</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/how-to-import-external-notebook-into-pro/m-p/1574014#M91766</link>
      <description>&lt;P&gt;To refer to an existing notebook with a static location, browse to the notebook file in the Catalog and Right Click → Add To Project.&lt;/P&gt;&lt;P&gt;But I assume that's not what you're looking for and you want the users to retain a copy of a "master" file in their own projects. In that case:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;def import_notebook(project_path: str = "CURRENT"):
    from os import path
    import shutil
    SOURCE_BOOK = r"\\the\path\to\the\notebook.ipynb"

    prj = arcpy.mp.ArcGISProject(project_path)
    new_book = path.join(prj.homeFolder, path.basename(SOURCE_BOOK))
    shutil.copy(SOURCE_BOOK, new_book)
    return new_book&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And that's as far as Python can take you (unless I'm missing some obscure CIM method). The Pro SDK has an Add Item method but making an addon just to clone a book properly seems a bit much, you might be better off instructing the user to add the book themselves.&lt;/P&gt;</description>
      <pubDate>Thu, 09 Jan 2025 17:06:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/how-to-import-external-notebook-into-pro/m-p/1574014#M91766</guid>
      <dc:creator>DavidSolari</dc:creator>
      <dc:date>2025-01-09T17:06:06Z</dc:date>
    </item>
    <item>
      <title>Re: How to import external notebook into Pro?</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/how-to-import-external-notebook-into-pro/m-p/1574152#M91788</link>
      <description>&lt;P&gt;I think both of these are correct. I was just talking about using the Pro GUI and not doing it programmatically. The steps are essentially these I think:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;add the notebook to the computer so that Pro can access it.&lt;/LI&gt;&lt;LI&gt;in Pro (maybe from Catalog pane using Computer tab) right click 'add to project'.&lt;/LI&gt;&lt;LI&gt;Now it should appear under Notebooks&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;I wasn't sure you could access the file system like this in Pro so this is now solved. Thanks!&lt;/P&gt;</description>
      <pubDate>Thu, 09 Jan 2025 20:35:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/how-to-import-external-notebook-into-pro/m-p/1574152#M91788</guid>
      <dc:creator>chris_del101</dc:creator>
      <dc:date>2025-01-09T20:35:04Z</dc:date>
    </item>
  </channel>
</rss>

