HyperX.Scripting.Api
The HyperX C# Scripting Application Programming Interface
Loading...
Searching...
No Matches
HyperX.Scripting.Project Class Referencesealed

Represents a HyperX project within a database. More...

Inheritance diagram for HyperX.Scripting.Project:

Public Member Functions

TernaryStatus AnalyzeZones (IEnumerable< int > zoneIds)
 Analyze a list of zones by ID.
TernaryStatus AnalyzeZones (IEnumerable< ZoneBase > zones=null)
 Analyze a list of zones.
Zone CreateNonFeaZone (FamilyCategory category, string name=null)
 Create a non-FEA zone by name and category.
void Dispose ()
void ExportCad (IEnumerable< int > cadIds, string filePath)
 Export CAD by Id.
void ExportCad (string filePath)
 Export all CAD for this project to a file.
void ExportFem (string destinationFolder)
bool FullRunSolverAnalysis (string inputFile=null, string outputFile=null, HashSet< int > zones=null, HashSet< int > sectionCuts=null, HashSet< int > panelSegments=null, int? nThreads=null)
 Run solver in analysis mode with the specified items targeted. Generates input file, runs solver, reads output. Returns true on success.
bool FullRunSolverSizing (string inputFile=null, string outputFile=null, HashSet< int > zones=null, HashSet< int > sectionCuts=null, HashSet< int > panelSegments=null, int? nThreads=null)
 Run solver in sizing mode with the specified items targeted. Generates input file, runs solver, reads output. Returns true on success.
string GenerateSolverAnalysisInputFile (string inputFile=null, HashSet< int > zones=null, HashSet< int > sectionCuts=null, HashSet< int > panelSegments=null)
 Generate analysis input file for solver with the specified items targeted. Returns filepath.
string GenerateSolverSizingInputFile (string inputFile=null, HashSet< int > zones=null, HashSet< int > sectionCuts=null, HashSet< int > panelSegments=null)
 Generate sizing input file for solver with the specified items targeted. Returns filepath.
string[] GetDashboardCompanies ()
 This method fetches an array of Dashboard company names that are available to the user who is currently logged in. The URL and authentication token are taken from the last Dashboard login made through HyperX.
string[] GetDashboardPrograms (string companyName)
 This method fetches an array of Dashboard program names that are available to the user who is currently logged in. The URL and authentication token are taken from the last Dashboard login made through HyperX.
string[] GetDashboardTags (string companyName)
 This method fetches an array of Dashboard tags that are available to the user who is currently logged in. The URL and authentication token are taken from the last Dashboard login made through HyperX.
HashSet< int > GetJointsWithoutResults (IEnumerable< Joint > joints)
 Given a list of joints, returns the ids of the joints that were passed in but did not have results. If the list of joints is not a subset of the joints passed into the previous joint sizing operation, a new sizing operation will be kicked off.
void ImportCad (string filePath)
 Import CAD from a file.
string ImportFeaResults (bool alwaysImport=false)
 Manually import design loads.
SimpleStatus PackageProject (string destinationFilePath, bool includeFemInputFiles=true, bool includeFemOutputFiles=true, bool includeWorkingFolder=true, bool includeLoadFiles=true, bool includePluginPackages=false, bool removeAllOtherProjects=false, bool deleteUnusedPropertiesAndMaterials=false, bool mapFemFilesToRelativePaths=true, IEnumerable< string > additionalFiles=null)
 Create a .hxp project package from the ActiveProject.
void RegeneratePfem ()
 Regenerates and displays the preview FEM. If running a script outside of the Script Runner, do not call this method.
void ReturnToUnusedFem (IEnumerable< int > zoneNumbers=null, IEnumerable< int > jointIds=null)
 Return zones to unused FEM or delete non-FEA zones.
bool RunSolver (string inputFile, string outputFile=null, int? nThreads=null)
 Run solver with pre-generated input file. Returns true on success.
void SetFemFormat (ProjectModelFormat femFormat)
SetUnitsStatus SetFemUnits (DbForceUnit femForceId, DbLengthUnit femLengthId, DbMassUnit femMassId, DbTemperatureUnit femTemperatureId)
SimpleStatus SizeJoints (IEnumerable< Joint > joints=null)
 Size a list of joints.
TernaryStatus SizeZones (IEnumerable< int > zoneIds)
 Size a list of zones by ID.
TernaryStatus SizeZones (IEnumerable< ZoneBase > zones=null)
 Size a list of zones.
async Task UnimportFemAsync ()
SimpleStatus Upload (string uploadSetName, string company, string program, IEnumerable< string > tags, string notes, HashSet< int > zoneIds, HashSet< int > jointIds)
 Does some checks to make sure the given parameters are valid, then uploads the given zones and joints to the Dashboard. The URL and authentication token are taken from the last Dashboard login made through HyperX.

Properties

AnalysisPropertyCol AnalysisProperties [get]
 Analysis Properties for this project.
ZoneCol Beams [get]
DesignLoadCol DesignLoads [get]
DesignPropertyCol DesignProperties [get]
 Design properties for this project.
DiscreteFieldCol DiscreteFieldTables [get]
FemDataSet FemDataSet [get]
ProjectModelFormat FemFormat [get]
HyperFea HyperFea [get]
int Id [get]
JointCol Joints [get]
LoadPropertyCol LoadProperties [get]
 Load Properties for this project.
string Name [get]
ZoneCol Panels [get]
PanelSegmentCol PanelSegments [get]
RundeckCol Rundecks [get]
SectionCutCol SectionCuts [get]
SetCol Sets [get]
StructureCol Structures [get]
string WorkingFolder [get]
ZoneCol Zones [get]

Detailed Description

Represents a HyperX project within a database.

Member Function Documentation

◆ AnalyzeZones() [1/2]

TernaryStatus HyperX.Scripting.Project.AnalyzeZones ( IEnumerable< int > zoneIds)

Analyze a list of zones by ID.

Marked as success if sizing completes normally or with warnings.

◆ AnalyzeZones() [2/2]

TernaryStatus HyperX.Scripting.Project.AnalyzeZones ( IEnumerable< ZoneBase > zones = null)

Analyze a list of zones.

Marked as success if sizing completes normally or with warnings.

◆ CreateNonFeaZone()

Zone HyperX.Scripting.Project.CreateNonFeaZone ( FamilyCategory category,
string name = null )

Create a non-FEA zone by name and category.

Parameters
category
name
Returns

◆ Dispose()

void HyperX.Scripting.Project.Dispose ( )

◆ ExportCad() [1/2]

void HyperX.Scripting.Project.ExportCad ( IEnumerable< int > cadIds,
string filePath )

Export CAD by Id.

◆ ExportCad() [2/2]

void HyperX.Scripting.Project.ExportCad ( string filePath)

Export all CAD for this project to a file.

◆ ExportFem()

void HyperX.Scripting.Project.ExportFem ( string destinationFolder)

◆ FullRunSolverAnalysis()

bool HyperX.Scripting.Project.FullRunSolverAnalysis ( string inputFile = null,
string outputFile = null,
HashSet< int > zones = null,
HashSet< int > sectionCuts = null,
HashSet< int > panelSegments = null,
int? nThreads = null )

Run solver in analysis mode with the specified items targeted. Generates input file, runs solver, reads output. Returns true on success.

Parameters
inputFile
outputFile
zones
sectionCuts
panelSegments

◆ FullRunSolverSizing()

bool HyperX.Scripting.Project.FullRunSolverSizing ( string inputFile = null,
string outputFile = null,
HashSet< int > zones = null,
HashSet< int > sectionCuts = null,
HashSet< int > panelSegments = null,
int? nThreads = null )

Run solver in sizing mode with the specified items targeted. Generates input file, runs solver, reads output. Returns true on success.

Parameters
inputFile
outputFile
zones
sectionCuts
panelSegments

◆ GenerateSolverAnalysisInputFile()

string HyperX.Scripting.Project.GenerateSolverAnalysisInputFile ( string inputFile = null,
HashSet< int > zones = null,
HashSet< int > sectionCuts = null,
HashSet< int > panelSegments = null )

