HyperX.Scripting.Api
The HyperX C# Scripting Application Programming Interface
Loading...
Searching...
No Matches
HyperX.Scripting.Application Class Referencesealed
Inheritance diagram for HyperX.Scripting.Application:

Public Member Functions

 Application (UnitSystem unitSystem=UnitSystem.English, int? threadCount=null)
 Application constructor using ApplicationUnitSystem enum.
bool CheckDatabaseIsUpToDate (string databasePath)
 Returns true if the database version matches the version of this scripting API. Otherwise returns false.
void CloseDatabase (int delay=1)
 Close the currently open database if one exists.
SimpleStatus CompareDatabases (string outputPath, string originalDatabasePath, string modifiedDatabasePath, string originalProject=null, string modifiedProject=null, bool compareAssignableProperties=true, bool compareMaterialsFastenersAndRivets=true, bool compareProjectSetup=false)
ProjectInfo CopyProject (int projectId, string newName=null, bool copyDesignProperties=true, bool copyAnalysisProperties=true, bool copyLoadProperties=true, bool copyWorkingFolder=true)
 Copy a project.
void CreateDatabaseFromTemplate (string templateName, string newPath)
 Create a new database.
List< HyperXpertPointCreateHyperXpertPoints (HashSet< RunSetSpecifier > runSetSpecifiers, DoePlotMode plotMode, DoePointType pointType, bool generateVariabilityForLinked, bool filterNonGeometry)
 Create HyperXpert points based on specific run sets.
ProjectInfo CreateProject (string projectName=null)
 Create a Project.
ProjectDeletionStatus DeleteProject (string projectName)
void Dispose ()
 Dispose of the application. Should be explicitly called after the application is no longer needed unless the application is wrapped with a using clause.
Dictionary< int, AnalysisDefinitionGetAnalyses ()
 Get all Analysis Definitions in the database.
Dictionary< int, List< RunSet > > GetRunSetsByProject ()
 Gets a dictionary mapping ProjectId to a List of RunSets.
SimpleStatus ImportMaterialsFromExcel (string filePath, bool deletePlies=false, bool updateMaterialsInUseInOtherProjects=false)
 Import materials from an Excel spreadsheet. Returns true on successful import.
void Login (string userName, string password="")
 Login to the Scripting API with a specified username and password.
string Migrate (string databasePath)
 Migrate the database to the latest version.
void OpenDatabase (string databasePath)
 Open a database to manipulate with the API.
void PauseUpdates ()
 Pause the sending of updates as items are created. Once resumed, all updates will be processed.
void ResumeUpdates ()
 Resume the sending of updates. Any paused updates will be processed.
Project SelectProject (string projectName)
 Select the active project. Activating a project will deactivate the current project (if present).
SimpleStatus UnpackageProject (string sourcePackagePath, string destinationFolder=null, bool includeFemInputOutputFiles=true, bool includeWorkingFolder=true, bool includeLoadFiles=true, bool includeAdditionalFiles=true)
 Unpackage the source .hxp package into the destination folder.

Properties

Project ActiveProject [get]
 The currently active project.
AnalysisPropertyCol AnalysisProperties [get]
 Analysis Properties for this database.
Dictionary< BackdoorFlagId, BackdoorSettingBackdoorSettings [get]
static string CompilationDate [get]
 Date that this version of the API was compiled.
string DatabasePath [get]
DesignPropertyCol DesignProperties [get]
 Design Properties for this database.
FailureModeCategoryCol FailureModeCategories [get]
FailureModeCol FailureModes [get]
FoamCol Foams [get]
 Contains all foam materials.
HoneycombCol Honeycombs [get]
 Contains all honeycomb materials.
IsotropicCol Isotropics [get]
 Contains all isotropic materials.
LaminateFamilyCol LaminateFamilies [get]
 Contains all laminate families.
LaminateCol Laminates [get]
 Contains all laminate materials.
LoadPropertyCol LoadProperties [get]
 Load Properties for this database.
OrthotropicCol Orthotropics [get]
 Contains all orthotropic materials.
PackageManager PackageManager [get]
PluginPackageCol Packages [get]
ProjectInfoCol ProjectInfos [get]
 Contains all projects.
bool UiRunnerMode [get]
 True while the API is being used through the HyperX UI. Otherwise false.
UnitSystem UnitSystem [get]
string UserName = DbConstants.HyperSizerAdminUserName [get, set]
static string Version = HyperSizerApp.VersionText [get]
 Get the current HyperX version number.

Events

Action< string > MessageLog

Detailed Description

HyperX scripting application.

This API is not guaranteed to be thread-safe. Calls into a single application instance or its descendents are not safe to be called concurrently.

However, it is safe enough for integration testing to have multiple application instances with a single process.

Constructor & Destructor Documentation

◆ Application()

HyperX.Scripting.Application.Application ( UnitSystem unitSystem = UnitSystem::English,
int? threadCount = null )

Application constructor using ApplicationUnitSystem enum.

Parameters
unitSystemSpecify ApplicationUnitSystem.English or ApplicationUnitSystem.SI as the unit system to be used.

Member Function Documentation

◆ CheckDatabaseIsUpToDate()

bool HyperX.Scripting.Application.CheckDatabaseIsUpToDate ( string databasePath)

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

◆ CloseDatabase()

void HyperX.Scripting.Application.CloseDatabase ( int delay = 1)

Close the currently open database if one exists.

Parameters
delayDelay closing the connection for this many seconds.

◆ CompareDatabases()

SimpleStatus HyperX.Scripting.Application.CompareDatabases ( string outputPath,
string originalDatabasePath,
string modifiedDatabasePath,
string originalProject = null,
string modifiedProject = null,
bool compareAssignableProperties = true,
bool compareMaterialsFastenersAndRivets = true,
bool compareProjectSetup = false )

