Python Script Limitations
These are the limitations when using Python scripting extensions and the script editor.
External Module Operation Guarantees
The operation of Python's standard modules and external modules (packages installed with pip, etc.) is not guaranteed.
Unavailable Namespaces
Types belonging to the following namespaces, and APIs that take these types as arguments, are not available in Python.
NextDesign.Core.EditingCapabilitiesNextDesign.Desktop.CustomUINextDesign.Desktop.DocumentGeneratorNextDesign.Extension
Unavailable Asynchronous Methods
The following asynchronous methods are unavailable because they are not compatible with Python versions that can define asynchronous operations.
IAsyncValidateContext.ValidateAsync()
Overloaded Methods Requiring Caution
Overloaded methods that have the same number and type order of arguments, but with different types for the IEnumerable enumerators, cannot be used directly due to misinterpretation of the enumerator type.
Affected Methods:
-
IModel.IsIn(IEnumerable<string> classNames, bool fuzzy = true) -
IModel.AsIn(IEnumerable<string> classNames, bool fuzzy = true) -
IWorkspace.LoadModelUnits(IProject project, IEnumerable<string> unitFilePaths)
Workaround:
Explicitly specify argument names and default arguments.
# NG: Misinterpreting the enumerator type
result = model.IsIn(["ClassNameA", "ClassNameB"], True)
# OK: Explicitly specifying argument names
result = model.IsIn(classNames=["ClassNameA", "ClassNameB"], fuzzy=True)