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

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

Public Member Functions

 __init__ (self, _api.Project project)
types.TernaryStatus AnalyzeZones (self, item1=None)
types.TernaryStatus AnalyzeZones (self, tuple[int] zoneIds)
 Analyze a list of zones by ID.
types.TernaryStatus AnalyzeZones (self, tuple[ZoneBase] zones=None)
 Analyze a list of zones.
Zone CreateNonFeaZone (self, types.FamilyCategory category, str name=None)
 Create a non-FEA zone by name and category.
None Dispose (self)
None ExportCad (self, item1=None, item2=None)
None ExportCad (self, str filePath)
 Export all CAD for this project to a file.
None ExportCad (self, tuple[int] cadIds, str filePath)
 Export CAD by Id.
None ExportFem (self, str destinationFolder)
bool FullRunSolverAnalysis (self, str inputFile=None, str outputFile=None, set[int] zones=None, set[int] sectionCuts=None, set[int] panelSegments=None, int nThreads=None)
 Run solver in analysis mode with the specified items targeted.
bool FullRunSolverSizing (self, str inputFile=None, str outputFile=None, set[int] zones=None, set[int] sectionCuts=None, set[int] panelSegments=None, int nThreads=None)
 Run solver in sizing mode with the specified items targeted.
str GenerateSolverAnalysisInputFile (self, str inputFile=None, set[int] zones=None, set[int] sectionCuts=None, set[int] panelSegments=None)
 Generate analysis input file for solver with the specified items targeted.
str GenerateSolverSizingInputFile (self, str inputFile=None, set[int] zones=None, set[int] sectionCuts=None, set[int] panelSegments=None)
 Generate sizing input file for solver with the specified items targeted.
list[str] GetDashboardCompanies (self)
 This method fetches an array of Dashboard company names that are available to the user who is currently logged in.
list[str] GetDashboardPrograms (self, str companyName)
 This method fetches an array of Dashboard program names that are available to the user who is currently logged in.
list[str] GetDashboardTags (self, str companyName)
 This method fetches an array of Dashboard tags that are available to the user who is currently logged in.
set[int] GetJointsWithoutResults (self, tuple[Joint] joints)
 Given a list of joints, returns the ids of the joints that were passed in but did not have results.
None ImportCad (self, str filePath)
 Import CAD from a file.
str ImportFeaResults (self, bool alwaysImport=False)
 Manually import design loads.
types.SimpleStatus PackageProject (self, str 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, tuple[str] additionalFiles=None)
 Create a .hxp project package from the ActiveProject.
None RegeneratePfem (self)
 Regenerates and displays the preview FEM.
None ReturnToUnusedFem (self, tuple[int] zoneNumbers=None, tuple[int] jointIds=None)
 Return zones to unused FEM or delete non-FEA zones.
bool RunSolver (self, str inputFile, str outputFile=None, int nThreads=None)
 Run solver with pre-generated input file.
None SetFemFormat (self, types.ProjectModelFormat femFormat)
SetUnitsStatus SetFemUnits (self, DbForceUnit femForceId, DbLengthUnit femLengthId, DbMassUnit femMassId, DbTemperatureUnit femTemperatureId)
types.SimpleStatus SizeJoints (self, tuple[Joint] joints=None)
 Size a list of joints.
types.TernaryStatus SizeZones (self, item1=None)
types.TernaryStatus SizeZones (self, tuple[int] zoneIds)
 Size a list of zones by ID.
types.TernaryStatus SizeZones (self, tuple[ZoneBase] zones=None)
 Size a list of zones.
Task UnimportFemAsync (self)
types.SimpleStatus Upload (self, str uploadSetName, str company, str program, tuple[str] tags, str notes, set[int] zoneIds, set[int] jointIds)
 Does some checks to make sure the given parameters are valid, then uploads the given zones and joints to the Dashboard.

Protected Attributes

 _Entity = project

Static Protected Attributes

 _FemDataSet
 _HyperFea

Properties

 AnalysisProperties = property
 Analysis Properties for this project.
 Beams = property
 DesignLoads = property
 DesignProperties = property
 Design properties for this project.
 DiscreteFieldTables = property
 FemDataSet = property
 FemFormat = property
 HyperFea = property
 Id = property
 Joints = property
 LoadProperties = property
 Load Properties for this project.
 Name = property
 Panels = property
 PanelSegments = property
 Rundecks = property
 SectionCuts = property
 Sets = property
 Structures = property
 WorkingFolder = property
 Zones = property