◆ CopyProject()

ProjectInfo HyperX.Scripting.Application.CopyProject ( int projectId,
string newName = null,
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()

void HyperX.Scripting.Application.CreateDatabaseFromTemplate ( string templateName,
string 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.Scripting.Application.CreateHyperXpertPoints ( HashSet< RunSetSpecifier > runSetSpecifiers,
DoePlotMode plotMode,
DoePointType pointType,
bool generateVariabilityForLinked,
bool filterNonGeometry )

Create HyperXpert points based on specific run sets.

◆ CreateProject()

ProjectInfo HyperX.Scripting.Application.CreateProject ( string projectName = null)

Create a Project.

Parameters
projectName
Returns
The ProjectInfo for the created Project.

◆ DeleteProject()

ProjectDeletionStatus HyperX.Scripting.Application.DeleteProject ( string projectName)

◆ Dispose()

void HyperX.Scripting.Application.Dispose ( )

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()

Dictionary< int, AnalysisDefinition > HyperX.Scripting.Application.GetAnalyses ( )

Get all Analysis Definitions in the database.

◆ GetRunSetsByProject()

Dictionary< int, List< RunSet > > HyperX.Scripting.Application.GetRunSetsByProject ( )

Gets a dictionary mapping ProjectId to a List of RunSets.

◆ ImportMaterialsFromExcel()

SimpleStatus HyperX.Scripting.Application.ImportMaterialsFromExcel ( string filePath,
bool deletePlies = false,
bool updateMaterialsInUseInOtherProjects = false )

Import materials from an Excel spreadsheet. Returns true on successful import.

Parameters
filePath
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.
Returns

◆ Login()

void HyperX.Scripting.Application.Login ( string userName,
string password = "" )

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

Parameters
userNameUsername to login with.
passwordPassword to log in with

◆ Migrate()

string HyperX.Scripting.Application.Migrate ( string databasePath)

Migrate the database to the latest version.

Returns
File path to the new database file

◆ OpenDatabase()

void HyperX.Scripting.Application.OpenDatabase ( string databasePath)

Open a database to manipulate with the API.

Parameters
databasePathFile path to the DB.

◆ PauseUpdates()

void HyperX.Scripting.Application.PauseUpdates ( )

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

◆ ResumeUpdates()

void HyperX.Scripting.Application.ResumeUpdates ( )

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

◆ SelectProject()

Project HyperX.Scripting.Application.SelectProject ( string projectName)

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

◆ UnpackageProject()

SimpleStatus HyperX.Scripting.Application.UnpackageProject ( string sourcePackagePath,
string destinationFolder = null,
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.

Parameters
sourcePackagePath
destinationFolder
includeFemInputOutputFiles
includeWorkingFolder
includeLoadFiles
includeAdditionalFiles
Returns

Property Documentation

◆ ActiveProject

Project HyperX.Scripting.Application.ActiveProject
get

The currently active project.

Only one project is ever active at a time.

◆ AnalysisProperties

AnalysisPropertyCol HyperX.Scripting.Application.AnalysisProperties
get

Analysis Properties for this database.

◆ BackdoorSettings

Dictionary<BackdoorFlagId, BackdoorSetting> HyperX.Scripting.Application.BackdoorSettings
get

◆ CompilationDate

string HyperX.Scripting.Application.CompilationDate
staticget

Date that this version of the API was compiled.

◆ DatabasePath

string HyperX.Scripting.Application.DatabasePath
get

◆ DesignProperties

DesignPropertyCol HyperX.Scripting.Application.DesignProperties
get

Design Properties for this database.

◆ FailureModeCategories

FailureModeCategoryCol HyperX.Scripting.Application.FailureModeCategories
get

◆ FailureModes

FailureModeCol HyperX.Scripting.Application.FailureModes
get

◆ Foams

FoamCol HyperX.Scripting.Application.Foams
get

Contains all foam materials.

◆ Honeycombs

HoneycombCol HyperX.Scripting.Application.Honeycombs
get

Contains all honeycomb materials.

◆ Isotropics

IsotropicCol HyperX.Scripting.Application.Isotropics
get

Contains all isotropic materials.

◆ LaminateFamilies

LaminateFamilyCol HyperX.Scripting.Application.LaminateFamilies
get

Contains all laminate families.

◆ Laminates

LaminateCol HyperX.Scripting.Application.Laminates
get

Contains all laminate materials.

◆ LoadProperties

LoadPropertyCol HyperX.Scripting.Application.LoadProperties
get

Load Properties for this database.

◆ Orthotropics

OrthotropicCol HyperX.Scripting.Application.Orthotropics
get

Contains all orthotropic materials.

◆ PackageManager

PackageManager HyperX.Scripting.Application.PackageManager
get

◆ Packages

PluginPackageCol HyperX.Scripting.Application.Packages
get

◆ ProjectInfos

ProjectInfoCol HyperX.Scripting.Application.ProjectInfos
get

Contains all projects.

◆ UiRunnerMode

bool HyperX.Scripting.Application.UiRunnerMode
get

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

◆ UnitSystem

UnitSystem HyperX.Scripting.Application.UnitSystem
get

◆ UserName

string HyperX.Scripting.Application.UserName = DbConstants.HyperSizerAdminUserName
getset

◆ Version

string HyperX.Scripting.Application.Version = HyperSizerApp.VersionText
staticget

Get the current HyperX version number.

Event Documentation

◆ MessageLog

Action<string> HyperX.Scripting.Application.MessageLog

The documentation for this class was generated from the following file: