How to extract workbench project name and project directory from Mechanical scripting editor?

Rohith Patchigolla
Member, Moderator, Employee Posts: 242
✭✭✭✭
in Structures
How to extract workbench project name and project directory from Mechanical scripting editor?
Tagged:
0
Best Answer
-
Here is a script that can be used in Mechanical Scripting Editor.
import wbjn import os project_files_dir = wbjn.ExecuteCommand(ExtAPI, "returnValue(GetProjectDirectory())") project_wbjn_path = wbjn.ExecuteCommand(ExtAPI, "returnValue(GetProjectFile())") project_name = os.path.relpath(project_wbjn_path, project_files_dir)
0