From 698685eb5e92f61776cf42307a2b985d6beccf87 Mon Sep 17 00:00:00 2001 From: chuongmep <31106432+chuongmep@users.noreply.github.com> Date: Sun, 3 Mar 2024 11:23:03 +0800 Subject: [PATCH] update docs --- .../Tutorials/Authentication.ipynb | 44 +- APSToolkitPython/Tutorials/BIM360.ipynb | 281 +++- APSToolkitPython/Tutorials/Database.ipynb | 1240 ++++++++++++----- 3 files changed, 1162 insertions(+), 403 deletions(-) diff --git a/APSToolkitPython/Tutorials/Authentication.ipynb b/APSToolkitPython/Tutorials/Authentication.ipynb index e4778b6..c09ffd2 100644 --- a/APSToolkitPython/Tutorials/Authentication.ipynb +++ b/APSToolkitPython/Tutorials/Authentication.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "code", - "execution_count": 2, + "execution_count": 1, "metadata": { "ExecuteTime": { "end_time": "2024-03-02T14:09:01.550281Z", @@ -14,36 +14,20 @@ "name": "stdout", "output_type": "stream", "text": [ - "Requirement already satisfied: aps-toolkit in c:\\python311\\lib\\site-packages (0.0.5)\n", - "Collecting aps-toolkit\n", - " Downloading aps_toolkit-0.0.6-py3-none-any.whl.metadata (1.2 kB)\n", + "Requirement already satisfied: aps-toolkit in c:\\python311\\lib\\site-packages (0.0.8)\n", "Requirement already satisfied: requests in c:\\python311\\lib\\site-packages (from aps-toolkit) (2.31.0)\n", "Requirement already satisfied: pandas in c:\\python311\\lib\\site-packages (from aps-toolkit) (2.2.1)\n", "Requirement already satisfied: numpy<2,>=1.23.2 in c:\\python311\\lib\\site-packages (from pandas->aps-toolkit) (1.26.0)\n", "Requirement already satisfied: python-dateutil>=2.8.2 in c:\\python311\\lib\\site-packages (from pandas->aps-toolkit) (2.8.2)\n", - "Requirement already satisfied: pytz>=2020.1 in c:\\python311\\lib\\site-packages (from pandas->aps-toolkit) (2023.3.post1)\n", - "Requirement already satisfied: tzdata>=2022.7 in c:\\python311\\lib\\site-packages (from pandas->aps-toolkit) (2023.3)\n", + "Requirement already satisfied: pytz>=2020.1 in c:\\python311\\lib\\site-packages (from pandas->aps-toolkit) (2024.1)\n", + "Requirement already satisfied: tzdata>=2022.7 in c:\\python311\\lib\\site-packages (from pandas->aps-toolkit) (2024.1)\n", "Requirement already satisfied: charset-normalizer<4,>=2 in c:\\python311\\lib\\site-packages (from requests->aps-toolkit) (3.2.0)\n", "Requirement already satisfied: idna<4,>=2.5 in c:\\python311\\lib\\site-packages (from requests->aps-toolkit) (3.4)\n", - "Requirement already satisfied: urllib3<3,>=1.21.1 in c:\\users\\chuongho\\appdata\\roaming\\python\\python311\\site-packages (from requests->aps-toolkit) (1.26.17)\n", + "Requirement already satisfied: urllib3<3,>=1.21.1 in c:\\python311\\lib\\site-packages (from requests->aps-toolkit) (2.0.4)\n", "Requirement already satisfied: certifi>=2017.4.17 in c:\\python311\\lib\\site-packages (from requests->aps-toolkit) (2023.7.22)\n", "Requirement already satisfied: six>=1.5 in c:\\python311\\lib\\site-packages (from python-dateutil>=2.8.2->pandas->aps-toolkit) (1.16.0)\n", - "Downloading aps_toolkit-0.0.6-py3-none-any.whl (15 kB)\n", - "Installing collected packages: aps-toolkit\n", - " Attempting uninstall: aps-toolkit\n", - " Found existing installation: aps-toolkit 0.0.5\n", - " Uninstalling aps-toolkit-0.0.5:\n", - " Successfully uninstalled aps-toolkit-0.0.5\n", - "Successfully installed aps-toolkit-0.0.6\n", "Note: you may need to restart the kernel to use updated packages.\n" ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "DEPRECATION: Loading egg at c:\\python311\\lib\\site-packages\\autodesk_forge_sdk-0.1.2-py3.11.egg is deprecated. pip 24.3 will enforce this behaviour change. A possible replacement is to use pip for package installation.. Discussion can be found at https://github.com/pypa/pip/issues/12330\n" - ] } ], "source": [ @@ -52,7 +36,7 @@ }, { "cell_type": "code", - "execution_count": 4, + "execution_count": 1, "metadata": { "ExecuteTime": { "end_time": "2024-03-02T14:09:17.520761Z", @@ -66,7 +50,7 @@ }, { "cell_type": "code", - "execution_count": 5, + "execution_count": 2, "metadata": { "ExecuteTime": { "end_time": "2024-03-02T14:09:22.321085Z", @@ -80,7 +64,7 @@ }, { "cell_type": "code", - "execution_count": 6, + "execution_count": 3, "metadata": { "ExecuteTime": { "end_time": "2024-03-02T14:09:23.767210Z", @@ -94,7 +78,7 @@ }, { "cell_type": "code", - "execution_count": 6, + "execution_count": 4, "metadata": {}, "outputs": [ { @@ -103,7 +87,7 @@ "3599" ] }, - "execution_count": 6, + "execution_count": 4, "metadata": {}, "output_type": "execute_result" } @@ -114,7 +98,7 @@ }, { "cell_type": "code", - "execution_count": 7, + "execution_count": 5, "metadata": { "ExecuteTime": { "end_time": "2024-03-02T14:09:26.566629Z", @@ -124,9 +108,11 @@ "outputs": [ { "data": { - "text/plain": "'Bearer'" + "text/plain": [ + "'Bearer'" + ] }, - "execution_count": 7, + "execution_count": 5, "metadata": {}, "output_type": "execute_result" } diff --git a/APSToolkitPython/Tutorials/BIM360.ipynb b/APSToolkitPython/Tutorials/BIM360.ipynb index 1bd2b38..505b666 100644 --- a/APSToolkitPython/Tutorials/BIM360.ipynb +++ b/APSToolkitPython/Tutorials/BIM360.ipynb @@ -43,7 +43,7 @@ }, { "cell_type": "code", - "execution_count": 4, + "execution_count": 1, "metadata": { "ExecuteTime": { "end_time": "2024-03-02T14:10:23.422282Z", @@ -57,7 +57,7 @@ }, { "cell_type": "code", - "execution_count": 5, + "execution_count": 2, "metadata": { "ExecuteTime": { "end_time": "2024-03-02T14:10:24.797540Z", @@ -71,7 +71,7 @@ }, { "cell_type": "code", - "execution_count": 6, + "execution_count": 3, "metadata": { "ExecuteTime": { "end_time": "2024-03-02T14:10:24.802374Z", @@ -85,7 +85,7 @@ }, { "cell_type": "code", - "execution_count": 7, + "execution_count": 4, "metadata": { "ExecuteTime": { "end_time": "2024-03-02T14:10:24.811505Z", @@ -95,9 +95,11 @@ "outputs": [ { "data": { - "text/plain": "3599" + "text/plain": [ + "3599" + ] }, - "execution_count": 7, + "execution_count": 4, "metadata": {}, "output_type": "execute_result" } @@ -108,7 +110,7 @@ }, { "cell_type": "code", - "execution_count": 8, + "execution_count": 5, "metadata": { "ExecuteTime": { "end_time": "2024-03-02T14:10:24.816616Z", @@ -118,9 +120,11 @@ "outputs": [ { "data": { - "text/plain": "'Bearer'" + "text/plain": [ + "'Bearer'" + ] }, - "execution_count": 8, + "execution_count": 5, "metadata": {}, "output_type": "execute_result" } @@ -131,7 +135,7 @@ }, { "cell_type": "code", - "execution_count": 9, + "execution_count": 7, "metadata": { "ExecuteTime": { "end_time": "2024-03-02T14:10:24.828033Z", @@ -140,13 +144,13 @@ }, "outputs": [], "source": [ - "from aps_toolkit_python import BIM360\n", + "from aps_toolkit import BIM360\n", "bim360 = BIM360(token)\n" ] }, { "cell_type": "code", - "execution_count": 10, + "execution_count": 8, "metadata": { "ExecuteTime": { "end_time": "2024-03-02T14:10:25.834984Z", @@ -156,9 +160,11 @@ "outputs": [ { "data": { - "text/plain": "'b.1715cf2b-cc12-46fd-9279-11bbc47e72f6'" + "text/plain": [ + "'b.1715cf2b-cc12-46fd-9279-11bbc47e72f6'" + ] }, - "execution_count": 10, + "execution_count": 8, "metadata": {}, "output_type": "execute_result" } @@ -171,7 +177,7 @@ }, { "cell_type": "code", - "execution_count": 11, + "execution_count": 9, "metadata": { "ExecuteTime": { "end_time": "2024-03-02T14:10:27.016468Z", @@ -181,9 +187,11 @@ "outputs": [ { "data": { - "text/plain": "'b.b0be7aa3-70b9-4bd1-96a2-41029ae438ce'" + "text/plain": [ + "'b.b0be7aa3-70b9-4bd1-96a2-41029ae438ce'" + ] }, - "execution_count": 11, + "execution_count": 9, "metadata": {}, "output_type": "execute_result" } @@ -196,7 +204,7 @@ }, { "cell_type": "code", - "execution_count": 12, + "execution_count": 10, "metadata": { "ExecuteTime": { "end_time": "2024-03-02T14:10:28.121907Z", @@ -206,9 +214,11 @@ "outputs": [ { "data": { - "text/plain": "'urn:adsk.wipprod:fs.folder:co.z6qm45EyQfykBUrk1NuT7A'" + "text/plain": [ + "'urn:adsk.wipprod:fs.folder:co.z6qm45EyQfykBUrk1NuT7A'" + ] }, - "execution_count": 12, + "execution_count": 10, "metadata": {}, "output_type": "execute_result" } @@ -221,7 +231,7 @@ }, { "cell_type": "code", - "execution_count": 13, + "execution_count": 11, "metadata": { "ExecuteTime": { "end_time": "2024-03-02T14:10:29.255473Z", @@ -231,9 +241,11 @@ "outputs": [ { "data": { - "text/plain": "'urn:adsk.wipprod:dm.lineage:DjXtlXoJQyS6D1R-gRhI8A'" + "text/plain": [ + "'urn:adsk.wipprod:dm.lineage:DjXtlXoJQyS6D1R-gRhI8A'" + ] }, - "execution_count": 13, + "execution_count": 11, "metadata": {}, "output_type": "execute_result" } @@ -249,7 +261,7 @@ }, { "cell_type": "code", - "execution_count": 14, + "execution_count": 12, "metadata": { "ExecuteTime": { "end_time": "2024-03-02T14:10:30.219801Z", @@ -259,9 +271,11 @@ "outputs": [ { "data": { - "text/plain": "'urn:adsk.wipprod:fs.file:vf.DjXtlXoJQyS6D1R-gRhI8A?version=5'" + "text/plain": [ + "'urn:adsk.wipprod:fs.file:vf.DjXtlXoJQyS6D1R-gRhI8A?version=5'" + ] }, - "execution_count": 14, + "execution_count": 12, "metadata": {}, "output_type": "execute_result" } @@ -275,7 +289,7 @@ }, { "cell_type": "code", - "execution_count": 15, + "execution_count": 13, "metadata": { "ExecuteTime": { "end_time": "2024-03-02T14:10:42.556985Z", @@ -285,10 +299,134 @@ "outputs": [ { "data": { - "text/plain": " project_id \\\n0 b.1f7aa830-c6ef-48be-8a2d-bd554779e74b \n1 b.1f7aa830-c6ef-48be-8a2d-bd554779e74b \n2 b.1f7aa830-c6ef-48be-8a2d-bd554779e74b \n3 b.1f7aa830-c6ef-48be-8a2d-bd554779e74b \n4 b.1f7aa830-c6ef-48be-8a2d-bd554779e74b \n\n folder_id \\\n0 urn:adsk.wipprod:fs.folder:co.5ufH-U8yRjaZ-USJ... \n1 urn:adsk.wipprod:fs.folder:co.5ufH-U8yRjaZ-USJ... \n2 urn:adsk.wipprod:fs.folder:co.5ufH-U8yRjaZ-USJ... \n3 urn:adsk.wipprod:fs.folder:co.5ufH-U8yRjaZ-USJ... \n4 urn:adsk.wipprod:fs.folder:co.5ufH-U8yRjaZ-USJ... \n\n item_name \\\n0 ACCKL1-EXY-C-FAC-MECH-01.rvt \n1 ACCKL1-EXY-C-FAC-TOOL-01.rvt \n2 ACCKL1-EXY-E-FAC-DATA-01.rvt \n3 ACCKL1-EXY-E-FAC-EQPT-01.rvt \n4 ACCKL1-EXY-I-FAC-BMSP-01.rvt \n\n item_id last_version \\\n0 urn:adsk.wipprod:dm.lineage:DjXtlXoJQyS6D1R-gR... 5 \n1 urn:adsk.wipprod:dm.lineage:udZugJG9Rc-RdeF-PQ... 4 \n2 urn:adsk.wipprod:dm.lineage:CWW7IlXPTU2HFiwutZ... 4 \n3 urn:adsk.wipprod:dm.lineage:jo9Qg-8tRTG9t0DISd... 4 \n4 urn:adsk.wipprod:dm.lineage:JVchmSEmTSm0h5VzEp... 4 \n\n derivative_urn \\\n0 dXJuOmFkc2sud2lwcHJvZDpmcy5maWxlOnZmLkRqWHRsWG... \n1 dXJuOmFkc2sud2lwcHJvZDpmcy5maWxlOnZmLnVkWnVnSk... \n2 dXJuOmFkc2sud2lwcHJvZDpmcy5maWxlOnZmLkNXVzdJbF... \n3 dXJuOmFkc2sud2lwcHJvZDpmcy5maWxlOnZmLmpvOVFnLT... \n4 dXJuOmFkc2sud2lwcHJvZDpmcy5maWxlOnZmLkpWY2htU0... \n\n last_modified_time \n0 2024-01-31T07:24:02.0000000Z \n1 2024-01-31T07:23:47.0000000Z \n2 2024-01-31T07:23:47.0000000Z \n3 2024-01-31T07:23:48.0000000Z \n4 2024-01-31T07:23:50.0000000Z ", - "text/html": "
\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
project_idfolder_iditem_nameitem_idlast_versionderivative_urnlast_modified_time
0b.1f7aa830-c6ef-48be-8a2d-bd554779e74burn:adsk.wipprod:fs.folder:co.5ufH-U8yRjaZ-USJ...ACCKL1-EXY-C-FAC-MECH-01.rvturn:adsk.wipprod:dm.lineage:DjXtlXoJQyS6D1R-gR...5dXJuOmFkc2sud2lwcHJvZDpmcy5maWxlOnZmLkRqWHRsWG...2024-01-31T07:24:02.0000000Z
1b.1f7aa830-c6ef-48be-8a2d-bd554779e74burn:adsk.wipprod:fs.folder:co.5ufH-U8yRjaZ-USJ...ACCKL1-EXY-C-FAC-TOOL-01.rvturn:adsk.wipprod:dm.lineage:udZugJG9Rc-RdeF-PQ...4dXJuOmFkc2sud2lwcHJvZDpmcy5maWxlOnZmLnVkWnVnSk...2024-01-31T07:23:47.0000000Z
2b.1f7aa830-c6ef-48be-8a2d-bd554779e74burn:adsk.wipprod:fs.folder:co.5ufH-U8yRjaZ-USJ...ACCKL1-EXY-E-FAC-DATA-01.rvturn:adsk.wipprod:dm.lineage:CWW7IlXPTU2HFiwutZ...4dXJuOmFkc2sud2lwcHJvZDpmcy5maWxlOnZmLkNXVzdJbF...2024-01-31T07:23:47.0000000Z
3b.1f7aa830-c6ef-48be-8a2d-bd554779e74burn:adsk.wipprod:fs.folder:co.5ufH-U8yRjaZ-USJ...ACCKL1-EXY-E-FAC-EQPT-01.rvturn:adsk.wipprod:dm.lineage:jo9Qg-8tRTG9t0DISd...4dXJuOmFkc2sud2lwcHJvZDpmcy5maWxlOnZmLmpvOVFnLT...2024-01-31T07:23:48.0000000Z
4b.1f7aa830-c6ef-48be-8a2d-bd554779e74burn:adsk.wipprod:fs.folder:co.5ufH-U8yRjaZ-USJ...ACCKL1-EXY-I-FAC-BMSP-01.rvturn:adsk.wipprod:dm.lineage:JVchmSEmTSm0h5VzEp...4dXJuOmFkc2sud2lwcHJvZDpmcy5maWxlOnZmLkpWY2htU0...2024-01-31T07:23:50.0000000Z
\n
" + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
project_idfolder_iditem_nameitem_idlast_versionderivative_urnlast_modified_time
0b.1f7aa830-c6ef-48be-8a2d-bd554779e74burn:adsk.wipprod:fs.folder:co.5ufH-U8yRjaZ-USJ...ACCKL1-EXY-C-FAC-MECH-01.rvturn:adsk.wipprod:dm.lineage:DjXtlXoJQyS6D1R-gR...5dXJuOmFkc2sud2lwcHJvZDpmcy5maWxlOnZmLkRqWHRsWG...2024-01-31T07:24:02.0000000Z
1b.1f7aa830-c6ef-48be-8a2d-bd554779e74burn:adsk.wipprod:fs.folder:co.5ufH-U8yRjaZ-USJ...ACCKL1-EXY-C-FAC-TOOL-01.rvturn:adsk.wipprod:dm.lineage:udZugJG9Rc-RdeF-PQ...4dXJuOmFkc2sud2lwcHJvZDpmcy5maWxlOnZmLnVkWnVnSk...2024-01-31T07:23:47.0000000Z
2b.1f7aa830-c6ef-48be-8a2d-bd554779e74burn:adsk.wipprod:fs.folder:co.5ufH-U8yRjaZ-USJ...ACCKL1-EXY-E-FAC-DATA-01.rvturn:adsk.wipprod:dm.lineage:CWW7IlXPTU2HFiwutZ...4dXJuOmFkc2sud2lwcHJvZDpmcy5maWxlOnZmLkNXVzdJbF...2024-01-31T07:23:47.0000000Z
3b.1f7aa830-c6ef-48be-8a2d-bd554779e74burn:adsk.wipprod:fs.folder:co.5ufH-U8yRjaZ-USJ...ACCKL1-EXY-E-FAC-EQPT-01.rvturn:adsk.wipprod:dm.lineage:jo9Qg-8tRTG9t0DISd...4dXJuOmFkc2sud2lwcHJvZDpmcy5maWxlOnZmLmpvOVFnLT...2024-01-31T07:23:48.0000000Z
4b.1f7aa830-c6ef-48be-8a2d-bd554779e74burn:adsk.wipprod:fs.folder:co.5ufH-U8yRjaZ-USJ...ACCKL1-EXY-I-FAC-BMSP-01.rvturn:adsk.wipprod:dm.lineage:JVchmSEmTSm0h5VzEp...4dXJuOmFkc2sud2lwcHJvZDpmcy5maWxlOnZmLkpWY2htU0...2024-01-31T07:23:50.0000000Z
\n", + "
" + ], + "text/plain": [ + " project_id \\\n", + "0 b.1f7aa830-c6ef-48be-8a2d-bd554779e74b \n", + "1 b.1f7aa830-c6ef-48be-8a2d-bd554779e74b \n", + "2 b.1f7aa830-c6ef-48be-8a2d-bd554779e74b \n", + "3 b.1f7aa830-c6ef-48be-8a2d-bd554779e74b \n", + "4 b.1f7aa830-c6ef-48be-8a2d-bd554779e74b \n", + "\n", + " folder_id \\\n", + "0 urn:adsk.wipprod:fs.folder:co.5ufH-U8yRjaZ-USJ... \n", + "1 urn:adsk.wipprod:fs.folder:co.5ufH-U8yRjaZ-USJ... \n", + "2 urn:adsk.wipprod:fs.folder:co.5ufH-U8yRjaZ-USJ... \n", + "3 urn:adsk.wipprod:fs.folder:co.5ufH-U8yRjaZ-USJ... \n", + "4 urn:adsk.wipprod:fs.folder:co.5ufH-U8yRjaZ-USJ... \n", + "\n", + " item_name \\\n", + "0 ACCKL1-EXY-C-FAC-MECH-01.rvt \n", + "1 ACCKL1-EXY-C-FAC-TOOL-01.rvt \n", + "2 ACCKL1-EXY-E-FAC-DATA-01.rvt \n", + "3 ACCKL1-EXY-E-FAC-EQPT-01.rvt \n", + "4 ACCKL1-EXY-I-FAC-BMSP-01.rvt \n", + "\n", + " item_id last_version \\\n", + "0 urn:adsk.wipprod:dm.lineage:DjXtlXoJQyS6D1R-gR... 5 \n", + "1 urn:adsk.wipprod:dm.lineage:udZugJG9Rc-RdeF-PQ... 4 \n", + "2 urn:adsk.wipprod:dm.lineage:CWW7IlXPTU2HFiwutZ... 4 \n", + "3 urn:adsk.wipprod:dm.lineage:jo9Qg-8tRTG9t0DISd... 4 \n", + "4 urn:adsk.wipprod:dm.lineage:JVchmSEmTSm0h5VzEp... 4 \n", + "\n", + " derivative_urn \\\n", + "0 dXJuOmFkc2sud2lwcHJvZDpmcy5maWxlOnZmLkRqWHRsWG... \n", + "1 dXJuOmFkc2sud2lwcHJvZDpmcy5maWxlOnZmLnVkWnVnSk... \n", + "2 dXJuOmFkc2sud2lwcHJvZDpmcy5maWxlOnZmLkNXVzdJbF... \n", + "3 dXJuOmFkc2sud2lwcHJvZDpmcy5maWxlOnZmLmpvOVFnLT... \n", + "4 dXJuOmFkc2sud2lwcHJvZDpmcy5maWxlOnZmLkpWY2htU0... \n", + "\n", + " last_modified_time \n", + "0 2024-01-31T07:24:02.0000000Z \n", + "1 2024-01-31T07:23:47.0000000Z \n", + "2 2024-01-31T07:23:47.0000000Z \n", + "3 2024-01-31T07:23:48.0000000Z \n", + "4 2024-01-31T07:23:50.0000000Z " + ] }, - "execution_count": 15, + "execution_count": 13, "metadata": {}, "output_type": "execute_result" } @@ -300,7 +438,7 @@ }, { "cell_type": "code", - "execution_count": 16, + "execution_count": 14, "metadata": { "ExecuteTime": { "end_time": "2024-03-02T14:10:43.502899Z", @@ -310,10 +448,85 @@ "outputs": [ { "data": { - "text/plain": " item_id version \\\n0 urn:adsk.wipprod:dm.lineage:DjXtlXoJQyS6D1R-gR... 5 \n1 urn:adsk.wipprod:dm.lineage:DjXtlXoJQyS6D1R-gR... 4 \n2 urn:adsk.wipprod:dm.lineage:DjXtlXoJQyS6D1R-gR... 3 \n3 urn:adsk.wipprod:dm.lineage:DjXtlXoJQyS6D1R-gR... 2 \n\n derivative_urn \\\n0 dXJuOmFkc2sud2lwcHJvZDpmcy5maWxlOnZmLkRqWHRsWG... \n1 dXJuOmFkc2sud2lwcHJvZDpmcy5maWxlOnZmLkRqWHRsWG... \n2 dXJuOmFkc2sud2lwcHJvZDpmcy5maWxlOnZmLkRqWHRsWG... \n3 dXJuOmFkc2sud2lwcHJvZDpmcy5maWxlOnZmLkRqWHRsWG... \n\n last_modified_time \n0 2024-01-31T07:38:59.0000000Z \n1 2024-01-24T03:20:58.0000000Z \n2 2024-01-22T07:07:33.0000000Z \n3 2024-01-18T15:23:02.0000000Z ", - "text/html": "
\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \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:adsk.wipprod:dm.lineage:DjXtlXoJQyS6D1R-gR...5dXJuOmFkc2sud2lwcHJvZDpmcy5maWxlOnZmLkRqWHRsWG...2024-01-31T07:38:59.0000000Z
1urn:adsk.wipprod:dm.lineage:DjXtlXoJQyS6D1R-gR...4dXJuOmFkc2sud2lwcHJvZDpmcy5maWxlOnZmLkRqWHRsWG...2024-01-24T03:20:58.0000000Z
2urn:adsk.wipprod:dm.lineage:DjXtlXoJQyS6D1R-gR...3dXJuOmFkc2sud2lwcHJvZDpmcy5maWxlOnZmLkRqWHRsWG...2024-01-22T07:07:33.0000000Z
3urn:adsk.wipprod:dm.lineage:DjXtlXoJQyS6D1R-gR...2dXJuOmFkc2sud2lwcHJvZDpmcy5maWxlOnZmLkRqWHRsWG...2024-01-18T15:23:02.0000000Z
\n
" + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \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:adsk.wipprod:dm.lineage:DjXtlXoJQyS6D1R-gR...5dXJuOmFkc2sud2lwcHJvZDpmcy5maWxlOnZmLkRqWHRsWG...2024-01-31T07:38:59.0000000Z
1urn:adsk.wipprod:dm.lineage:DjXtlXoJQyS6D1R-gR...4dXJuOmFkc2sud2lwcHJvZDpmcy5maWxlOnZmLkRqWHRsWG...2024-01-24T03:20:58.0000000Z
2urn:adsk.wipprod:dm.lineage:DjXtlXoJQyS6D1R-gR...3dXJuOmFkc2sud2lwcHJvZDpmcy5maWxlOnZmLkRqWHRsWG...2024-01-22T07:07:33.0000000Z
3urn:adsk.wipprod:dm.lineage:DjXtlXoJQyS6D1R-gR...2dXJuOmFkc2sud2lwcHJvZDpmcy5maWxlOnZmLkRqWHRsWG...2024-01-18T15:23:02.0000000Z
\n", + "
" + ], + "text/plain": [ + " item_id version \\\n", + "0 urn:adsk.wipprod:dm.lineage:DjXtlXoJQyS6D1R-gR... 5 \n", + "1 urn:adsk.wipprod:dm.lineage:DjXtlXoJQyS6D1R-gR... 4 \n", + "2 urn:adsk.wipprod:dm.lineage:DjXtlXoJQyS6D1R-gR... 3 \n", + "3 urn:adsk.wipprod:dm.lineage:DjXtlXoJQyS6D1R-gR... 2 \n", + "\n", + " derivative_urn \\\n", + "0 dXJuOmFkc2sud2lwcHJvZDpmcy5maWxlOnZmLkRqWHRsWG... \n", + "1 dXJuOmFkc2sud2lwcHJvZDpmcy5maWxlOnZmLkRqWHRsWG... \n", + "2 dXJuOmFkc2sud2lwcHJvZDpmcy5maWxlOnZmLkRqWHRsWG... \n", + "3 dXJuOmFkc2sud2lwcHJvZDpmcy5maWxlOnZmLkRqWHRsWG... \n", + "\n", + " last_modified_time \n", + "0 2024-01-31T07:38:59.0000000Z \n", + "1 2024-01-24T03:20:58.0000000Z \n", + "2 2024-01-22T07:07:33.0000000Z \n", + "3 2024-01-18T15:23:02.0000000Z " + ] }, - "execution_count": 16, + "execution_count": 14, "metadata": {}, "output_type": "execute_result" } diff --git a/APSToolkitPython/Tutorials/Database.ipynb b/APSToolkitPython/Tutorials/Database.ipynb index 6160f19..f820eee 100644 --- a/APSToolkitPython/Tutorials/Database.ipynb +++ b/APSToolkitPython/Tutorials/Database.ipynb @@ -2,6 +2,15 @@ "cells": [ { "cell_type": "code", + "execution_count": 1, + "id": "5144ee9c754adcd9", + "metadata": { + "ExecuteTime": { + "end_time": "2024-03-03T03:07:31.826625Z", + "start_time": "2024-03-03T03:07:28.633798Z" + }, + "collapsed": false + }, "outputs": [ { "name": "stdout", @@ -21,48 +30,32 @@ "Requirement already satisfied: six>=1.5 in c:\\python311\\lib\\site-packages (from python-dateutil>=2.8.2->pandas->aps-toolkit) (1.16.0)\n", "Note: you may need to restart the kernel to use updated packages.\n" ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "DEPRECATION: Loading egg at c:\\python311\\lib\\site-packages\\autodesk_forge_sdk-0.1.2-py3.11.egg is deprecated. pip 24.3 will enforce this behaviour change. A possible replacement is to use pip for package installation.. Discussion can be found at https://github.com/pypa/pip/issues/12330\n" - ] } ], "source": [ "%pip install aps-toolkit --upgrade" - ], - "metadata": { - "collapsed": false, - "ExecuteTime": { - "end_time": "2024-03-03T03:07:31.826625Z", - "start_time": "2024-03-03T03:07:28.633798Z" - } - }, - "id": "5144ee9c754adcd9", - "execution_count": 2 + ] }, { "cell_type": "markdown", - "source": [ - "### Import Libraries" - ], + "id": "de0c8639190166b7", "metadata": { "collapsed": false }, - "id": "de0c8639190166b7" + "source": [ + "### Import Libraries" + ] }, { "cell_type": "code", - "execution_count": 3, + "execution_count": 2, "id": "initial_id", "metadata": { - "collapsed": true, "ExecuteTime": { "end_time": "2024-03-03T03:07:52.663336Z", "start_time": "2024-03-03T03:07:52.030338Z" - } + }, + "collapsed": true }, "outputs": [], "source": [ @@ -84,14 +77,14 @@ }, { "cell_type": "code", - "execution_count": 4, + "execution_count": 3, "id": "e7d5a2df2f392ea6", "metadata": { - "collapsed": false, "ExecuteTime": { "end_time": "2024-03-03T03:07:55.941032Z", "start_time": "2024-03-03T03:07:55.937415Z" - } + }, + "collapsed": false }, "outputs": [], "source": [ @@ -100,14 +93,14 @@ }, { "cell_type": "code", - "execution_count": 5, + "execution_count": 4, "id": "b0db094fe5b7ce6e", "metadata": { - "collapsed": false, "ExecuteTime": { "end_time": "2024-03-03T03:07:58.135371Z", "start_time": "2024-03-03T03:07:57.326953Z" - } + }, + "collapsed": false }, "outputs": [], "source": [ @@ -116,14 +109,14 @@ }, { "cell_type": "code", - "execution_count": 6, + "execution_count": 5, "id": "133e280cdbb150c4", "metadata": { - "collapsed": false, "ExecuteTime": { "end_time": "2024-03-03T03:07:59.125720Z", "start_time": "2024-03-03T03:07:59.121714Z" - } + }, + "collapsed": false }, "outputs": [], "source": [ @@ -132,14 +125,14 @@ }, { "cell_type": "code", - "execution_count": 7, + "execution_count": 6, "id": "b1fb09e56f8be7a", "metadata": { - "collapsed": false, "ExecuteTime": { "end_time": "2024-03-03T03:08:15.356998Z", "start_time": "2024-03-03T03:08:00.576616Z" - } + }, + "collapsed": false }, "outputs": [], "source": [ @@ -149,7 +142,7 @@ }, { "cell_type": "code", - "execution_count": 8, + "execution_count": 7, "id": "5115ba2f", "metadata": { "ExecuteTime": { @@ -160,9 +153,11 @@ "outputs": [ { "data": { - "text/plain": "'C:\\\\Python311\\\\Lib\\\\site-packages\\\\aps_toolkit\\\\database\\\\dXJuOmFkc2sud2lwcHJvZDpmcy5maWxlOnZmLnRfTFFVUDZoU3l5UXo5bm1sTE1FUHc_dmVyc2lvbj02.sdb'" + "text/plain": [ + "'c:\\\\Python311\\\\Lib\\\\site-packages\\\\aps_toolkit\\\\database\\\\dXJuOmFkc2sud2lwcHJvZDpmcy5maWxlOnZmLnRfTFFVUDZoU3l5UXo5bm1sTE1FUHc_dmVyc2lvbj02.sdb'" + ] }, - "execution_count": 8, + "execution_count": 7, "metadata": {}, "output_type": "execute_result" } @@ -173,17 +168,17 @@ }, { "cell_type": "markdown", - "source": [ - "### Object ID Reader" - ], + "id": "c6562a5f51eb13fa", "metadata": { "collapsed": false }, - "id": "c6562a5f51eb13fa" + "source": [ + "### Object ID Reader" + ] }, { "cell_type": "code", - "execution_count": 9, + "execution_count": 8, "id": "c212c9f5", "metadata": { "ExecuteTime": { @@ -194,10 +189,120 @@ "outputs": [ { "data": { - "text/plain": " id external_id viewable_id\n0 1 doc_d14ee89f-34c9-4d58-ae27-c584f63353df None\n1 2 53c5330a-0a78-42d6-8dc2-cd7dde1d46b9-001522f7 None\n2 3 53c5330a-0a78-42d6-8dc2-cd7dde1d46b9-001522f8 None\n3 4 53c5330a-0a78-42d6-8dc2-cd7dde1d46b9-001522f9 None\n4 5 53c5330a-0a78-42d6-8dc2-cd7dde1d46b9-001522fa None\n... ... ... ...\n62668 62669 57ddb049-4112-4cf4-9243-c45c24903488 None\n62669 62670 0bb0c17e-ba23-4d21-8b61-4f954bea6b74 None\n62670 62671 77a4e6f2-95db-4050-9ff8-c2f5ee7b22a0 None\n62671 62672 0c465578-969b-4809-ae2b-d28a73a43faf None\n62672 62673 a0f7f97b-3327-43a8-b179-071133fa736d None\n\n[62673 rows x 3 columns]", - "text/html": "
\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
idexternal_idviewable_id
01doc_d14ee89f-34c9-4d58-ae27-c584f63353dfNone
1253c5330a-0a78-42d6-8dc2-cd7dde1d46b9-001522f7None
2353c5330a-0a78-42d6-8dc2-cd7dde1d46b9-001522f8None
3453c5330a-0a78-42d6-8dc2-cd7dde1d46b9-001522f9None
4553c5330a-0a78-42d6-8dc2-cd7dde1d46b9-001522faNone
............
626686266957ddb049-4112-4cf4-9243-c45c24903488None
62669626700bb0c17e-ba23-4d21-8b61-4f954bea6b74None
626706267177a4e6f2-95db-4050-9ff8-c2f5ee7b22a0None
62671626720c465578-969b-4809-ae2b-d28a73a43fafNone
6267262673a0f7f97b-3327-43a8-b179-071133fa736dNone
\n

62673 rows × 3 columns

\n
" + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
idexternal_idviewable_id
01doc_d14ee89f-34c9-4d58-ae27-c584f63353dfNone
1253c5330a-0a78-42d6-8dc2-cd7dde1d46b9-001522f7None
2353c5330a-0a78-42d6-8dc2-cd7dde1d46b9-001522f8None
3453c5330a-0a78-42d6-8dc2-cd7dde1d46b9-001522f9None
4553c5330a-0a78-42d6-8dc2-cd7dde1d46b9-001522faNone
............
626686266957ddb049-4112-4cf4-9243-c45c24903488None
62669626700bb0c17e-ba23-4d21-8b61-4f954bea6b74None
626706267177a4e6f2-95db-4050-9ff8-c2f5ee7b22a0None
62671626720c465578-969b-4809-ae2b-d28a73a43fafNone
6267262673a0f7f97b-3327-43a8-b179-071133fa736dNone
\n", + "

62673 rows × 3 columns

\n", + "
" + ], + "text/plain": [ + " id external_id viewable_id\n", + "0 1 doc_d14ee89f-34c9-4d58-ae27-c584f63353df None\n", + "1 2 53c5330a-0a78-42d6-8dc2-cd7dde1d46b9-001522f7 None\n", + "2 3 53c5330a-0a78-42d6-8dc2-cd7dde1d46b9-001522f8 None\n", + "3 4 53c5330a-0a78-42d6-8dc2-cd7dde1d46b9-001522f9 None\n", + "4 5 53c5330a-0a78-42d6-8dc2-cd7dde1d46b9-001522fa None\n", + "... ... ... ...\n", + "62668 62669 57ddb049-4112-4cf4-9243-c45c24903488 None\n", + "62669 62670 0bb0c17e-ba23-4d21-8b61-4f954bea6b74 None\n", + "62670 62671 77a4e6f2-95db-4050-9ff8-c2f5ee7b22a0 None\n", + "62671 62672 0c465578-969b-4809-ae2b-d28a73a43faf None\n", + "62672 62673 a0f7f97b-3327-43a8-b179-071133fa736d None\n", + "\n", + "[62673 rows x 3 columns]" + ] }, - "execution_count": 9, + "execution_count": 8, "metadata": {}, "output_type": "execute_result" } @@ -218,28 +323,248 @@ }, { "cell_type": "code", + "execution_count": 9, + "id": "6938946d", + "metadata": { + "ExecuteTime": { + "end_time": "2024-03-03T03:08:18.883868Z", + "start_time": "2024-03-03T03:08:18.871045Z" + } + }, "outputs": [ { "data": { - "text/plain": " id name category data_type \\\n0 1 name __name__ 20 \n1 2 child __child__ 11 \n2 3 parent __parent__ 11 \n3 4 instanceof_objid __instanceof__ 11 \n4 5 hastable __hastable__ 11 \n... ... ... ... ... \n1333 1334 W1 Other 3 \n1334 1335 Frame Materials and Finishes 20 \n1335 1336 Arrow Visibility Other 1 \n1336 1337 Quantity Text 20 \n1337 1338 View Template Identity Data 20 \n\n data_type_context description display_name \\\n0 None None None \n1 None None None \n2 None None None \n3 None None None \n4 None None None \n... ... ... ... \n1333 autodesk.unit.unit:millimeters-1.0.1 None W1 \n1334 None Frame \n1335 None Arrow Visibility \n1336 None Quantity \n1337 None View Template \n\n flags display_precision forge_parameter \n0 0 0 None \n1 1 0 None \n2 1 0 None \n3 1 0 None \n4 1 0 None \n... ... ... ... \n1333 8 1 None \n1334 0 0 None \n1335 0 0 None \n1336 0 0 None \n1337 8 0 None \n\n[1338 rows x 10 columns]", - "text/html": "
\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
idnamecategorydata_typedata_type_contextdescriptiondisplay_nameflagsdisplay_precisionforge_parameter
01name__name__20NoneNoneNone00None
12child__child__11NoneNoneNone10None
23parent__parent__11NoneNoneNone10None
34instanceof_objid__instanceof__11NoneNoneNone10None
45hastable__hastable__11NoneNoneNone10None
.................................
13331334W1Other3autodesk.unit.unit:millimeters-1.0.1NoneW181None
13341335FrameMaterials and Finishes20NoneFrame00None
13351336Arrow VisibilityOther1NoneArrow Visibility00None
13361337QuantityText20NoneQuantity00None
13371338View TemplateIdentity Data20NoneView Template80None
\n

1338 rows × 10 columns

\n
" + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
idnamecategorydata_typedata_type_contextdescriptiondisplay_nameflagsdisplay_precisionforge_parameter
01name__name__20NoneNoneNone00None
12child__child__11NoneNoneNone10None
23parent__parent__11NoneNoneNone10None
34instanceof_objid__instanceof__11NoneNoneNone10None
45hastable__hastable__11NoneNoneNone10None
.................................
13331334W1Other3autodesk.unit.unit:millimeters-1.0.1NoneW181None
13341335FrameMaterials and Finishes20NoneFrame00None
13351336Arrow VisibilityOther1NoneArrow Visibility00None
13361337QuantityText20NoneQuantity00None
13371338View TemplateIdentity Data20NoneView Template80None
\n", + "

1338 rows × 10 columns

\n", + "
" + ], + "text/plain": [ + " id name category data_type \\\n", + "0 1 name __name__ 20 \n", + "1 2 child __child__ 11 \n", + "2 3 parent __parent__ 11 \n", + "3 4 instanceof_objid __instanceof__ 11 \n", + "4 5 hastable __hastable__ 11 \n", + "... ... ... ... ... \n", + "1333 1334 W1 Other 3 \n", + "1334 1335 Frame Materials and Finishes 20 \n", + "1335 1336 Arrow Visibility Other 1 \n", + "1336 1337 Quantity Text 20 \n", + "1337 1338 View Template Identity Data 20 \n", + "\n", + " data_type_context description display_name \\\n", + "0 None None None \n", + "1 None None None \n", + "2 None None None \n", + "3 None None None \n", + "4 None None None \n", + "... ... ... ... \n", + "1333 autodesk.unit.unit:millimeters-1.0.1 None W1 \n", + "1334 None Frame \n", + "1335 None Arrow Visibility \n", + "1336 None Quantity \n", + "1337 None View Template \n", + "\n", + " flags display_precision forge_parameter \n", + "0 0 0 None \n", + "1 1 0 None \n", + "2 1 0 None \n", + "3 1 0 None \n", + "4 1 0 None \n", + "... ... ... ... \n", + "1333 8 1 None \n", + "1334 0 0 None \n", + "1335 0 0 None \n", + "1336 0 0 None \n", + "1337 8 0 None \n", + "\n", + "[1338 rows x 10 columns]" + ] }, - "execution_count": 10, + "execution_count": 9, "metadata": {}, "output_type": "execute_result" } ], "source": [ "db.execute_query(\"SELECT * FROM _objects_attr\")" - ], - "metadata": { - "ExecuteTime": { - "end_time": "2024-03-03T03:08:18.883868Z", - "start_time": "2024-03-03T03:08:18.871045Z" - } - }, - "id": "6938946d", - "execution_count": 10 + ] }, { "cell_type": "markdown", @@ -253,81 +578,290 @@ }, { "cell_type": "code", - "execution_count": 13, + "execution_count": 10, "id": "dfd9bddf181ec55a", "metadata": { - "collapsed": false, "ExecuteTime": { "end_time": "2024-03-03T03:10:15.788704Z", "start_time": "2024-03-03T03:10:15.626925Z" + }, + "collapsed": false + }, + "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", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
idvalue
01Model
12rvt
231.0
341
45Revit Document
56Exyte Group
67Design, Engineering & Construction
78
89Issue Date
910Project Status
\n", + "
" + ], + "text/plain": [ + " id value\n", + "0 1 Model\n", + "1 2 rvt\n", + "2 3 1.0\n", + "3 4 1\n", + "4 5 Revit Document\n", + "5 6 Exyte Group\n", + "6 7 Design, Engineering & Construction\n", + "7 8 \n", + "8 9 Issue Date\n", + "9 10 Project Status" + ] + }, + "execution_count": 10, + "metadata": {}, + "output_type": "execute_result" } + ], + "source": [ + "import pandas as pd\n", + "df = db.execute_query(\"SELECT * FROM _objects_val\")\n", + "df.head(10)" + ] + }, + { + "cell_type": "markdown", + "id": "849b5287800535db", + "metadata": { + "collapsed": false + }, + "source": [ + "### Object EAV Reader" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "id": "9f910859112f1fd4", + "metadata": { + "ExecuteTime": { + "end_time": "2024-03-03T03:10:51.604443Z", + "start_time": "2024-03-03T03:10:50.486239Z" + }, + "collapsed": false }, "outputs": [ { "data": { - "text/plain": " id value\n0 1 Model\n1 2 rvt\n2 3 1.0\n3 4 1\n4 5 Revit Document\n5 6 Exyte Group\n6 7 Design, Engineering & Construction\n7 8 \n8 9 Issue Date\n9 10 Project Status", - "text/html": "
\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
idvalue
01Model
12rvt
231.0
341
45Revit Document
56Exyte Group
67Design, Engineering & Construction
78
89Issue Date
910Project Status
\n
" + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
identity_idattribute_idvalue_id
01111
12192
231103
34184
451135
561146
671157
781168
891178
9101188
\n", + "
" + ], + "text/plain": [ + " id entity_id attribute_id value_id\n", + "0 1 1 1 1\n", + "1 2 1 9 2\n", + "2 3 1 10 3\n", + "3 4 1 8 4\n", + "4 5 1 13 5\n", + "5 6 1 14 6\n", + "6 7 1 15 7\n", + "7 8 1 16 8\n", + "8 9 1 17 8\n", + "9 10 1 18 8" + ] }, - "execution_count": 13, + "execution_count": 11, "metadata": {}, "output_type": "execute_result" } ], "source": [ - "import pandas as pd\n", - "df = db.execute_query(\"SELECT * FROM _objects_val\")\n", + "df = db.execute_query(\"SELECT * FROM _objects_eav\")\n", "df.head(10)" ] }, { "cell_type": "markdown", - "source": [ - "### Object EAV Reader" - ], + "id": "4168cab5f5eaaef9", "metadata": { "collapsed": false }, - "id": "849b5287800535db" + "source": [ + "### Read SQLite file" + ] }, { "cell_type": "code", - "outputs": [ - { - "data": { - "text/plain": " id entity_id attribute_id value_id\n0 1 1 1 1\n1 2 1 9 2\n2 3 1 10 3\n3 4 1 8 4\n4 5 1 13 5\n5 6 1 14 6\n6 7 1 15 7\n7 8 1 16 8\n8 9 1 17 8\n9 10 1 18 8", - "text/html": "
\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
identity_idattribute_idvalue_id
01111
12192
231103
34184
451135
561146
671157
781168
891178
9101188
\n
" - }, - "execution_count": 14, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "df = db.execute_query(\"SELECT * FROM _objects_eav\")\n", - "df.head(10)" - ], + "execution_count": 12, + "id": "8f635b9f05040830", "metadata": { - "collapsed": false, "ExecuteTime": { - "end_time": "2024-03-03T03:10:51.604443Z", - "start_time": "2024-03-03T03:10:50.486239Z" - } - }, - "id": "9f910859112f1fd4", - "execution_count": 14 - }, - { - "cell_type": "markdown", - "source": [ - "### Read SQLite file" - ], - "metadata": { + "end_time": "2024-03-03T03:08:54.044142Z", + "start_time": "2024-03-03T03:08:54.039675Z" + }, "collapsed": false }, - "id": "4168cab5f5eaaef9" - }, - { - "cell_type": "code", "outputs": [ { "name": "stdout", @@ -364,35 +898,239 @@ "finally:\n", " # Close the database connection when done\n", " conn.close()" - ], - "metadata": { - "collapsed": false, - "ExecuteTime": { - "end_time": "2024-03-03T03:08:54.044142Z", - "start_time": "2024-03-03T03:08:54.039675Z" - } - }, - "id": "8f635b9f05040830", - "execution_count": 11 + ] }, { "cell_type": "code", - "execution_count": 16, + "execution_count": 13, "id": "1a09609f860fefdf", "metadata": { - "collapsed": false, "ExecuteTime": { "end_time": "2024-03-03T03:11:58.600012Z", "start_time": "2024-03-03T03:11:57.066378Z" - } + }, + "collapsed": false }, "outputs": [ { "data": { - "text/plain": " externalId category \\\n0 00c6c04a-12df-4dad-941f-b193ceb216ca-0000225e Identity Data \n1 00c6c04a-12df-4dad-941f-b193ceb216ca-0000225e Identity Data \n2 00c6c04a-12df-4dad-941f-b193ceb216ca-0000225e IFC Parameters \n3 00c6c04a-12df-4dad-941f-b193ceb216ca-0000225e IFC Parameters \n4 00c6c04a-12df-4dad-941f-b193ceb216ca-0000225e IFC Parameters \n5 00c6c04a-12df-4dad-941f-b193ceb216ca-0000225e IFC Parameters \n6 00c6c04a-12df-4dad-941f-b193ceb216ca-0000225e Identity Data \n7 00c6c04a-12df-4dad-941f-b193ceb216ca-0000225e Identity Data \n8 00c6c04a-12df-4dad-941f-b193ceb216ca-0000225e Identity Data \n9 00c6c04a-12df-4dad-941f-b193ceb216ca-0000225e Identity Data \n10 00c6c04a-12df-4dad-941f-b193ceb216ca-0000225e Identity Data \n11 00c6c04a-12df-4dad-941f-b193ceb216ca-0000225e Identity Data \n12 00c6c04a-12df-4dad-941f-b193ceb216ca-0000225e Identity Data \n13 00c6c04a-12df-4dad-941f-b193ceb216ca-0000225e Identity Data \n14 00c6c04a-12df-4dad-941f-b193ceb216ca-0000225e Identity Data \n15 00c6c04a-12df-4dad-941f-b193ceb216ca-0000225e Materials and Finishes \n16 00c6c04a-12df-4dad-941f-b193ceb216ca-0000225e Materials and Finishes \n17 00c6c04a-12df-4dad-941f-b193ceb216ca-0000225e Materials and Finishes \n18 00c6c04a-12df-4dad-941f-b193ceb216ca-0000225e Materials and Finishes \n19 00c6c04a-12df-4dad-941f-b193ceb216ca-0000225e Materials and Finishes \n\n display_name value \n0 Image \n1 Keynote \n2 Export to IFC By Type \n3 Export to IFC As \n4 IFC Predefined Type \n5 IfcGUID 00ni1A4jzDhPGViPFEiZIK \n6 Model \n7 Manufacturer \n8 Comments \n9 URL \n10 Description \n11 Cost 0.0 \n12 Mark \n13 Workset Materials \n14 Edited by \n15 Name Phase - New \n16 Color 5263440 \n17 Transparency 0 \n18 Glow 0.0 \n19 Smoothness 50 ", - "text/html": "
\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
externalIdcategorydisplay_namevalue
000c6c04a-12df-4dad-941f-b193ceb216ca-0000225eIdentity DataImage
100c6c04a-12df-4dad-941f-b193ceb216ca-0000225eIdentity DataKeynote
200c6c04a-12df-4dad-941f-b193ceb216ca-0000225eIFC ParametersExport to IFCBy Type
300c6c04a-12df-4dad-941f-b193ceb216ca-0000225eIFC ParametersExport to IFC As
400c6c04a-12df-4dad-941f-b193ceb216ca-0000225eIFC ParametersIFC Predefined Type
500c6c04a-12df-4dad-941f-b193ceb216ca-0000225eIFC ParametersIfcGUID00ni1A4jzDhPGViPFEiZIK
600c6c04a-12df-4dad-941f-b193ceb216ca-0000225eIdentity DataModel
700c6c04a-12df-4dad-941f-b193ceb216ca-0000225eIdentity DataManufacturer
800c6c04a-12df-4dad-941f-b193ceb216ca-0000225eIdentity DataComments
900c6c04a-12df-4dad-941f-b193ceb216ca-0000225eIdentity DataURL
1000c6c04a-12df-4dad-941f-b193ceb216ca-0000225eIdentity DataDescription
1100c6c04a-12df-4dad-941f-b193ceb216ca-0000225eIdentity DataCost0.0
1200c6c04a-12df-4dad-941f-b193ceb216ca-0000225eIdentity DataMark
1300c6c04a-12df-4dad-941f-b193ceb216ca-0000225eIdentity DataWorksetMaterials
1400c6c04a-12df-4dad-941f-b193ceb216ca-0000225eIdentity DataEdited by
1500c6c04a-12df-4dad-941f-b193ceb216ca-0000225eMaterials and FinishesNamePhase - New
1600c6c04a-12df-4dad-941f-b193ceb216ca-0000225eMaterials and FinishesColor5263440
1700c6c04a-12df-4dad-941f-b193ceb216ca-0000225eMaterials and FinishesTransparency0
1800c6c04a-12df-4dad-941f-b193ceb216ca-0000225eMaterials and FinishesGlow0.0
1900c6c04a-12df-4dad-941f-b193ceb216ca-0000225eMaterials and FinishesSmoothness50
\n
" + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
externalIdcategorydisplay_namevalue
000c6c04a-12df-4dad-941f-b193ceb216ca-0000225eIdentity DataImage
100c6c04a-12df-4dad-941f-b193ceb216ca-0000225eIdentity DataKeynote
200c6c04a-12df-4dad-941f-b193ceb216ca-0000225eIFC ParametersExport to IFCBy Type
300c6c04a-12df-4dad-941f-b193ceb216ca-0000225eIFC ParametersExport to IFC As
400c6c04a-12df-4dad-941f-b193ceb216ca-0000225eIFC ParametersIFC Predefined Type
500c6c04a-12df-4dad-941f-b193ceb216ca-0000225eIFC ParametersIfcGUID00ni1A4jzDhPGViPFEiZIK
600c6c04a-12df-4dad-941f-b193ceb216ca-0000225eIdentity DataModel
700c6c04a-12df-4dad-941f-b193ceb216ca-0000225eIdentity DataManufacturer
800c6c04a-12df-4dad-941f-b193ceb216ca-0000225eIdentity DataComments
900c6c04a-12df-4dad-941f-b193ceb216ca-0000225eIdentity DataURL
1000c6c04a-12df-4dad-941f-b193ceb216ca-0000225eIdentity DataDescription
1100c6c04a-12df-4dad-941f-b193ceb216ca-0000225eIdentity DataCost0.0
1200c6c04a-12df-4dad-941f-b193ceb216ca-0000225eIdentity DataMark
1300c6c04a-12df-4dad-941f-b193ceb216ca-0000225eIdentity DataWorksetMaterials
1400c6c04a-12df-4dad-941f-b193ceb216ca-0000225eIdentity DataEdited by
1500c6c04a-12df-4dad-941f-b193ceb216ca-0000225eMaterials and FinishesNamePhase - New
1600c6c04a-12df-4dad-941f-b193ceb216ca-0000225eMaterials and FinishesColor5263440
1700c6c04a-12df-4dad-941f-b193ceb216ca-0000225eMaterials and FinishesTransparency0
1800c6c04a-12df-4dad-941f-b193ceb216ca-0000225eMaterials and FinishesGlow0.0
1900c6c04a-12df-4dad-941f-b193ceb216ca-0000225eMaterials and FinishesSmoothness50
\n", + "
" + ], + "text/plain": [ + " externalId category \\\n", + "0 00c6c04a-12df-4dad-941f-b193ceb216ca-0000225e Identity Data \n", + "1 00c6c04a-12df-4dad-941f-b193ceb216ca-0000225e Identity Data \n", + "2 00c6c04a-12df-4dad-941f-b193ceb216ca-0000225e IFC Parameters \n", + "3 00c6c04a-12df-4dad-941f-b193ceb216ca-0000225e IFC Parameters \n", + "4 00c6c04a-12df-4dad-941f-b193ceb216ca-0000225e IFC Parameters \n", + "5 00c6c04a-12df-4dad-941f-b193ceb216ca-0000225e IFC Parameters \n", + "6 00c6c04a-12df-4dad-941f-b193ceb216ca-0000225e Identity Data \n", + "7 00c6c04a-12df-4dad-941f-b193ceb216ca-0000225e Identity Data \n", + "8 00c6c04a-12df-4dad-941f-b193ceb216ca-0000225e Identity Data \n", + "9 00c6c04a-12df-4dad-941f-b193ceb216ca-0000225e Identity Data \n", + "10 00c6c04a-12df-4dad-941f-b193ceb216ca-0000225e Identity Data \n", + "11 00c6c04a-12df-4dad-941f-b193ceb216ca-0000225e Identity Data \n", + "12 00c6c04a-12df-4dad-941f-b193ceb216ca-0000225e Identity Data \n", + "13 00c6c04a-12df-4dad-941f-b193ceb216ca-0000225e Identity Data \n", + "14 00c6c04a-12df-4dad-941f-b193ceb216ca-0000225e Identity Data \n", + "15 00c6c04a-12df-4dad-941f-b193ceb216ca-0000225e Materials and Finishes \n", + "16 00c6c04a-12df-4dad-941f-b193ceb216ca-0000225e Materials and Finishes \n", + "17 00c6c04a-12df-4dad-941f-b193ceb216ca-0000225e Materials and Finishes \n", + "18 00c6c04a-12df-4dad-941f-b193ceb216ca-0000225e Materials and Finishes \n", + "19 00c6c04a-12df-4dad-941f-b193ceb216ca-0000225e Materials and Finishes \n", + "\n", + " display_name value \n", + "0 Image \n", + "1 Keynote \n", + "2 Export to IFC By Type \n", + "3 Export to IFC As \n", + "4 IFC Predefined Type \n", + "5 IfcGUID 00ni1A4jzDhPGViPFEiZIK \n", + "6 Model \n", + "7 Manufacturer \n", + "8 Comments \n", + "9 URL \n", + "10 Description \n", + "11 Cost 0.0 \n", + "12 Mark \n", + "13 Workset Materials \n", + "14 Edited by \n", + "15 Name Phase - New \n", + "16 Color 5263440 \n", + "17 Transparency 0 \n", + "18 Glow 0.0 \n", + "19 Smoothness 50 " + ] }, - "execution_count": 16, + "execution_count": 13, "metadata": {}, "output_type": "execute_result" } @@ -425,7 +1163,7 @@ }, { "cell_type": "code", - "execution_count": 30, + "execution_count": 17, "id": "abcc0429f03c97bc", "metadata": { "ExecuteTime": { @@ -500,225 +1238,25 @@ " 17\n", " Color Fill Schema\n", " \n", - " \n", - " 42\n", - " Constraints\n", - " \n", - " \n", - " 34\n", - " Detail Items\n", - " \n", - " \n", - " 41\n", - " Dimensions\n", - " \n", - " \n", - " 56\n", - " Duct Accessories\n", - " \n", - " \n", - " 55\n", - " Duct Fittings\n", - " \n", - " \n", - " 51\n", - " Duct Systems\n", - " \n", - " \n", - " 52\n", - " Ducts\n", - " \n", - " \n", - " 23\n", - " Electrical Demand Factor Definitions\n", - " \n", - " \n", - " 57\n", - " Electrical Equipment\n", - " \n", - " \n", - " 28\n", - " Electrical Load Classification Parameter Element\n", - " \n", - " \n", - " 24\n", - " Electrical Load Classifications\n", - " \n", - " \n", - " 2\n", - " Elevations\n", - " \n", - " \n", - " 32\n", - " Generic Annotations\n", - " \n", - " \n", - " 45\n", - " Grids\n", - " \n", - " \n", - " 18\n", - " HVAC Load Schedules\n", - " \n", - " \n", - " 16\n", - " HVAC Zones\n", - " \n", - " \n", - " 13\n", - " Internal Origin\n", - " \n", - " \n", - " 31\n", - " Legend Components\n", - " \n", - " \n", - " 33\n", - " Lines\n", - " \n", - " \n", - " 47\n", - " Matchline\n", - " \n", - " \n", - " 29\n", - " Material Assets\n", - " \n", - " \n", - " 1\n", - " Materials\n", - " \n", - " \n", - " 58\n", - " Mechanical Equipment\n", - " \n", - " \n", - " 59\n", - " Mechanical Equipment Tags\n", - " \n", - " \n", - " 25\n", - " Panel Schedule Templates - Branch Panel\n", - " \n", - " \n", - " 26\n", - " Panel Schedule Templates - Data Panel\n", - " \n", - " \n", - " 27\n", - " Panel Schedule Templates - Switchboard\n", - " \n", - " \n", - " 6\n", - " Phases\n", - " \n", - " \n", - " 30\n", - " Pipe Segments\n", - " \n", - " \n", - " 60\n", - " Pipes\n", - " \n", - " \n", - " 62\n", - " Piping Systems\n", - " \n", - " \n", - " 4\n", - " Primary Contours\n", - " \n", - " \n", - " 22\n", - " Project Base Point\n", - " \n", - " \n", - " 10\n", - " Project Information\n", - " \n", - " \n", - " 48\n", - " RVT Links\n", - " \n", - " \n", - " 9\n", - " Revision\n", - " \n", - " \n", - " 44\n", - " Revision Numbering Sequences\n", - " \n", - " \n", - " 50\n", - " Room Tags\n", - " \n", - " \n", - " 36\n", - " Rooms\n", - " \n", - " \n", - " 63\n", - " Schedule Graphics\n", - " \n", " \n", "\n", "" ], "text/plain": [ - " category\n", - "0 \n", - "35 \n", - "53 Air Terminals\n", - "5 Area Schemes\n", - "43 Automatic Sketch Dimensions\n", - "19 Building Type Settings\n", - "14 Cameras\n", - "61 Center Line\n", - "54 Center line\n", - "17 Color Fill Schema\n", - "42 Constraints\n", - "34 Detail Items\n", - "41 Dimensions\n", - "56 Duct Accessories\n", - "55 Duct Fittings\n", - "51 Duct Systems\n", - "52 Ducts\n", - "23 Electrical Demand Factor Definitions\n", - "57 Electrical Equipment\n", - "28 Electrical Load Classification Parameter Element\n", - "24 Electrical Load Classifications\n", - "2 Elevations\n", - "32 Generic Annotations\n", - "45 Grids\n", - "18 HVAC Load Schedules\n", - "16 HVAC Zones\n", - "13 Internal Origin\n", - "31 Legend Components\n", - "33 Lines\n", - "47 Matchline\n", - "29 Material Assets\n", - "1 Materials\n", - "58 Mechanical Equipment\n", - "59 Mechanical Equipment Tags\n", - "25 Panel Schedule Templates - Branch Panel\n", - "26 Panel Schedule Templates - Data Panel\n", - "27 Panel Schedule Templates - Switchboard\n", - "6 Phases\n", - "30 Pipe Segments\n", - "60 Pipes\n", - "62 Piping Systems\n", - "4 Primary Contours\n", - "22 Project Base Point\n", - "10 Project Information\n", - "48 RVT Links\n", - "9 Revision\n", - "44 Revision Numbering Sequences\n", - "50 Room Tags\n", - "36 Rooms\n", - "63 Schedule Graphics" + " category\n", + "0 \n", + "35 \n", + "53 Air Terminals\n", + "5 Area Schemes\n", + "43 Automatic Sketch Dimensions\n", + "19 Building Type Settings\n", + "14 Cameras\n", + "61 Center Line\n", + "54 Center line\n", + "17 Color Fill Schema" ] }, - "execution_count": 30, + "execution_count": 17, "metadata": {}, "output_type": "execute_result" } @@ -733,39 +1271,61 @@ "JOIN _objects_val ON _objects_eav.value_id = _objects_val.id\n", "WHERE _objects_attr.name LIKE '_RC';\n", "\"\"\"\n", - "df_categories = pd.read_sql_query(query, conn)\n", + "df_categories = db.execute_query(query)\n", "# get unique values from the category column\n", "categories = df_categories['value'].unique()\n", "# create a dataframe for categories\n", "df_categories = pd.DataFrame(categories, columns=['category'])\n", "df_categories.head(50)\n", "df_categories.sort_values(by=['category'], inplace=True)\n", - "df_categories.head(50)" + "df_categories.head(10)" ] }, { "cell_type": "code", - "execution_count": 17, + "execution_count": 18, "id": "f76405da8eb798b3", "metadata": { - "collapsed": false, "ExecuteTime": { "end_time": "2024-03-03T03:12:20.632392Z", "start_time": "2024-03-03T03:12:20.422246Z" - } + }, + "collapsed": false }, "outputs": [ { "data": { - "text/plain": "array(['', 'Materials', 'Elevations', 'Views', 'Primary Contours',\n 'Area Schemes', 'Phases', 'Shared Site', 'Work Plane Grid',\n 'Revision', 'Project Information', 'Structural Load Cases',\n 'Sun Path', 'Internal Origin', 'Cameras', 'Section Boxes',\n 'HVAC Zones', 'Color Fill Schema', 'HVAC Load Schedules',\n 'Building Type Settings', 'Space Type Settings', 'Survey Point',\n 'Project Base Point', 'Electrical Demand Factor Definitions',\n 'Electrical Load Classifications',\n 'Panel Schedule Templates - Branch Panel',\n 'Panel Schedule Templates - Data Panel',\n 'Panel Schedule Templates - Switchboard',\n 'Electrical Load Classification Parameter Element',\n 'Material Assets', 'Pipe Segments', 'Legend Components',\n 'Generic Annotations', 'Lines', 'Detail Items', '',\n 'Rooms', 'Spaces', 'Title Blocks', 'Schedules', 'Text Notes',\n 'Dimensions', 'Constraints', 'Automatic Sketch Dimensions',\n 'Revision Numbering Sequences', 'Grids', 'Scope Boxes',\n 'Matchline', 'RVT Links', 'Viewports', 'Room Tags', 'Duct Systems',\n 'Ducts', 'Air Terminals', 'Center line', 'Duct Fittings',\n 'Duct Accessories', 'Electrical Equipment', 'Mechanical Equipment',\n 'Mechanical Equipment Tags', 'Pipes', 'Center Line',\n 'Piping Systems', 'Schedule Graphics'], dtype=object)" + "text/plain": [ + "array(['', 'Materials', 'Elevations', 'Views', 'Primary Contours',\n", + " 'Area Schemes', 'Phases', 'Shared Site', 'Work Plane Grid',\n", + " 'Revision', 'Project Information', 'Structural Load Cases',\n", + " 'Sun Path', 'Internal Origin', 'Cameras', 'Section Boxes',\n", + " 'HVAC Zones', 'Color Fill Schema', 'HVAC Load Schedules',\n", + " 'Building Type Settings', 'Space Type Settings', 'Survey Point',\n", + " 'Project Base Point', 'Electrical Demand Factor Definitions',\n", + " 'Electrical Load Classifications',\n", + " 'Panel Schedule Templates - Branch Panel',\n", + " 'Panel Schedule Templates - Data Panel',\n", + " 'Panel Schedule Templates - Switchboard',\n", + " 'Electrical Load Classification Parameter Element',\n", + " 'Material Assets', 'Pipe Segments', 'Legend Components',\n", + " 'Generic Annotations', 'Lines', 'Detail Items', '',\n", + " 'Rooms', 'Spaces', 'Title Blocks', 'Schedules', 'Text Notes',\n", + " 'Dimensions', 'Constraints', 'Automatic Sketch Dimensions',\n", + " 'Revision Numbering Sequences', 'Grids', 'Scope Boxes',\n", + " 'Matchline', 'RVT Links', 'Viewports', 'Room Tags', 'Duct Systems',\n", + " 'Ducts', 'Air Terminals', 'Center line', 'Duct Fittings',\n", + " 'Duct Accessories', 'Electrical Equipment', 'Mechanical Equipment',\n", + " 'Mechanical Equipment Tags', 'Pipes', 'Center Line',\n", + " 'Piping Systems', 'Schedule Graphics'], dtype=object)" + ] }, - "execution_count": 17, + "execution_count": 18, "metadata": {}, "output_type": "execute_result" } ], "source": [ - "conn = sqlite3.connect(db_file)\n", "# Define and execute the SQL query with JOIN statements\n", "query = \"\"\"\n", "SELECT _objects_id.external_id, _objects_attr.category,_objects_attr.display_name, _objects_val.value\n",