Generate analysis input file for solver with the specified items targeted. Returns filepath.

Parameters
inputFile
zones
sectionCuts
panelSegments

◆ GenerateSolverSizingInputFile()

string HyperX.Scripting.Project.GenerateSolverSizingInputFile ( string inputFile = null,
HashSet< int > zones = null,
HashSet< int > sectionCuts = null,
HashSet< int > panelSegments = null )

Generate sizing input file for solver with the specified items targeted. Returns filepath.

Parameters
inputFile
zones
sectionCuts
panelSegments

◆ GetDashboardCompanies()

string[] HyperX.Scripting.Project.GetDashboardCompanies ( )

This method fetches an array of Dashboard company names that are available to the user who is currently logged in. The URL and authentication token are taken from the last Dashboard login made through HyperX.

Returns
Returns an array of company names. If certain web related errors are encountered, an empty array will be returned.

◆ GetDashboardPrograms()

string[] HyperX.Scripting.Project.GetDashboardPrograms ( string companyName)

This method fetches an array of Dashboard program names that are available to the user who is currently logged in. The URL and authentication token are taken from the last Dashboard login made through HyperX.

Returns
Returns an array of program names. If certain web related errors are encountered, an empty array will be returned. If the provided company cannot be found, a null value will be returned.

◆ GetDashboardTags()

string[] HyperX.Scripting.Project.GetDashboardTags ( string companyName)

This method fetches an array of Dashboard tags that are available to the user who is currently logged in. The URL and authentication token are taken from the last Dashboard login made through HyperX.

Returns
Returns an array of tag names. If certain web related errors are encountered, an empty array will be returned. If the provided company could not be found, a null value will be returned.

◆ GetJointsWithoutResults()

HashSet< int > HyperX.Scripting.Project.GetJointsWithoutResults ( IEnumerable< Joint > joints)

Given a list of joints, returns the ids of the joints that were passed in but did not have results. If the list of joints is not a subset of the joints passed into the previous joint sizing operation, a new sizing operation will be kicked off.

Returns

◆ ImportCad()

void HyperX.Scripting.Project.ImportCad ( string filePath)

Import CAD from a file.

◆ ImportFeaResults()

string HyperX.Scripting.Project.ImportFeaResults ( bool alwaysImport = false)

Manually import design loads.

Parameters
alwaysImportIf true, loads are imported even if loads have already previously been imported.
Returns
Any warnings during import. String with length 0 if no warnings.
Exceptions
InvalidOperationExceptionThrows on failure.

◆ PackageProject()

SimpleStatus HyperX.Scripting.Project.PackageProject ( string destinationFilePath,
bool includeFemInputFiles = true,
bool includeFemOutputFiles = true,
bool includeWorkingFolder = true,
bool includeLoadFiles = true,
bool includePluginPackages = false,
bool removeAllOtherProjects = false,
bool deleteUnusedPropertiesAndMaterials = false,
bool mapFemFilesToRelativePaths = true,
IEnumerable< string > additionalFiles = null )

Create a .hxp project package from the ActiveProject.

Parameters
destinationFilePath
includeFemInputFiles
includeFemOutputFiles
includeWorkingFolder
includeLoadFiles
includePluginPackages
removeAllOtherProjects
deleteUnusedPropertiesAndMaterials
mapFemFilesToRelativePaths
Returns

◆ RegeneratePfem()

void HyperX.Scripting.Project.RegeneratePfem ( )

Regenerates and displays the preview FEM. If running a script outside of the Script Runner, do not call this method.

◆ ReturnToUnusedFem()

void HyperX.Scripting.Project.ReturnToUnusedFem ( IEnumerable< int > zoneNumbers = null,
IEnumerable< int > jointIds = null )

Return zones to unused FEM or delete non-FEA zones.

Parameters
zoneNumbers
jointIds
Exceptions
InvalidOperationExceptionThrows if run sets exist in this project.

◆ RunSolver()

bool HyperX.Scripting.Project.RunSolver ( string inputFile,
string outputFile = null,
int? nThreads = null )

Run solver with pre-generated input file. Returns true on success.

Parameters
inputFile
outputFile

