diff --git a/APSToolkitPython/Tutorials/08. Explore URL ACC Extract.ipynb b/APSToolkitPython/Tutorials/08. Explore URL ACC Extract.ipynb index ef6146b..4791fbf 100644 --- a/APSToolkitPython/Tutorials/08. Explore URL ACC Extract.ipynb +++ b/APSToolkitPython/Tutorials/08. Explore URL ACC Extract.ipynb @@ -16,7 +16,7 @@ }, { "cell_type": "code", - "execution_count": 3, + "execution_count": 1, "metadata": {}, "outputs": [], "source": [ @@ -26,7 +26,7 @@ }, { "cell_type": "code", - "execution_count": 4, + "execution_count": 2, "metadata": {}, "outputs": [ { @@ -83,7 +83,7 @@ }, { "cell_type": "code", - "execution_count": 11, + "execution_count": 3, "metadata": {}, "outputs": [ { @@ -104,6 +104,118 @@ "urn = urn.replace(\"/\", \"_\")\n", "print(f\"Derivative URN Of Version {version}: {urn}\")" ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "This URN not it correct urn we need : https://stackoverflow.com/questions/78118458/convert-urn-from-item-version-have-problem/78120646#78120646" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## This is next step to get derivative URN\n" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": {}, + "outputs": [], + "source": [ + "from aps_toolkit import BIM360\n", + "from aps_toolkit import Auth" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": {}, + "outputs": [], + "source": [ + "token = Auth().auth2leg()\n", + "bim360 = BIM360(token)" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
item_idversionderivative_urnlast_modified_time
0urn%3Aadsk.wipprod%3Adm.lineage%3AoxAqhUL0SISd...2dXJuOmFkc2sud2lwcHJvZDpmcy5maWxlOnZmLm94QXFoVU...2024-03-06T13:59:04.0000000Z
\n", + "
" + ], + "text/plain": [ + " item_id ... last_modified_time\n", + "0 urn%3Aadsk.wipprod%3Adm.lineage%3AoxAqhUL0SISd... ... 2024-03-06T13:59:04.0000000Z\n", + "\n", + "[1 rows x 4 columns]" + ] + }, + "execution_count": 9, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "df = bim360.batch_report_item_versions(info['ProjectId'], info['entityId'])\n", + "df" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "dXJuOmFkc2sud2lwcHJvZDpmcy5maWxlOnZmLm94QXFoVUwwU0lTZGtQY05MemVoYWc_dmVyc2lvbj0y\n" + ] + } + ], + "source": [ + "print(df.iloc[0]['derivative_urn'])" + ] } ], "metadata": { @@ -122,7 +234,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.11.5" + "version": "3.11.1" } }, "nbformat": 4,