Referencing scriptable extension using the command
Josef Behal
Member Posts: 22
**
Hi,
I would like to reference the script extension using the command. Is it possible to add specific extension directory path?
I would like to than load the extension using Extension.LoadExtension…
Tagged:
0
Best Answer
-
ScriptedExtensionLocation = r'C:\Users\lmkanner\Downloads\lin_stress_src\src'
ExtId = "0A0459A2-03BE-4F49-973C-A5459F65E58B".ToLower()
CurrentLocations = GetPreferenceValue('ACT_AdditionalExtensionsFolders')
UpdatedLocations = ScriptedExtensionLocation+';'+CurrentLocations
SetPreference('ACT_AdditionalExtensionsFolders', UpdatedLocations)
CleanProject()
Extensions.LoadExtension(Id=ExtId,Format="Scripted")Preference IDs can usually be found here:
{ANSYS Installation folder}\commonfiles\registry\winx64
In this example, ACT_AdditionalExtensionsFolders can be found in ACTPrefernces.xml in the above folder location.0
Answers
-
@AKD-Scripting-Team I think someone from this group would know the answer, Josef.
0 -
Great that is exactly what I need. Thank you.
0