T-FLEX DOCs Support Package
|
Page in progress. |
T-FLEX DOCs is a product Lifecycle Management (PLM) system developed by TOP SYSTEMS. It provides centralized storage, versioning, lifecycle management, and collaboration on project documentation, drawings, and 3D models.
The T-FLEX DOCs support package is designed to organize automated data exchange between computing tasks in Engee and calculation objects in T-FLEX DOCs. This allows you to create an end-to-end digital cycle: upload the source data for calculations from T-FLEX DOCs to Engee, perform calculations using Engee computing power and tools, and then upload the calculation results back to T-FLEX DOCs for further use, analysis, and version control.
Getting started with the T-FLEX DOCs Support Package at Engee
To start working with the T-FLEX DOCs support package in Engee, you must first configure T-FLEX DOCs and install the Engee subsystem.Integration.
-
Preparation of T-FLEX DOCs:
-
Download and unpack archive.
-
Import the reference books from the file into your T-FLEX DOCs database
Reference books for calculations.ddx. -
Import the macro to access T-FLEX DOCs from the file
Integration with Engee 1D Lite.ddx. -
Place the executable file
TflexDocsEngee.exeto the folderProgramyour installed version of T-FLEX DOCs.
-
-
Installation of the Engee subsystem.Integrations:
-
To install the hardware support package, run the client program and connect it to the Engee server, follow the instructions described in the article. Engee.Integration.
-
-
Import the T-FLEX DOCs support package and create an object: After connecting the Engee subsystem.Integration return to Engee and run the following command:
using Main.EngeeDeviceManager.Devices.TFLEXDOCSNext, create an object
TFLEXDOCS, which will be used to interact with the system:tdocs = TFLEXDOCS.Tflexdocs()
Basic methods of working with T-FLEX DOCs
The following methods are used to interact with the T-FLEX DOCs system:
-
TFLEXDOCS.start_work— initializes a session for working with T-FLEX DOCs. -
TFLEXDOCS.new_calculation— creates a new calculation object in T-FLEX DOCs. -
TFLEXDOCS.upload_files— uploads files with calculation results to the specified calculation object. -
TFLEXDOCS.download_files— downloads files with source data from the specified calculation object. -
TFLEXDOCS.stop_work— ends the session of working with T-FLEX DOCs.
Step-by-step example of working with T-FLEX DOCs
Let’s look at an example of a full work cycle: from creating a session and a calculation object to uploading data, performing calculations in Engee and uploading the results back to T-FLEX DOCs.
-
Create a session for working with T-FLEX DOCs — start the session, specifying paths if necessary. If no paths are specified, the default values will be used.
# Starting a session with default paths TFLEXDOCS.start_work(tdocs) # Alternative option with indication of paths # docs_path = raw"C:\Program Files (x86)\T-FLEX DOCs 18\Program" # exe_path = raw"C:\Program Files (x86)\T-FLEX DOCs 18\Program\TflexDocsEngee\TflexDocsEngee.exe" # TFLEXDOCS.start_work(tdocs, docs_path, exe_path) -
Create a new calculation object — create a new object with a name and description in T-FLEX DOCs.
TFLEXDOCS.new_calculation(tdocs, "new_calc", "Calculation for testing integration with Engee") -
Upload the source data for the calculation — get the files from the created calculation object. Before doing this, make sure that the necessary source data is placed in the calculation object in T-FLEX DOCs.
# Getting files from the calculation object "new_calc" download_files = TFLEXDOCS.download_files(tdocs, "new_calc") # A function for saving received files to the Engee working directory function prepare_files_for_engee(calc_files::Dict{String, Vector{UInt8}}) for (file_name, file_content) in calc_files write(file_name, file_content) end end # Saving files prepare_files_for_engee(download_files) -
Performing calculations — Use the uploaded files to perform the necessary calculations in Engee. In this example, the calculation is simulated.
# Simulation of calculation and result generation path = "results.txt" result_content = "" for i in 1:10 calculation_result = i * 100 / i^3 result_content *= string(calculation_result) * "\n" end # Writing the calculation result to a file write(path, result_content) -
Preparation and uploading of calculation results — Prepare the received result files and upload them back to the calculation object in T-FLEX DOCs.
# A function for preparing files to be sent to T-FLEX DOCs function prepare_files_for_docs(paths::Vector{String}) files_dict::Dict{String, Vector{UInt8}} = Dict() for path in paths file_content = read(path) base_name = basename(path) files_dict[base_name] = file_content end return files_dict end # Preparing the results file files_to_upload = prepare_files_for_docs([path]) # Uploading the results to the calculation object "new_calc" in T-FLEX DOCs TFLEXDOCS.upload_files(tdocs, files_to_upload, "new_calc") -
End of session — Close the session at the end of the work.
TFLEXDOCS.stop_work(tdocs)
Possible problems and their solutions
-
Initialization error — if the session does not start (
TFLEXDOCS.start_workcompletes with an error), then make sure of the following:-
Paths to the Program directory and executable file TflexDocsEngee.exe indicated correctly.
-
The TflexDocsEngee directory has been copied to the Program folder of the installed version of T-FLEX DOCs.
-
Necessary reference books (
.ddx-files) are imported into the project.
-
-
Calculation object not found — when calling
TFLEXDOCS.download_filesorTFLEXDOCS.upload_filesmake sure that the calculation object with the specified name exists in T-FLEX DOCs. -
Problems with file transfer — The T-FLEX DOCs support package expects files to be presented as a dictionary
Dict{String, Vector{UInt8}}, where the key is the file name, and the value is its contents in the form of an array of bytes. Make sure that your file preparation functions (prepare_files_for_engee,prepare_files_for_docs) convert the data correctly.