◆ SetFemFormat()

void HyperX.Scripting.Project.SetFemFormat ( ProjectModelFormat femFormat)

◆ SetFemUnits()

SetUnitsStatus HyperX.Scripting.Project.SetFemUnits ( DbForceUnit femForceId,
DbLengthUnit femLengthId,
DbMassUnit femMassId,
DbTemperatureUnit femTemperatureId )

◆ SizeJoints()

SimpleStatus HyperX.Scripting.Project.SizeJoints ( IEnumerable< Joint > joints = null)

Size a list of joints.

Returns

◆ SizeZones() [1/2]

TernaryStatus HyperX.Scripting.Project.SizeZones ( IEnumerable< int > zoneIds)

Size a list of zones by ID.

Marked as success if sizing completes normally or with warnings.

◆ SizeZones() [2/2]

TernaryStatus HyperX.Scripting.Project.SizeZones ( IEnumerable< ZoneBase > zones = null)

Size a list of zones.

Marked as success if sizing completes normally or with warnings.

Parameters
zonesThe zones to be sized.

◆ UnimportFemAsync()

async Task HyperX.Scripting.Project.UnimportFemAsync ( )

◆ Upload()

SimpleStatus HyperX.Scripting.Project.Upload ( string uploadSetName,
string company,
string program,
IEnumerable< string > tags,
string notes,
HashSet< int > zoneIds,
HashSet< int > jointIds )

Does some checks to make sure the given parameters are valid, then uploads the given zones and joints to the Dashboard. The URL and authentication token are taken from the last Dashboard login made through HyperX.

Parameters
uploadSetNameThe name of the set of data uploaded to the Dashboard.
companyThe name of the company to associate with the upload set. This company object must be made through the Dashboard UI.
programThe name of the program to associated with the upload set. A new program will be created if the program name does not already exist.
tagsThe list of tags to be associated with the upload set. Any tags that do not exist will be created automatically on upload.
notesThe notes to be associated with the upload set.
zoneIdsThe zone IDs to include in the upload set.
jointIdsThe joint IDs to include in the upload set.
Returns
Returns a successful SimpleStatus if the upload succeeded. Returns an unsuccessful SimpleStatus with error info otherwise.

Property Documentation

◆ AnalysisProperties

AnalysisPropertyCol HyperX.Scripting.Project.AnalysisProperties
get

Analysis Properties for this project.

◆ Beams

ZoneCol HyperX.Scripting.Project.Beams
get

◆ DesignLoads

DesignLoadCol HyperX.Scripting.Project.DesignLoads
get

◆ DesignProperties

DesignPropertyCol HyperX.Scripting.Project.DesignProperties
get

Design properties for this project.

◆ DiscreteFieldTables

DiscreteFieldCol HyperX.Scripting.Project.DiscreteFieldTables
get

◆ FemDataSet

FemDataSet HyperX.Scripting.Project.FemDataSet
get

◆ FemFormat

ProjectModelFormat HyperX.Scripting.Project.FemFormat
get

◆ HyperFea

HyperFea HyperX.Scripting.Project.HyperFea
get

◆ Id

int HyperX.Scripting.Project.Id
get

◆ Joints

JointCol HyperX.Scripting.Project.Joints
get

◆ LoadProperties

LoadPropertyCol HyperX.Scripting.Project.LoadProperties
get

Load Properties for this project.

◆ Name

string HyperX.Scripting.Project.Name
get

◆ Panels

ZoneCol HyperX.Scripting.Project.Panels
get

◆ PanelSegments

PanelSegmentCol HyperX.Scripting.Project.PanelSegments
get

◆ Rundecks

RundeckCol HyperX.Scripting.Project.Rundecks
get

◆ SectionCuts

SectionCutCol HyperX.Scripting.Project.SectionCuts
get

◆ Sets

SetCol HyperX.Scripting.Project.Sets
get

◆ Structures

StructureCol HyperX.Scripting.Project.Structures
get

◆ WorkingFolder

string HyperX.Scripting.Project.WorkingFolder
get

◆ Zones

ZoneCol HyperX.Scripting.Project.Zones
get

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