Detailed Description

Represents a HyperX project within a database.

Constructor & Destructor Documentation

◆ __init__()

hyperx.api.Project.__init__ ( self,
_api.Project project )

Member Function Documentation

◆ AnalyzeZones() [1/3]

types.TernaryStatus hyperx.api.Project.AnalyzeZones ( self,
item1 = None )

Analyze a list of zones. Marked as success if sizing completes normally or with warnings.

Analyze a list of zones by ID. Marked as success if sizing completes normally or with warnings.

◆ AnalyzeZones() [2/3]

types.TernaryStatus hyperx.api.Project.AnalyzeZones ( self,
tuple[int] zoneIds )

Analyze a list of zones by ID.

Marked as success if sizing completes normally or with warnings.

◆ AnalyzeZones() [3/3]

types.TernaryStatus hyperx.api.Project.AnalyzeZones ( self,
tuple[ZoneBase] zones = None )

Analyze a list of zones.

Marked as success if sizing completes normally or with warnings.

◆ CreateNonFeaZone()

Zone hyperx.api.Project.CreateNonFeaZone ( self,
types.FamilyCategory category,
str name = None )

Create a non-FEA zone by name and category.

◆ Dispose()

None hyperx.api.Project.Dispose ( self)

◆ ExportCad() [1/3]

None hyperx.api.Project.ExportCad ( self,
item1 = None,
item2 = None )

Export all CAD for this project to a file.

Export CAD by Id.

◆ ExportCad() [2/3]

None hyperx.api.Project.ExportCad ( self,
str filePath )

Export all CAD for this project to a file.

◆ ExportCad() [3/3]

None hyperx.api.Project.ExportCad ( self,
tuple[int] cadIds,
str filePath )

Export CAD by Id.

◆ ExportFem()

None hyperx.api.Project.ExportFem ( self,
str destinationFolder )

◆ FullRunSolverAnalysis()

bool hyperx.api.Project.FullRunSolverAnalysis ( self,
str inputFile = None,
str outputFile = None,
set[int] zones = None,
set[int] sectionCuts = None,
set[int] panelSegments = None,
int nThreads = None )

Run solver in analysis mode with the specified items targeted.

Generates input file, runs solver, reads output. Returns true on success.

◆ FullRunSolverSizing()

bool hyperx.api.Project.FullRunSolverSizing ( self,
str inputFile = None,
str outputFile = None,
set[int] zones = None,
set[int] sectionCuts = None,
set[int] panelSegments = None,
int nThreads = None )

Run solver in sizing mode with the specified items targeted.

Generates input file, runs solver, reads output. Returns true on success.

◆ GenerateSolverAnalysisInputFile()

str hyperx.api.Project.GenerateSolverAnalysisInputFile ( self,
str inputFile = None,
set[int] zones = None,
set[int] sectionCuts = None,
set[int] panelSegments = None )

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

Returns filepath.

◆ GenerateSolverSizingInputFile()

str hyperx.api.Project.GenerateSolverSizingInputFile ( self,
str inputFile = None,
set[int] zones = None,
set[int] sectionCuts = None,
set[int] panelSegments = None )

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

Returns filepath.

◆ GetDashboardCompanies()

list[str] hyperx.api.Project.GetDashboardCompanies ( self)

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

