TAGGED: scripting, spaceclaim, spaceclaim-python-scripting
-
-
March 16, 2022 at 7:24 pm
emarkowski
SubscriberIs there a way to get the path to a SpaceClaim API script within the script while it is executing? I need to save data to a file that will be given using a relative path from the directory of the script.
The usual options for doing this with Python do not seem to work with the SpaceClaim API.
March 16, 2022 at 7:27 pmemarkowski
SubscriberFor example:
import os
script_dir = os.path.abspath(os.path.dirname(__file__))
Only returns a portion of the path, but stops short several directory levels from where the actual script file is located.
May 10, 2022 at 8:35 pmbarrooze
SubscriberI had tried doing this as well but was unsuccessful. I think SpaceClaim internally digests the script, which removes any traceability back to the original script file. Sorry I can't be of more help.
Viewing 2 reply threads- You must be logged in to reply to this topic.
Ansys Innovation SpaceBoost Ansys Fluent Simulations with AWS
Computational Fluid Dynamics (CFD) helps engineers design products in which the flow of fluid components is a significant challenge. These different use cases often require large complex models to solve on a traditional workstation. Click here to join this event to learn how to leverage Ansys Fluids on the cloud, thanks to Ansys Gateway powered by AWS.Â
Earth Rescue – An Ansys Online Series
The climate crisis is here. But so is the human ingenuity to fight it. Earth Rescue reveals what visionary companies are doing today to engineer radical new ideas in the fight against climate change. Click here to watch the first episode.
Ansys Blog
Subscribe to the Ansys Blog to get great new content about the power of simulation delivered right to your email on a weekly basis. With content from Ansys experts, partners and customers you will learn about product development advances, thought leadership and trends and tips to better use Ansys tools. Sign up here.
Trending discussions- How to work with STL file?
- Rotate tool in ANSYS Design Modeler
- section plane
- Using Symmetry in DesignModeler and Expanding the Results
- ANSYS FLUENT – Operation would result in non manifold bodies
- drawing a geometry by importing a table of points
- material properties
- Coordinates orientation
- “contact pair has no element in it.” how to resolve this problem
- Parameters not imported into Workbench 18.2 from Solidworks/Inventor
Top Contributors-
8754
-
4658
-
3151
-
1678
-
1456
Top Rated Tags© 2023 Copyright ANSYS, Inc. All rights reserved.
Ansys does not support the usage of unauthorized Ansys software. Please visit www.ansys.com to obtain an official distribution.
-