NemAll_Python_Utility
Exposed utility classes and functions
Functions:
-
AnnotationLayoutDefinitionToJpeg–Converts a layout definition file to a JPEG image using the Annotation Layout Service.
-
CheckModuleLicence–Check for a module licence
-
ClearUnitTestDocument–Clear the document
-
EncryptString–ImportScript an encrypted PythonPart script
-
ExecuteAnnotationLayoutService–Processes the cloud layout based on the configuration provided in the JSON file.
-
GetExperienceTracker–Get the Experience Tracker instance
-
GetPluginNameHash– -
ImportScript–ImportScript an encrypted PythonPart script
-
InitReinfNormInterpreter– -
InitUnitTest–Initialize the unit test
-
IsExecutedByUnitTest–Check, whether the script is executed by a unit test
-
LoadSymbolForUnitTest–Load a symbol to the Array
-
ShowMessageBox–Overloaded function. See individual overloads.
-
SolvedAnnotationLayoutToJpeg–Converts solved layout definition file to a JPEG image using the Annotation Layout Service.
-
TraceDataBase– -
UninitUnitTest–Uninitialize the unit test
AnnotationLayoutDefinitionToJpeg
AnnotationLayoutDefinitionToJpeg(
layoutDefinitionFilePath: str, configurationFilePath: str
) -> ServiceResponseInfo
Converts a layout definition file to a JPEG image using the Annotation Layout Service. Returns ServiceResponseInfo containing the result status, HTTP code, reason phrase, and result file path.
CheckModuleLicence
Check for a module licence
Parameters:
-
moduleNumber(int) –Number of the module
Returns:
-
bool–Licence for the module available: True/False
EncryptString
ImportScript an encrypted PythonPart script
Parameters:
-
stringtoEncrypt(str) –Path of the file
-
pypName(str) –Name of the PythonPart
ExecuteAnnotationLayoutService
ExecuteAnnotationLayoutService(
layoutDefinitionFilePath: str, configurationFilePath: str
) -> ServiceResponseInfo
Processes the cloud layout based on the configuration provided in the JSON file. Returns ServiceResponseInfo containing the success status, status code, reason phrase, and result file path.
GetExperienceTracker
GetExperienceTracker() -> ExperienceTracker
Get the Experience Tracker instance
Returns:
-
ExperienceTracker–Experience Tracker instance
This function returns the Experience Tracker instance used by Allplan. If you want to use the Experience Tracker, you should use this function to get the instance.
ImportScript
ImportScript an encrypted PythonPart script
Parameters:
-
script(str) –Path of the file
-
global_dict(object) –File name
-
pypName(str) –Name of the PythonPart
InitUnitTest
InitUnitTest(loadResources: bool) -> DocumentAdapter
Initialize the unit test
Parameters:
-
loadResources(bool) –Load the resources
IsExecutedByUnitTest
Check, whether the script is executed by a unit test
Returns:
-
bool–Script is executed by a unit test: True/False
LoadSymbolForUnitTest
LoadSymbolForUnitTest(
file: str, clearDocument: bool, updateArchEleGeometry: bool = False
) -> BaseElementAdapterList
Load a symbol to the Array
Parameters:
-
file(str) –File name
-
clearDocument(bool) –Clear the document before symbol loading
-
updateArchEleGeometry(bool, default:False) –Update the geometry elements after load (e.g. adapts slabs to the planes
Returns:
-
BaseElementAdapterList–Created elements
ShowMessageBox
overloaded
Displays Message Box
Parameters:
-
text(str) –Message box text
-
flags(int) –Button flags dontAsk text number for the text that will be displayed when MB_DONOTASKAGAIN is used
Displays Message Box
Parameters:
-
dialogTitle(str) –Message box title
-
text(str) –Message box text
-
flags(int) –Button flags dontShowAgainText Text that will be displayed when MB_DONOTASKAGAIN is used
SolvedAnnotationLayoutToJpeg
SolvedAnnotationLayoutToJpeg(
layoutDefinitionFilePath: str, configurationFilePath: str
) -> ServiceResponseInfo
Converts solved layout definition file to a JPEG image using the Annotation Layout Service. Returns ServiceResponseInfo containing the result status, HTTP code, reason phrase, and result file path.