1
- # -*- coding: utf-8 -*-
2
- from __future__ import absolute_import
3
1
from ._utils import lib , codec , CheckForError , get_string , get_string_array
4
2
5
3
@@ -124,10 +122,12 @@ def LegacyModels(*args):
124
122
or contact the authors from DSS Extensions: https://github.com/dss-extensions/
125
123
126
124
After toggling LegacyModels, run a "clear" command and the models will be loaded accordingly.
127
- Defaults to False.
125
+ Defaults to False.
128
126
129
127
This can also be enabled by setting the environment variable DSS_CAPI_LEGACY_MODELS to 1.
130
128
129
+ NOTE: this option will be removed in a future release.
130
+
131
131
(API Extension)
132
132
"""
133
133
# Getter
@@ -136,7 +136,31 @@ def LegacyModels(*args):
136
136
137
137
# Setter
138
138
Value , = args
139
- return CheckForError (lib .DSS_Set_LegacyModels (Value ))
139
+ CheckForError (lib .DSS_Set_LegacyModels (Value ))
140
+
141
+
142
+ def AllowChangeDir (* args ):
143
+ """
144
+ If disabled, the engine will not change the active working directory during execution. E.g. a "compile"
145
+ command will not "chdir" to the file path.
146
+
147
+ If you have issues with long paths, enabling this might help in some scenarios.
148
+
149
+ Defaults to True (allow changes, backwards compatible) in the 0.10.x versions of DSS C-API.
150
+ This might change to False in future versions.
151
+
152
+ This can also be set through the environment variable DSS_CAPI_ALLOW_CHANGE_DIR. Set it to 0 to
153
+ disallow changing the active working directory.
154
+
155
+ (API Extension)
156
+ """
157
+ # Getter
158
+ if len (args ) == 0 :
159
+ return CheckForError (lib .DSS_Get_AllowChangeDir ()) != 0
160
+
161
+ # Setter
162
+ Value , = args
163
+ CheckForError (lib .DSS_Set_AllowChangeDir (Value ))
140
164
141
165
142
166
_columns = [
@@ -167,4 +191,5 @@ def LegacyModels(*args):
167
191
"NewCircuit" ,
168
192
"AllowEditor" ,
169
193
"LegacyModels" ,
194
+ "AllowChangeDir" ,
170
195
]
0 commit comments