Replies: 2 comments
-
Yes, AutoCAD is always changing it, I.e. during open file dialog and during commands. I think it’s out of reach. My guess Autodesk does this to attempt to resolve satellite .DLL files. If you are searching for files, there’s: The last one has an overload that sill start the search from a database location |
Beta Was this translation helpful? Give feedback.
-
It seems that this is not an important enough problem to seek a solution.
# sitecustomize.py
import os
import sys
from pathlib import Path
BASE_DIR = Path(__file__).parent
def main():
project_dir = BASE_DIR.parent.parent.parent
sys.path.insert(0, str(project_dir))
os._origin_cwd = str(project_dir)
main() the above code will add the project directory to |
Beta Was this translation helpful? Give feedback.
-
When importing modules (pyload),
cwd
is changed to the directory of this module. It would be useful to have a constant, defined during loading.arx
, which would store the originalcwd
, i.e. the directory from which Autocad was launched.Beta Was this translation helpful? Give feedback.
All reactions