Compiling existing scripts in a later version of MASTA
As we make improvements to the MASTA API the names or locations of members might change. For example, in MASTA 11 the asymmetric gear functionality changed the location of
Gear.NormalPressureAngle: CylindricalGearSetDesign.NormalPressureAngle → CylindricalGearSetDesign.BothFlanks.NormalPressureAngle
The namespace of many FE-related types has been renamed:
SMT.MastaAPI.SystemModel.ImportedFEs → SMT.MastaAPI.SystemModel.FE
As part of the addition of the new SpaceClaim functionality MastaAPI and MastaAPIUtility assembly filenames have been renamed:
MastaAPI.dll → SMT.MastaAPI.11.0.dll
MastaAPIUtility.dll → SMT.MastaAPIUtility.11.0.dll
A script that worked when referencing the previous version of MASTA might not compile against the current version. To solve these problems, we have added functionality that enables scripts running in the current version of MASTA to target previous versions of the MASTA API.
.NET
User Defined Properties (.NET)
Scripted properties targeting a previous version of the MASTA API are automatically compiled and run in MASTA. No extra configuration is required.
Standalone Scripts (.NET)
Standalone scripts that target MASTA 11 should reference SMT.MastaAPI.11.0.dll and SMT.MastaAPIUtility.11.0.dll located in the MASTA 11 installation directory. Standalone scripts targeting a previous version of the MASTA API will need to reference MastaAPI.dll and MastaAPIUtility.dll in the MASTA 11 installation directory.
Python
User Defined Properties (Python)
MASTA will load and run scripted properties against the version of mastapy installed in the active python environment. This means that it is not possible to import user defined properties that target different versions of mastapy.
Standalone Scripts (Python)
Standalone Python scripts that target a previous version of mastapy need to pass in the path to MASTA 11 installation directory when calling mastapy.init(). The active Python environment should have the required version of mastapy installed.