{ "cells": [ { "cell_type": "markdown", "id": "aececd27", "metadata": { "papermill": { "duration": 0.001893, "end_time": "2026-03-19T15:26:32.071726", "exception": false, "start_time": "2026-03-19T15:26:32.069833", "status": "completed" }, "tags": [] }, "source": [ "(Composite Liner Example)=\n", "# Composite Liner Script Examples" ] }, { "cell_type": "markdown", "id": "8f03602b", "metadata": { "papermill": { "duration": 0.001626, "end_time": "2026-03-19T15:26:32.075637", "exception": false, "start_time": "2026-03-19T15:26:32.074011", "status": "completed" }, "tags": [] }, "source": [ "Download the [ExampleModel.fez](https://github.com/Rocscience/rs2-scripting/blob/main/docs/example_code/example_models/ExampleModel.fez) for this example." ] }, { "cell_type": "code", "execution_count": 1, "id": "efd68734", "metadata": { "execution": { "iopub.execute_input": "2026-03-19T15:26:32.081561Z", "iopub.status.busy": "2026-03-19T15:26:32.081107Z", "iopub.status.idle": "2026-03-19T15:26:43.178204Z", "shell.execute_reply": "2026-03-19T15:26:43.176385Z" }, "papermill": { "duration": 11.102234, "end_time": "2026-03-19T15:26:43.179840", "exception": false, "start_time": "2026-03-19T15:26:32.077606", "status": "completed" }, "tags": [] }, "outputs": [], "source": [ "from rs2.modeler.RS2Modeler import RS2Modeler\n", "from rs2.modeler.properties.PropertyEnums import *\n", "import os\n", "\n", "current_dir = os.path.dirname(os.path.abspath(\"\")) \n", "RS2Modeler.startApplication(port=60055)\n", "modeler = RS2Modeler(port=60055)\n", "\n", "model = modeler.openFile(rf\"{current_dir}\\example_models\\ExampleModel.fez\")\n", "\n", "composite = model.getAllCompositeLinerProperties()[0]\n", "\n", "composite.setCompositeName(\"Example Composite 1\")\n", "composite.setNumberOfLayers(3)\n", "\n", "composite.setCompositeLinerPropertyByName(1, \"Liner 2\")\n", "composite.setCompositeLinerPropertyByName(2, \"Liner 3\")\n", "composite.setCompositeLinerPropertyByName(3, \"Liner 5\")\n", "\n", "composite.setInstallDelay(2, 2)\n", "composite.setInstallDelay(3, 1)\n", "\n", "composite.setRemovedStage(1, 1)\n", "composite.setRemovedStage(2, 2)\n", "composite.setRemovedStage(3, -1)\n", "\n", "composite.setJointApplied(True)\n", "composite.setCompositeJointPropertyByName(\"Joint 5\")\n", "composite.setJointPlacement(CompositeJointPlacementTypes.BETWEEN_THIRD_AND_FOURTH_LINER)\n", "\n", "model.close()\n", "modeler.closeProgram()" ] } ], "metadata": { "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.13.0" }, "papermill": { "default_parameters": {}, "duration": 15.220036, "end_time": "2026-03-19T15:26:45.984983", "environment_variables": {}, "exception": null, "input_path": "C:\\Users\\GraceHu\\source\\repos\\RS2_Python_Client_Library\\docs\\example_code\\support\\composite_liner_script_examples.ipynb", "output_path": "C:\\Users\\GraceHu\\source\\repos\\RS2_Python_Client_Library\\docs\\example_code\\support\\composite_liner_script_examples.ipynb", "parameters": {}, "start_time": "2026-03-19T15:26:30.764947", "version": "2.6.0" } }, "nbformat": 4, "nbformat_minor": 5 }