HyperX.Scripting.Python.Api
The HyperX Scripting Library for Python
Loading...
Searching...
No Matches
hyperx.api.Application Class Reference

Public Member Functions

 __init__ (self, _api.Application application)
bool CheckDatabaseIsUpToDate (self, str databasePath)
 Returns true if the database version matches the version of this scripting API.
None CloseDatabase (self, int delay=1)
 Close the currently open database if one exists.
types.SimpleStatus CompareDatabases (self, str outputPath, str originalDatabasePath, str modifiedDatabasePath, str originalProject=None, str modifiedProject=None, bool compareAssignableProperties=True, bool compareMaterialsFastenersAndRivets=True, bool compareProjectSetup=False)
str CompilationDate (self)
 Date that this version of the API was compiled.
ProjectInfo CopyProject (self, int projectId, str newName=None, bool copyDesignProperties=True, bool copyAnalysisProperties=True, bool copyLoadProperties=True, bool copyWorkingFolder=True)
 Copy a project.
None CreateDatabaseFromTemplate (self, str templateName, str newPath)
 Create a new database.
list[HyperXpertPointCreateHyperXpertPoints (self, set[RunSetSpecifier] runSetSpecifiers, types.DoePlotMode plotMode, types.DoePointType pointType, bool generateVariabilityForLinked, bool filterNonGeometry)
 Create HyperXpert points based on specific run sets.
ProjectInfo CreateProject (self, str projectName=None)
 Create a Project.
ProjectDeletionStatus DeleteProject (self, str projectName)
None Dispose (self)
 Dispose of the application.
dict[int, AnalysisDefinitionGetAnalyses (self)
 Get all Analysis Definitions in the database.
dict[int, list[RunSet]] GetRunSetsByProject (self)
 Gets a dictionary mapping ProjectId to a List of RunSets.
types.SimpleStatus ImportMaterialsFromExcel (self, str filePath, bool deletePlies=False, bool updateMaterialsInUseInOtherProjects=False)
 Import materials from an Excel spreadsheet.
None Login (self, str userName, str password="")
 Login to the Scripting API with a specified username and password.
str Migrate (self, str databasePath)
 Migrate the database to the latest version.
None OpenDatabase (self, str databasePath)
 Open a database to manipulate with the API.
None PauseUpdates (self)
 Pause the sending of updates as items are created.Once resumed, all updates will be processed.
None ResumeUpdates (self)
 Resume the sending of updates.Any paused updates will be processed.
Project SelectProject (self, str projectName)
 Select the active project.
types.SimpleStatus UnpackageProject (self, str sourcePackagePath, str destinationFolder=None, bool includeFemInputOutputFiles=True, bool includeWorkingFolder=True, bool includeLoadFiles=True, bool includeAdditionalFiles=True)
 Unpackage the source .hxp package into the destination folder.
str Version (self)
 Get the current HyperX version number.

Protected Attributes

 _Entity = application._Entity

Static Protected Attributes

 _PackageManager
 _UnitSystem

Properties

 ActiveProject = property
 The currently active project.
 AnalysisProperties = property
 Analysis Properties for this database.
 BackdoorSettings = property
 DatabasePath = property
 DesignProperties = property
 Design Properties for this database.
 FailureModeCategories = property
 FailureModes = property
 Foams = property
 Contains all foam materials.
 Honeycombs = property
 Contains all honeycomb materials.
 Isotropics = property
 Contains all isotropic materials.
 LaminateFamilies = property
 Contains all laminate families.
 Laminates = property
 Contains all laminate materials.
 LoadProperties = property
 Load Properties for this database.
 Orthotropics = property
 Contains all orthotropic materials.
 PackageManager = property
 Packages = property
 ProjectInfos = property
 Contains all projects.
 UiRunnerMode = property
 True while the API is being used through the HyperX UI.
 UnitSystem = property
 UserName = property

Constructor & Destructor Documentation

◆ __init__()

hyperx.api.Application.__init__ ( self,
_api.Application application )

Member Function Documentation

◆ CheckDatabaseIsUpToDate()

bool hyperx.api.Application.CheckDatabaseIsUpToDate ( self,
str databasePath )

Returns true if the database version matches the version of this scripting API.

Otherwise returns false.

◆ CloseDatabase()

None hyperx.api.Application.CloseDatabase ( self,
int delay = 1 )

Close the currently open database if one exists.

Parameters
delayDelay closing the connection for this many seconds.

◆ CompareDatabases()

types.SimpleStatus hyperx.api.Application.CompareDatabases ( self,
str outputPath,
str originalDatabasePath,
str modifiedDatabasePath,
str originalProject = None,
str modifiedProject = None,
bool compareAssignableProperties = True,
bool compareMaterialsFastenersAndRivets = True,
bool compareProjectSetup = False )

◆ CompilationDate()

str hyperx.api.Application.CompilationDate ( self)

Date that this version of the API was compiled.

◆ CopyProject()

ProjectInfo hyperx.api.Application.CopyProject ( self,
int projectId,
str newName = None,
bool copyDesignProperties = True,
bool copyAnalysisProperties = True,
bool copyLoadProperties = True,
bool copyWorkingFolder = True )

Copy a project.

Parameters
projectIdId of the project to copy
newNameName for the new project
copyDesignPropertiesFlag indicating whether design properties should be copied in the new project
copyAnalysisPropertiesFlag indicating whether analysis properties should be copied in the new project
copyLoadPropertiesFlag indicating whether load properties should be copied in the new project
copyWorkingFolderFlag indicating whether working folder should be copied
Returns
The ProjectInfo for the copied project.

◆ CreateDatabaseFromTemplate()

None hyperx.api.Application.CreateDatabaseFromTemplate ( self,
str templateName,
str newPath )

Create a new database.

Parameters
templateNameThe name of the template to base this database on.
newPathThe path to the new database.

◆ CreateHyperXpertPoints()

list[HyperXpertPoint] hyperx.api.Application.CreateHyperXpertPoints ( self,
set[RunSetSpecifier] runSetSpecifiers,
types.DoePlotMode plotMode,
types.DoePointType pointType,
bool generateVariabilityForLinked,
bool filterNonGeometry )

Create HyperXpert points based on specific run sets.

◆ CreateProject()

ProjectInfo hyperx.api.Application.CreateProject ( self,
str projectName = None )

Create a Project.

Returns
The ProjectInfo for the created Project.

◆ DeleteProject()

ProjectDeletionStatus hyperx.api.Application.DeleteProject ( self,
str projectName )

◆ Dispose()

None hyperx.api.Application.Dispose ( self)

Dispose of the application.

Should be explicitly called after the application is no longer needed unless the application is wrapped with a using clause.

◆ GetAnalyses()

dict[int, AnalysisDefinition] hyperx.api.Application.GetAnalyses ( self)

Get all Analysis Definitions in the database.

◆ GetRunSetsByProject()

dict[int, list[RunSet]] hyperx.api.Application.GetRunSetsByProject ( self)

Gets a dictionary mapping ProjectId to a List of RunSets.

◆ ImportMaterialsFromExcel()

types.SimpleStatus hyperx.api.Application.ImportMaterialsFromExcel ( self,
str filePath,
bool deletePlies = False,
bool updateMaterialsInUseInOtherProjects = False )

Import materials from an Excel spreadsheet.

Returns true on successful import.

Parameters
deletePliesDetermines whether to update laminate or laminate families with changes that will delete plies in structures.
updateMaterialsInUseInOtherProjectsDetermines whether to update materials in use by projects outside the active project.

◆ Login()

None hyperx.api.Application.Login ( self,
str userName,
str password = "" )

Login to the Scripting API with a specified username and password.

Parameters
userNameUsername to login with.
passwordPassword to log in with

◆ Migrate()

str hyperx.api.Application.Migrate ( self,
str databasePath )

Migrate the database to the latest version.

Returns
File path to the new database file

◆ OpenDatabase()

None hyperx.api.Application.OpenDatabase ( self,
str databasePath )

Open a database to manipulate with the API.

Parameters
databasePathFile path to the DB.

◆ PauseUpdates()

None hyperx.api.Application.PauseUpdates ( self)

Pause the sending of updates as items are created.Once resumed, all updates will be processed.

◆ ResumeUpdates()

None hyperx.api.Application.ResumeUpdates ( self)

Resume the sending of updates.Any paused updates will be processed.

◆ SelectProject()

Project hyperx.api.Application.SelectProject ( self,
str projectName )

Select the active project.

Activating a project will deactivate the current project (if present).

◆ UnpackageProject()

types.SimpleStatus hyperx.api.Application.UnpackageProject ( self,
str sourcePackagePath,
str destinationFolder = None,
bool includeFemInputOutputFiles = True,
bool includeWorkingFolder = True,
bool includeLoadFiles = True,
bool includeAdditionalFiles = True )

Unpackage the source .hxp package into the destination folder.

The destination folder should be empty.

◆ Version()

str hyperx.api.Application.Version ( self)

Get the current HyperX version number.

Member Data Documentation

◆ _Entity

hyperx.api.Application._Entity = application._Entity
protected

◆ _PackageManager

hyperx.api.Application._PackageManager
staticprotected

◆ _UnitSystem

hyperx.api.Application._UnitSystem
staticprotected

Property Documentation

◆ ActiveProject

hyperx.api.Application.ActiveProject = property
static

The currently active project.

Only one project is ever active at a time.

◆ AnalysisProperties

hyperx.api.Application.AnalysisProperties = property
static

Analysis Properties for this database.

◆ BackdoorSettings

hyperx.api.Application.BackdoorSettings = property
static

◆ DatabasePath

hyperx.api.Application.DatabasePath = property
static

◆ DesignProperties

hyperx.api.Application.DesignProperties = property
static

Design Properties for this database.

◆ FailureModeCategories

hyperx.api.Application.FailureModeCategories = property
static

◆ FailureModes

hyperx.api.Application.FailureModes = property
static

◆ Foams

hyperx.api.Application.Foams = property
static

Contains all foam materials.

◆ Honeycombs

hyperx.api.Application.Honeycombs = property
static

Contains all honeycomb materials.

◆ Isotropics

hyperx.api.Application.Isotropics = property
static

Contains all isotropic materials.

◆ LaminateFamilies

hyperx.api.Application.LaminateFamilies = property
static

Contains all laminate families.

◆ Laminates

hyperx.api.Application.Laminates = property
static

Contains all laminate materials.

◆ LoadProperties

hyperx.api.Application.LoadProperties = property
static

Load Properties for this database.

◆ Orthotropics

hyperx.api.Application.Orthotropics = property
static

Contains all orthotropic materials.

◆ PackageManager

hyperx.api.Application.PackageManager = property
static

◆ Packages

hyperx.api.Application.Packages = property
static

◆ ProjectInfos

hyperx.api.Application.ProjectInfos = property
static

Contains all projects.

◆ UiRunnerMode

hyperx.api.Application.UiRunnerMode = property
static

True while the API is being used through the HyperX UI.

Otherwise false.

◆ UnitSystem

hyperx.api.Application.UnitSystem = property
static

◆ UserName

hyperx.api.Application.UserName = property
static

The documentation for this class was generated from the following file:
  • C:/Dev/HyperX/HyperX/HyperX.Scripting.Wrapper/hyperx/api/__init__.py