list[str] hyperx.api.Project.GetDashboardPrograms ( self,
str 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 None value will be returned.

◆ GetDashboardTags()

list[str] hyperx.api.Project.GetDashboardTags ( self,
str 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 None value will be returned.

◆ GetJointsWithoutResults()

set[int] hyperx.api.Project.GetJointsWithoutResults ( self,
tuple[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.

◆ ImportCad()

None hyperx.api.Project.ImportCad ( self,
str filePath )

Import CAD from a file.

◆ ImportFeaResults()

str hyperx.api.Project.ImportFeaResults ( self,
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()

types.SimpleStatus hyperx.api.Project.PackageProject ( self,
str 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,
tuple[str] additionalFiles = None )

Create a .hxp project package from the ActiveProject.

◆ RegeneratePfem()

None hyperx.api.Project.RegeneratePfem ( self)

Regenerates and displays the preview FEM.

If running a script outside of the Script Runner, do not call this method

◆ ReturnToUnusedFem()

None hyperx.api.Project.ReturnToUnusedFem ( self,
tuple[int] zoneNumbers = None,
tuple[int] jointIds = None )

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

Exceptions
InvalidOperationExceptionThrows if run sets exist in this project.

◆ RunSolver()

bool hyperx.api.Project.RunSolver ( self,
str inputFile,
str outputFile = None,
int nThreads = None )

Run solver with pre-generated input file.

Returns true on success.

◆ SetFemFormat()

None hyperx.api.Project.SetFemFormat ( self,
types.ProjectModelFormat femFormat )

◆ SetFemUnits()

SetUnitsStatus hyperx.api.Project.SetFemUnits ( self,
DbForceUnit femForceId,
DbLengthUnit femLengthId,
DbMassUnit femMassId,
DbTemperatureUnit femTemperatureId )

◆ SizeJoints()

types.SimpleStatus hyperx.api.Project.SizeJoints ( self,
tuple[Joint] joints = None )

Size a list of joints.

◆ SizeZones() [1/3]

types.TernaryStatus hyperx.api.Project.SizeZones ( self,
item1 = None )
   Size a list of zones.
   Marked as success if sizing completes normally or with warnings.
Parameters
zonesThe zones to be sized.
<br>
   Size a list of zones by ID.
   Marked as success if sizing completes normally or with warnings.

◆ SizeZones() [2/3]

types.TernaryStatus hyperx.api.Project.SizeZones ( self,
tuple[int] zoneIds )

Size a list of zones by ID.

Marked as success if sizing completes normally or with warnings.

◆ SizeZones() [3/3]

types.TernaryStatus hyperx.api.Project.SizeZones ( self,
tuple[ZoneBase] zones = None )

Size a list of zones.

Marked as success if sizing completes normally or with warnings.

Parameters
zonesThe zones to be sized.

◆ UnimportFemAsync()

Task hyperx.api.Project.UnimportFemAsync ( self)

◆ Upload()

types.SimpleStatus hyperx.api.Project.Upload ( self,
str uploadSetName,
str company,
str program,
tuple[str] tags,
str notes,
set[int] zoneIds,
set[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.

Member Data Documentation

◆ _Entity

hyperx.api.Project._Entity = project
protected

◆ _FemDataSet

hyperx.api.Project._FemDataSet
staticprotected

◆ _HyperFea

hyperx.api.Project._HyperFea
staticprotected

Property Documentation

◆ AnalysisProperties

hyperx.api.Project.AnalysisProperties = property
static

Analysis Properties for this project.

◆ Beams

hyperx.api.Project.Beams = property
static

◆ DesignLoads

hyperx.api.Project.DesignLoads = property
static

◆ DesignProperties

hyperx.api.Project.DesignProperties = property
static

Design properties for this project.

◆ DiscreteFieldTables

hyperx.api.Project.DiscreteFieldTables = property
static

◆ FemDataSet

hyperx.api.Project.FemDataSet = property
static

◆ FemFormat

hyperx.api.Project.FemFormat = property
static

◆ HyperFea

hyperx.api.Project.HyperFea = property
static

◆ Id

hyperx.api.Project.Id = property
static

◆ Joints

hyperx.api.Project.Joints = property
static

◆ LoadProperties

hyperx.api.Project.LoadProperties = property
static

Load Properties for this project.

◆ Name

hyperx.api.Project.Name = property
static

◆ Panels

hyperx.api.Project.Panels = property
static

◆ PanelSegments

hyperx.api.Project.PanelSegments = property
static

◆ Rundecks

hyperx.api.Project.Rundecks = property
static

◆ SectionCuts

hyperx.api.Project.SectionCuts = property
static

◆ Sets

hyperx.api.Project.Sets = property
static

◆ Structures

hyperx.api.Project.Structures = property
static

◆ WorkingFolder

hyperx.api.Project.WorkingFolder = property
static

◆ Zones

hyperx.api.Project.Zones = property
static

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