gsapy Function Reference¶
Copyright (c) 2016 - 2021, Arup
Current & Previous contributors are:
David de Koning, Jenessa Man, Alex De Oliveira, Sébastien Côté, James Angevine
- Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- class gsapy.GSA(path=None, version='10.2')¶
This is the main class in the gsapy library. Each instance of GSA represents an GSA file opened in GSA.
- class Output_Init_Flags(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)¶
- class Output_IsDataRef_Flags(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)¶
- _get_1D_elem_results(index, case, axis: str, result_reference, addl_pts, interesting_pts, entity_types)¶
Adds definition of additional points and constructs the interesting points flag
- _get_entities_in_list_description(gsa_list='all', entity_type=EntityEnum.NODE)¶
Get entity indices based on a list description. Do not use this function directly.
- Parameters:
gsa_list – a list description using GSA list syntax (string)
entity_type – the entity type of list (integer)
- Returns:
a list of the entities included in the given list description (string)
- _get_entities_in_named_list(list_name)¶
Get entity indices based on a list name. Do not use this function directly.
- Parameters:
list_name – the name of a saved list (string)
- Returns:
a list of the entities included in the specified saved list(string)
- _get_entities_in_numbered_list(list_num)¶
Get entity indices based on a list number. Do not use this function directly.
- Parameters:
list_num – the reference number of a saved list (integer)
- Returns:
a list of the entities included in the specified saved list (string)
- _get_entity_results(indices, case: str, axis: str, result_reference: int, num1dpos: int, flags: int)¶
Generic method for getting results of any type. This function is used internally by all other result-getting functions.
From GSA 9.0 documentation:
- Parameters:
indices – Entity index or iterator of indices
case – A string describing the case for which you want to extract results.
axis – either ‘global’, ‘local’, ‘default’ or the number of a user defined axis, axis with respect to which results should be extracted; examples of valid entries: - “default” - the default for the data being extracted - “global” - “local”
result_reference – Integer reference for the desired output quantity; result references are attributes of the gsapy.output_dataref module, which can also be referred to by variable dr in this package. For example, the node reaction output reference is self.output_dataref.REF_REAC, alternatively dr.REF_REAC. The reference outside of this module is gsapy.output_dataref.REF_REAC.
flags –
compound flag; flags are attributes of gsa.Output_Init_Flags, and can be summed together. For example, to output 2D stresses at bottom layer the flag is self.Output_Init_Flags.OP_INIT_2D_BOTTOM. The flag outside of this module is gsapy.Output_Init_Flags.OP_INIT_2D_BOTTOM. Valid flags are:
OP_INIT_2D_BOTTOM = & H1 output 2D stresses at bottom layer
OP_INIT_2D_MIDDLE = & H2 output 2D stresses at middle layer
OP_INIT_2D_TOP = & H4 output 2D stresses at top layer
OP_INIT_2D_BENDING = & H8 output 2D stresses at bending layer
OP_INIT_2D_AVGE = & H10 average 2D element stresses at nodes
OP_INIT_1D_AUTO_PTS = & H20 calculate 1D results at interesting points
OP_INIT_INFINITY = & H40 return infinity and NaN values as such, else as zero
OP_INIT_1D_WALL_RES_SECONDARY = & H80 output secondary stick of wall equivalent beam results, else primary
E.g.OP_INIT_2D_TOP Or OP_INIT_2D_AVGE 2D stresses at top layer, averaged at nodes
num1dpos – the number of equidistant internal positions (integer) to be considered for 1D element results, in addition to the automatic interesting positions if specified in flags
- Returns results:
A tuple of results, or, if there is only one result, that result alone
- _get_number_of_elements_in_member(index: int)¶
- Returns:
the number of elements associated with the given member.
- analyse(task=None)¶
Run analysis tasks.
- Parameters:
task – the index (integer) of the task to analyse, set to None to analyse all tasks
- Raise:
GSAError if the analysis can’t be carried out
- arg(index, line)¶
Return a particular argument of a GWA Command. Please don’t use this, we’ve only provided it for compatibility with the underlying GSA COM interface.
- Parameters:
index – an index position in the line (integer)
line – a string of comma separated or tab separated arguments (string)
- Returns:
the argument at the given index position in the line (string)
- case_exist(case_type='L', case_ref=1)¶
Does a particular case exist?
- Parameters:
case_type – a setting for specifying the type of case, from the case_type_options namedtuple (string)
case_ref – the case number (integer)
- Returns:
1 if the case exists
- case_name(case_type='L', case_ref=1)¶
What is the name of a given case?
- Parameters:
case_type – a setting for specifying the type of case, from the case_type_options namedtuple (string)
case_ref – the case number (integer)
- Returns:
the name of the case (string)
- case_num_perm(case_type='A', case_ref=1)¶
How many permutations does a case have?
- Parameters:
case_type – a setting for specifying the type of case, from the case_perm_type_options namedtuple (string)
case_ref – the case number (integer)
- Returns:
the number of permutations for the case (integer), 0 if the case is not an enveloping case
- case_perm_anal_factor(case_type='A', case_ref=1, perm_num=0, anal_ref=1)¶
Find out what the factor on a given analysis case is in a given combination case.
- Parameters:
case_type – a setting for specifying the type of case, from the case_perm_type_options namedtuple (string)
case_ref – the case number (integer)
perm_num – the permutation number to refer to a permutation of the case or 0 to refer to the specified case (integer)
anal_ref – the analysis case number (integer)
- Returns:
the factor on the specified analysis case for the given case reference, ex. 1.2 returned for A1 for a case with a case description of 1.2A1 + 1.6A2 (float)
- case_perm_desc(case_type='A', case_ref=1, perm_num=0)¶
Create the case description string.
- Parameters:
case_type – a setting for specifying the type of case, from the case_perm_type_options namedtuple (string)
case_ref – the case number (integer)
perm_num – the permutation number to refer to a permutation or 0 to refer to the specified case (integer)
- Returns:
the case description of the specified case (string)
- case_perm_string(case_type='L', case_ref=1, perm_num=0)¶
Create a properly formatted case/permutation string.
- Parameters:
case_type – a setting for specifying the type of case, from the case_type_options namedtuple (string)
case_ref – the case number (integer)
perm_num – the permutation number to refer to a permutation of the case or 0 to refer to the specified case (integer)
- Returns:
the case reference (string)
- case_results_exist(case_type='A', case_ref=1, perm_num=0)¶
Do results exist for a given analysis case?
- Parameters:
case_type – a setting for specifying the type of case, from the case_perm_type_options namedtuple (string)
case_ref – the case number (integer)
perm_num – the permutation number to refer to a permutation of the case or 0 to refer to the specified case (integer)
- Returns:
1 if the results exist
- case_task(case_ref)¶
What is the analysis task number of a given case?
- Parameters:
case_ref – the analysis case number (integer)
- Returns:
the reference number of the analysis task that is parent to the specified analysis case (integer)
- check_region(index: int = 0)¶
Checks the validity of the region specified by the given index. If no index is specified, all meshes from regions are checked.
- Parameters:
index – index of the region
- Returns:
tuple of errors/warnings: [num_errors, num_warnings, [messages]]
- close()¶
Close the open GSA file.
- copy_view(view_ref=1, option='SGV')¶
Make a copy of a saved view.
- Parameters:
option – a setting for specifying the type of saved view, from the saved_view_options namedtuple (string)
view_ref – the number of the view (integer)
- Returns:
0 if worked
- create_elements_from_member(index: str)¶
Creates elements from members within GSA
- Parameters:
index – index of member
- Returns:
GSA Return Status
- create_view(view_name)¶
Create new view and set the name.
- Parameters:
view_name – the name of the view
- Returns:
reference index of view
- delete(entity_cls, index_low, index_high=None, renumber=False)¶
Delete data in a GSA model.
- Parameters:
entity_cls – the class of the data you want to delete (eg gsapy.NODE or gsapy.ELEMENT)
index_low – the index of the first item to delete
index_high – the index of the last number to delete. Leave blank to only delete one item.
renumber – set to True to renumber the items.
- Returns:
no return value
- delete_mesh_region(index: int = 0)¶
Deletes meshes for the region specified by the given index. If no index is specified, all meshes from regions are deleted.
- Parameters:
index – index of the region
- delete_results()¶
Deletes analysis results.
- Returns:
Nothing
- delete_view(view_ref=1, option='SGV')¶
Delete a saved view by index.
- Parameters:
option – a setting for specifying the type of saved view, from the saved_view_options namedtuple (string)
view_ref – the reference number of the view (integer)
- Returns:
0 if worked
- design(task=None, option='check')¶
Runs the specified design task or all tasks. This function raises a GSAError on the first task that cannot be designed.
- Parameters:
task – the number of the Design task to be executed. set to None to check all tasks.
option – runs task as check or design, can be ‘check’ (default) or ‘design’.
- design_task_status(case_ref)¶
What is the status of a design task
- Parameters:
case_ref – design task reference number
- Returns:
1 if no file open, 2 if design task does not exist, 3 if design task has results, 4. if design task has not been designed or checked
- exists(entity_cls, index_ref)¶
Checks if an item exists.
- Parameters:
entity_cls – the class of the data you are checking (eg gsapy.NODE or gsapy.ELEMENT)
index_ref – the index you want to check exists.
- Returns:
True or value
- generate_mesh_region(index: int = 0)¶
Generates meshes for the region specified by the given index. If no index is specified, all meshes from regions are generated.
Throws an error if unable to mesh region. Run check_region() to see errors.
- Parameters:
index – index of the region
- get(module_cls, indices=None)¶
Function for getting encapsulated data from a GSA model. This is generally not called directly, use the get_nodes, get_element functions.
- Parameters:
module_cls – the class of object that you want (eg gsapy.Element or gsapy.Node)
indices – a single integer index or an iterable of indices. If no indices are provided, all records for module_cls will be returned.
- Returns:
a python object representing a GSA data object, eg. an element, a node, etc…
- get_1D_elem_displacements(index, case, axis='default', addl_pts=0, interesting_pts: bool = False)¶
Returns section displacements at various points along the 1D element(specified by element number) for the given case (specified by ‘A12’ or ‘C2’, for example).
- Parameters:
index – 1D element index or iterator of indices
case – string describing the case for which you want to extract displacements.
axis – either ‘global’, ‘local’, ‘default’ or the number of a user defined axis.
addl_pts – the number of additional points to get results for
interesting_pts – whether or not to return additional interesting points.
- Returns:
tuple of section displacements and rotations at the beam end points, as well as additional intermediate points and interesting points. Each section has resultant components [DX, DY, DZ, RXX, RYY, RZZ].
- get_1D_elem_resultants(index, case, axis='default', addl_pts=0, interesting_pts: bool = False)¶
Returns a list of 6-item lists in the form(Fx, Fy, Fz, Mxx, Myy, Mzz).Each set of forces are the forces at a point on the specificed element (specified by element number) for the given case (specified by ‘A12’ or ‘C2’, for example).
- Parameters:
index – 1D element index or iterator of indices
case – string describing the case for which you want to extract displacements.
axis – either ‘global’, ‘local’, ‘default’ or the number of a user defined axis.
addl_pts – the number of additional points to get results for
interesting_pts – whether or not to return additional interesting points.
- Returns:
tuple of section forces and moments at the beam end points, as well as additional intermediate points and interesting points. Each section has resultant components [Fx, Fy, Fz, Mxx, Myy, Mzz].
- get_1D_elem_strains(index, case, axis='default', addl_pts=0, interesting_pts: bool = False)¶
Returns section axial strains at various points along the 1D element(specified by element number) for the given case (specified by ‘A12’ or ‘C2’, for example).
- Parameters:
index – 1D element index or iterator of indices
case – string describing the case for which you want to extract displacements.
axis – either ‘global’, ‘local’, ‘default’ or the number of a user defined axis.
addl_pts – the number of additional points to get results for
interesting_pts – whether or not to return additional interesting points.
- Returns:
tuple of section axial strains and rotations at the beam end points, as well as additional intermediate points and interesting points.
- get_1D_elem_stresses(index, case, axis='default', addl_pts=0, interesting_pts: bool = False)¶
Only applies to 1D elements that have a section property attribute.
- Parameters:
index – 1D element index or iterator of indices
case – string describing the case for which you want to extract displacements.
axis – either ‘global’, ‘local’, ‘default’ or the number of a user defined axis.
addl_pts – the number of additional points to get results for.
interesting_pts – whether or not to return additional interesting points.
- Returns:
tuple of section stresses at beam end points, as well as additional intermediate points and interesting points. Each section has stress components [S(Axial), S(Shear-y), S(Shear-z), S(Bending +z), S(Bending -z), S(Bending +y), S(Bending -y), S(Combined 1), S(Combined 2), S(Combined y), S(Combined z)]
- get_2D_elem_displacements(index, case, axis='default', averaged: bool = False)¶
- Parameters:
index – 2D element index or iterator of indices
case – A string describing the case for which you want to extract results.
axis – either ‘global’, ‘local’, ‘default’ or the number of a user defined axis, axis with respect to which results should be extracted.
averaged – averaged: whether or not results should be averaged.
- Returns:
tuple of displacements [DX, DY, DZ]
- get_2D_elem_forces(index, case, axis='default', averaged: bool = False)¶
- Parameters:
index – 2D element index or iterator of indices
case – A string describing the case for which you want to extract results.
axis – either ‘global’, ‘local’, ‘default’ or the number of a user defined axis, axis with respect to which results should be extracted.
averaged – averaged: whether or not results should be averaged.
- Returns:
tuple of forces [NX, NY, NXY, QX, QY]
- get_2D_elem_moments(index, case, axis='default', averaged: bool = False)¶
- Parameters:
index – 2D element index or iterator of indices
case – A string describing the case for which you want to extract results.
axis – either ‘global’, ‘local’, ‘default’ or the number of a user defined axis, axis with respect to which results should be extracted.
averaged – averaged: whether or not results should be averaged.
- Returns:
tuple of moments [MX, MY, MXY, |MX + MXY|, |MY + MXY|]
- get_2D_elem_properties(index, case)¶
:return tuple of [thickness, bending thickness, in-plane thickness, weight thickness, additional mass]
- get_2D_elem_resultants(index, case, axis='default', averaged: bool = False)¶
- Parameters:
index – 2D element index or iterator of indices
case – A string describing the case for which you want to extract results.
axis – either ‘global’, ‘local’, ‘default’ or the number of a user defined axis, axis with respect to which results should be extracted.
averaged – whether or not results should be averaged.
- Returns:
tuple of forces and moments [NX, NY, NXY, QX, QY, MX, MY, MXY, |MX + MXY|, |MY + MXY|]
- get_2D_elem_stresses(index, case, axis='default', position='middle', averaged: bool = False)¶
- Parameters:
index – 2D element index or iterator of indices
case – Result case
axis – either ‘global’, ‘local’, ‘default’ or the number of a user defined axis, axis with respect to which results should be extracted.
position – ‘middle’, ‘bottom’ or ‘top’, section location (with regards to positive z axis) at which results are extracted.
averaged – whether or not results should be averaged.
- Returns:
tuple of stresses [SXX SXY SYY SYZ SZX SZZ]
- get_all_saved_lists()¶
Get the definitions of all saved lists.
- Returns:
a python list of python lists defining of all GSA saved lists. [list reference number, name, type, description] (list of lists)
- get_analysis_case(indices=None)¶
Get a number of analysis cases from the GSA model.
- Parameters:
indices – either an integer or a list of integers.
- Returns:
a dict of gsapy AnalysisCase objects whose keys are case numbers and values are AnalysisCase objects.
- get_analysis_task(indices=None)¶
Get analysis tasks from the GSA model.
- Parameters:
indices – an integer, or list of integers, of the task ids to get. Leave as None for get all tasks
- Returns:
a list of AnalysisTask objects
- get_assembly_forces(assembly, case)¶
This function returns a list of lists. Each element in the first list is a list with 7 items. The first of the seven items is the position along the assembly at with the forces are cut. The next six items are the section forces: Fx, Fy, Fz, Mxx, Myy, Mzz.
- Parameters:
assembly – the index of the assembly to get results for.
case – A string describing the case for which you want to extract displacements.
- Returns:
a list of lists of results. Each list is of the form [position, Fx, Fy, Fz, Mxx, Myy, Mzz].
- get_element_at_member_position(index: int, n: int)¶
Returns the element index for the given member and element position. This function will raise GSAError if the member does not exist. If the index n is out of bounds (either less than zero, or greater than or equal to the number of elements in the member), the function returns a random number (because that’s what the GSA COM API does…
- Parameters:
index – index of the member
position_index – sequential postion of the element in the member (first element is 0)
- Returns:
the index of the nth element in member ‘index’
- get_element_length(index: int)¶
Get the length of an element
Raises a GSAError if the element does not exist.
- Parameters:
index – index of the element
- Returns:
length of the element
- get_elements(indices=None)¶
Get a number of elements from the GSA model.
- Parameters:
indices – either an integer, a GSA list descriptor, the name of a saved list, or a list of integers and list descriptors.
- Returns:
a dict of gsapy Element objects whose keys are element numbers and values are Element objects.
- get_elements_connected_to_node(index: int)¶
Get the elements indices connected to the node
Raises a GSAError if the node does not exist.
- Parameters:
index – index of the node
- Returns:
list of indices of connected elements
- get_highest_view(option='SGV')¶
Find out what the highest numbered saved view is.
- Parameters:
option – a setting for specifying the type of view, from the view_options namedtuple (string)
- Returns:
the highest-numbered preferred or saved Graphic View, Output View or View List (integer)
- get_member_element_indices(index: int)¶
Get a list of the indices of elements included in member ‘index’.
- Parameters:
index – the index of the member
- Returns:
a list of the indices of elements in member ‘index’
- get_member_from_element(index: int)¶
Returns the member index associated with the given element
- Parameters:
index – Index of elements
- Returns:
the number of the member that contains the element
- get_member_length(index: int)¶
Get the length of a member
Raises a GSAError if the member does not exist.
- Parameters:
index – index of the member
- Returns:
length of the member
- get_member_results(index: int, case: str, axis='default')¶
Returns utilization percentages
- Parameters:
index – Member index or iterator of indices
case – A string describing the case for which you want to extract results.
axis – either ‘global’, ‘local’, ‘default’ or the number of a user defined axis, axis with respect to which results should be extracted.
- Returns:
tuple of results: [overall, local_combined, buckling, local_axial, local_su, local_sv, local_torsion, local_muu, local_mvv buckling_uu, buckling_vv, buckling_lt, buckling_torsion, buckling_ft] TODO: Not sure what the last index is
- get_members(indices=None)¶
Get a number of members from the GSA model.
- Parameters:
indices – either an integer, a GSA list descriptor, the name of a saved list, or a list of integers and list descriptors.
- Returns:
a dict of gsapy Element objects whose keys are member numbers and values are Member objects.
- get_members_connected_to_node(index: int)¶
Get the members indices connected to the node
Raises a GSAError if the node does not exist.
- Parameters:
index – index of the node
- Returns:
list of indices of connected members
- get_node_displacements(index: int, case: str, axis='default')¶
- Parameters:
index – Node index or iterator of indices
case – A string describing the case for which you want to extract results.
axis – either ‘global’, ‘local’, ‘default’ or the number of a user defined axis, axis with respect to which results should be extracted.
- Returns:
tuple of displacements [DX, DY, DZ, RX, RY, RZ]
- get_node_reactions(index: int, case: str, axis='default')¶
- Parameters:
index – Node index or iterator of indices
case – A string describing the case for which you want to extract results.
axis – either ‘global’, ‘local’, ‘default’ or the number of a user defined axis, axis with respect to which results should be extracted.
- Returns:
tuple of reactions [FX, FY, FZ, MX, MY, MZ]
- get_nodes(indices=None)¶
Get a number of nodes from the GSA model.
- Parameters:
indices – either an integer, a GSA list descriptor, the name of a saved list, or a list of integers and list descriptors.
- Returns:
a dist of gsapy Node objects whose keys node numbers, and the value are Node objects.
- get_section_info(section_number, section_info='SECT_NAME')¶
Retrieves section information directly from the GSA section database. This only works for catagloue sections, not standard (STD) sections.
Note: dimensions are not converted to the model units! All dimensions are in metres.
- Parameters:
section_number – the gsa reference number of the section in your model
section_info – either a string or a tuple of strings with the keys of the data you want to retrieve. Valid keys are: SECT_ID, SECT_NAME, CIS_ID, SECT_TYPE_NUM, SECT_NUM, SECT_SHAPE, SECT_SUPERSEDED, SECT_MASS_PER_L, SECT_DEPTH_DIAM, SECT_WIDTH, SECT_WEB_THICK, SECT_FLG_THICK, SECT_ROOT_RAD, SECT_TOE_RAD, SECT_DEP_FILLET, SECT_SPACE_WEB, SECT_PITCH, SECT_LB_RAT_FLG, SECT_LB_RAT_WEB, SECT_END_CLEAR, SECT_NOTCH_LTH, SECT_NOTCH_HGT, SECT_GRIP, SECT_FLG_FAST, SECT_SA_PER_L, SECT_SA_PER_M, SECT_C_X, SECT_C_Y, SECT_I_XX, SECT_I_YY, SECT_I_UU, SECT_I_VV, SECT_RAD_GYR_XX, SECT_RAD_GYR_YY, SECT_RAD_GYR_UU, SECT_RAD_GYR_VV, SECT_RAD_GYR_RT, SECT_Z_XX, SECT_Z_YY, SECT_Z_TEE_XX, SECT_Z_FLG_XX, SECT_Z_TOE_XX, SECT_ANG_XX2UU, SECT_BUCK_PARAM, SECT_TORS_INDEX, SECT_WARP_CONST, SECT_TORS_J, SECT_TORS_C, SECT_AREA, SECT_GROSS_AREA, SECT_L_PER_M, SECT_SHEAR_CENT, SECT_ZP_XX, SECT_ZP_WEB_AR, SECT_ZP_XX_WEB, SECT_ZP_XX_N, SECT_ZP_XX_K1, SECT_ZP_XX_K2, SECT_ZP_XX_K3, SECT_ZP_XX_K4, SECT_ZP_YY, SECT_ZP_YY_N, SECT_ZP_YY_K1, SECT_ZP_YY_K2, SECT_ZP_YY_K3, SECT_ZP_YY_K4, SECT_ZP_YY_C1K1, SECT_ZP_YY_C1K2, SECT_ZP_YY_C1K3, SECT_ZP_YY_C1K4, SECT_ZP_YY_C1K5, SECT_ZP_YY_C1K6, SECT_ZP_YY_C2K1, SECT_ZP_YY_C2K2, SECT_ZP_YY_C2K3, SECT_ZP_YY_C2K4, SECT_ZP_YY_C2K5, SECT_ZP_YY_C2K6, SECT_AX_XX, FACTOR_CX, FACTOR_CY, SECT_DATE_ADDED
- Returns:
if a single string is passed to section_info, it returns the value requested, if a tuple of keys is passed to section_info, it returns a tuple of values
- get_spring_forces(node, case, axis='default')¶
This is a deprecated wrapper for get_node_reactions. Use get_reactions instead.
- get_unit_factors()¶
Get the model unit SI conversion factors (e.g. mm would be 1000)
- Returns:
a dict of factors with keys: FORCE, LENGTH, DISP, SECTION, MASS, TIME, TEMP, STRESS, ACCEL
- get_unit_names()¶
Get the names of the model units.
- Returns:
a dict of unit names with keys: FORCE, LENGTH, DISP, SECTION, MASS, TIME, TEMP, STRESS, ACCEL
- get_view_case_list(view_ref=1, option='SGV')¶
Find out what cases are associated with a given saved view.
- Parameters:
option – a setting for specifying the type of saved view, from the saved_view_options namedtuple (string)
view_ref – the reference number of the view (integer)
- Returns:
the cases associated with the specified view (list)
- get_view_display_list(view_ref=1, list_type=EntityEnum.NODE, option='SGV')¶
Find out what entities (e.g. elements) are displayed in a saved view.
- Parameters:
option – a setting for specifying the type of saved view, from the saved_view_options namedtuple (string)
view_ref – the reference number of the view (integer)
list_type – the entity type of list (enum value)
- Returns:
the entity display list (a list description) associated with the specified view (list)
- get_view_name(view_ref=1, option='SGV')¶
Get the name of a specific saved view.
- Parameters:
option – a setting for specifying the type of view, from the view_options namedtuple (string)
view_ref – the number of the view (integer)
- Returns:
the name of the view (string)
- get_view_orientation(view_ref=1)¶
Gets the view orientation of the view specified by view_ref
- Parameters:
ref
- Returns:
the orientation as an list of latitude, longitude, eye_distance, object_point_coordinates, mid_point_coordinates, and picture_rotation
- get_view_ref(view_name, option='SGV')¶
Returns the saved graphic view or output view reference from its name.
- Parameters:
option – a setting for specifying the type of view, from the view_options namedtuple (string)
view_name – the name of the save view (integer)
- Returns:
the reference of the view (integer)
- get_views(option='SGV')¶
Get a list of a particular type of views.
- Parameters:
option – a setting for specifying the type of view, from the view_options namedtuple (string)
- Returns:
the reference number and view name for all existing views of the specified view type, None if views of specified view type do not exist (list)
- gsapy_logging(func_name)¶
- Parameters:
func_name – Function to be logged
- Returns:
No variables returned
- gwa_command(command)¶
Executes a GWA command on the open model.
- Parameters:
command – a comma or tab delimited string with the GWA command
- Returns:
the results of the GWA, converted to a list
- highest_case(case_type='L')¶
check what the highest number of a particular type of case is.
- Parameters:
case_type – a setting for specifying the type of case, from the case_type_options namedtuple (string)
- Returns:
the highest-numbered case of the specified type (integer)
- highest_entity(module_cls)¶
Find the highest number for a given entity (NODE, ELEMENT, etc…)
- Parameters:
module_cls – gsapy module class
- Returns:
Highest number in record (integer)
- is_item_included_in_list_description(ref, option='ITEM', list_desc='all')¶
Check if an item is included in a list description.
- Parameters:
ref – the reference number of the item to be checked for inclusion (integer)
option – a setting for specifying the type of list, from the list_options namedtuple (string)
list_desc – a list description using GSA list syntax (string)
- Returns:
1 if the item is included in the list
- node_re_map(node_list)¶
Modifies the restraint string from get_nodes to previous method (10.0 - 6 item boolean list, 10.1 - single string)
- Parameters:
node_list – a list of gsapy Node objects whose keys node numbers, andthe value are Node objects
- Returns:
a modified list changine 10.1 format to 10.0 format
- num_arg(line)¶
Count the number of arguments in a GWA command. Please don’t use this, we’ve only provided it for compatibility with the underlying GSA COM interface.
- Parameters:
line – a string of comma separated or tab separated arguments (string)
- Returns:
the number of arguments in the given line (integer)
- number(entity_cls)¶
Find out how many of a given entity (NODE, ELEMENT, etc..)
- Parameters:
entity_cls – the class of the entity to check for e.g. gsapy.Node
- Returns:
the number of entities in the model
- open(path)¶
Open a new GSA file with the same GSA instance
- Parameters:
path – the path to your gsa file. It can be absolute, or relative to the working directory.
- parse_case_string(case_string: str)¶
Parse a case description into it’s constituent parts
- Param:
case_string: a GSA-formatted case string (e.g. L1, A2p3, C1min, etc…)
- Returns:
tuple of the type (L, A, or C), number and permutation
- print_all_views(option='ALL_SGV')¶
Print all the saved graphics views, using the printer setup options specified in GSA.
- Parameters:
option – a setting for specifying the type of view to be batch printed, from the batch_view_options namedtuple (string)
- Returns:
0 if worked
- print_view(view_name)¶
Print a single view, using the Printer Setup options specified in GSA.
- Parameters:
view_name – the name of view or view list (string)
- Returns:
0 if worked
- rename_view(view_ref=1, new_name='new_name', option='SGV')¶
Rename a saved view.
- Parameters:
option – a setting for specifying the type of saved view, from the saved_view_options namedtuple (string)
view_ref – the reference number of the view (integer)
new_name – the new name of the view (string)
- Returns:
0 if worked
- renumber(unit_data, old_ref, new_ref)¶
Renumber of data item. This only works for NODE, ELEMENT, MEMBER, LINE, AREA, REGION.
- Parameters:
unit_data – string describing the type of data (e.g. ‘NODE’)
old_ref – current index (integer)
new_ref – new index (integer)
- rescale_view_data(view_ref)¶
Rescale a saved view.
- Parameters:
view_ref – the reference number of the view, for Graphic Views only (integer)
- Returns:
0 if worked
- rescale_view_to_fit(view_ref=1)¶
- Parameters:
view_ref
- Returns:
- save()¶
Save changes to the open GSA file.
- save_all_views_to_file(option='ALL_SGV', file_type='JPG')¶
Save all saved graphic views to file.
- Parameters:
option – a setting for specifying the type of view to be batch saved, from the batch_view_options namedtuple (string)
file_type – the type of file that the views will saved as, from the file_type_options namedtuple (string)
- Returns:
0 if worked
- save_as(path)¶
Save the GSA file as a new file.
- Parameters:
path – the path to the new gsa file. It can be absolute, or relative to the working directory.
- save_view_to_file(view_name, file_type='JPG')¶
Save a single saved graphic view to file.
- Parameters:
view_name – the name of view of view list (string)
file_type – the type of file that the views will saved as, from the file_type_options namedtuple (string)
- Returns:
0 if worked
- set(modules)¶
Set a number of module records in the GSA model.
- Parameters:
modules – a single module record, dict or iterable of module records, to be set. The modules are set in sequential order
- Returns:
Nothing
- set_locale(option=LocaleEnum.LOC_SYSTEM)¶
Set the locale of the GSA model. Defaults to the local system locale.
- Parameters:
option – the locale setting for parsing GwaCommand strings, from the LocaleEnum class (enumeration)
- Returns:
0 if worked
- set_view_base_settings(view_ref=1, template=1)¶
Applies base view settings from the saved view template provided.
- Parameters:
view_ref – reference id of view to be modified (integer)
template – template to be applied. Could be reference id of template (integer) or a GWA command (string)
- set_view_case_list(view_ref=1, case_list='all', option='SGV')¶
Change the cases associated with a given saved view.
- Parameters:
option – a setting for specifying the type of saved view, from the saved_view_options namedtuple (string)
view_ref – the reference number of the view (integer)
case_list – the new case list for the specified saved view (string)
- Returns:
0 if worked
- set_view_contour(view_ref=1, dataref=Output_DataRef.REF_DISP_DZ, template=None)¶
Applies the contour settings from the saved view template provided onto a given saved view referenced by id. Then sets the output component that is contoured to dataref.
- Parameters:
view_ref – reference id of view to be modified (integer)
dataref – data reference code refering to data to be displayed
template – template to be applied. Could be reference id of template (integer) or a GWA command (string)
- set_view_diagram(view_ref=1, dataref=Output_DataRef.REF_DISP_DZ, template=None)¶
Applies the diagram ettings from the saved view template provided onto a given saved view referenced by id. Then draws the diagram for the output component represented by dataref.
- Parameters:
view_ref – reference id of view to be modified (integer)
dataref – data reference code refering to data to be displayed
template – template to be applied. Could be reference id of template (integer) or a GWA command (string)
- set_view_display_list(view_ref=1, list_type=EntityEnum.NODE, entity_list='all', option='SGV')¶
Change which entitites (e.g. elements) are displayed in a saved view.
- Parameters:
option – a setting for specifying the type of saved view, from the saved_view_options namedtuple (string)
view_ref – the reference number of the view (integer)
list_type – the entity type of list (enum value)
- Returns:
the list of entities associated with the specified view (list)
- set_view_labels(view_ref=1, template=1)¶
Applies labels settings from the supplied view template onto the saved view with the given reference.
- Parameters:
view_ref – reference id of view to be modified (integer)
template – template to be applied. Could be reference id of template (integer) or a GWA command (string)
- set_view_orientation(view_ref=1, latitude=None, longitude=None, eye_distance=None, object_point_coordinates=None, mid_point_coordinates=None, picture_rotation=None)¶
Sets the view orientation of the view specified by view_ref. Only parameters which are set are changed.
Optionally, a dictionary can be passed as a parameter using the ** operator with the keys being the parameter names and the parameters being the values.
Example: set_view_orientation(**my_dict)
- task_status(case_ref)¶
What is the status of a given analysis task?
- Parameters:
case_ref – the analysis case number (integer)
- Returns:
0 if the task exists and has been analysed, 1 if no GSA file is open, 2 if task does not exist or 3 if task exists but has not been analysed (integer)
- update_all_element_sections_from_members()¶
Updates all element sections from member sections
- update_all_member_sections_from_elements()¶
Updates all member sections from the section of the first element in each member. ‘First’ is whichever element GSA considers to be at position 0.
- Returns:
a dictionary of the members that were updated
- update_element_section_from_member(index: int)¶
Updated elements section property, based on member section property Other attributes are unchanged Modifies the elements in GSA and then returns the indicies of the modified elements as a list
- Parameters:
index – index of member
- Returns:
the indices of the modified elements
- update_member_section_from_element(index: int)¶
Updated member section property, based on element section property Other attributes are unchanged
- Parameters:
index – index of element
- Returns:
index of member updated
- update_views()¶
Update the saved views.
- validate_case(case, checkForResults=False)¶
This function tests a case description to see if it is valid, and returns as follows:
if the case is not a valid case string, it returns false
if the case is a valid case string, but it doesn’t exist in the model, a GSAError is raised
if the case is valid and exists, and checkForResults=True, and no results exist, a GSAError is raised
if none of the above happens, it returns a tuple of (‘A’ or ‘C’, the number of the case, the permutation number), the permutation is set to None if it is not a combination case
- Parameters:
case – a string with the case description to be validated
checkForResults – if True, the function with throw a GSAError if no results exist
- Returns:
a tuple of (‘A’ or ‘C’, the number of the case, the permutation number), if the checks are successful
- version()¶
Get the version number of the currently running GSA as a string.
- Returns:
the version of the current instance of GSA (string)
- version_string()¶
Get the full version string as reported directly by GSA.
- Returns:
the versions of the current instance of GSA and all associated plugins (string)
- view_exist(view_ref=1, option='SGV')¶
Does a particular view exist?
- Parameters:
option – a setting for specifying the type of view, from the view_options namedtuple (string)
view_ref – the number of the view (integer)
- Returns:
1 if the view exists
- class gsapy.LocaleEnum(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)¶
gsa.modules - Classes for reading and Writing to GSA¶
- class gsapy.modules.AnalysisCase(index, name, task, description, sID='')¶
Analysis case module.
- Parameters:
index – index of analysis case record
name – case name
task – task number
description – load description (e.g. “1.4L1+1.2L2”)
sID – sID
- class gsapy.modules.AnalysisTask¶
AnalysisTask base module. Cannot be used to initiate analysis task records.
- classmethod from_gwa(gwa)¶
Interprets TASK gwa record and returns an object of the appropriate submodule.
- Parameters:
gwa – GWA record separated into a list
- Returns:
AnalysisTask submodule object
- class gsapy.modules.AnalysisTaskGSRelax(index, name, stage=0, solution='STATIC_NL', scheme='SINGLE', beam_geom_stiffness=True, shell_geom_stiffness=False, first_load_increment=0.1, min_load_increment=0.0001, max_load_increment=0.1, termination_control='CYCLE', termination_value=100000, residual_control='REL', force_residual=0.0010000000475, moment_residual=0.0010000000475, disp_control=True, disp_control_node=0, disp_control_dir=1, disp_control_limit=0.01, load_control=False, load_control_factor=1, element_list=None, report_cycle=10, graphic_cycle=100, save_residual='RESID_NOCONV', damping_type='DAMP_VISCOUS', percent_damp_disp=0, percent_damp_rotn=0, dummy_mass_factor=1, dummy_inertia_factor=1, dummy_mass_power=1, dummy_inertia_power=1, auto_dummy_mass=True, auto_damping=True, save_elem_load=True, save_spacer_load='FF_SAVE_SPACER_FORCE_TO_ELEM', show_progress='SHOW_PROGRESS_NONE', show_graphic='SHOW_GRAPHIC_NO', result_output=['D', 'V', 'A', 'R', 'C', 'M', 'E', 'F', 'N', 'S', 'Q', 'B', 'H', 'U', '*'], sID=None)¶
Analysis task module using GSRelax solver. Performs: non-linear static, form-finding, and component buckling analysis
- Parameters:
index – index
name – task name
stage – analysis stage, set to 0 to analyse whole model
solution – solution type
scheme – load scheme
beam_geom_stiffness – consider beam geometric stiffness
shell_geom_stiffness – consider shell geometric stiffness
first_load_increment – first load increment percentage
min_load_increment – minimum load increment percentage
max_load_increment – maximum load increment percentage
termination_control – termination condition
termination_value – maximum number of cycles or maximum minutes to be run
residual_control – relative or absolute residual
force_residual – force residual value
moment_residual – moment residual value
disp_control – displacement controlled
disp_control_node – node where displacement control is checked
disp_control_dir – direction of the displacement control
disp_control_limit – limiting displacement value
load_control – load controlled
load_control_factor – control load factor
element_list – element list, used by component buckling analysis
report_cycle – number of cycles between progress dialog box updates
graphic_cycle – number of cycles between graphic updates
save_residual – residual saving option
damping_type – type of damping
percent_damp_disp – percentage of damping for displacement
percent_damp_rotn – percentage of damping for rotation
dummy_mass_factor – dummy mass factor
dummy_inertia_factor – dummy inertia factor
dummy_mass_power – dummy mass power
dummy_inertia_power – dummy inertia power
auto_dummy_mass – automatic dummy mass option
auto_damping – automatic damping option
save_elem_load – save element force as load after form-finding
save_spacer_load – save spacer force as load after form-finding
show_progress – … #Confirm with GSA
show_graphic – … #Confirm with GSA
result_output – a list of AnalysisResultOutputEnum indicating results to be stored
sID – sID
- classmethod from_gwa(gwa)¶
Interprets TASK gwa record and returns an AnalysisTaskGSRelax object.
- Parameters:
gwa – GWA record seperated into a list
- Returns:
AnalysisTaskGSRelax object
- static list_from_gwa(desc)¶
Unrolls list description. Inserts named lists as is.
- Parameters:
desc – GWA list description
- Returns:
List of entities in GWA list description
- to_gwa()¶
Compiles TASK gwa record.
- Returns:
TASK gwa record
- class gsapy.modules.AnalysisTaskGSS(index, name, stage=0, solution='STATIC', mode_1=0, mode_2=0, num_iter=0, p_delta='SELF', p_delta_case=None, prestress=None, result_output=['D', 'V', 'A', 'R', 'C', 'M', 'E', 'F', 'N', 'S', 'Q', 'B', 'H', 'U', '*'], prune=False, geometry_check='FATAL', lower_cutoff=None, upper_cutoff=None, raft_precision='RAFT_LO', save_residual='RESID_NO', shift=0, stiffness_factor=1, mass_filter=0, max_cycle=1000000, sID=None)¶
Updated class for the Task.2 keyword. All tasks use this, instead of separate TASK classes
TASK.2 Syntax
- Parameters:
index – index
name – task name
stage – analysis stage
GSS – GSS solver
Solution – solution type: UNDEF (no solution specified), STATIC, MODAL, RITZ, BUCKLING, STATIC_P_DELTA, MODAL_P_DELTA, RITZ_P_DELTA, MASS, STABILITY, STABILITY_P_DELTA, STATIC_NL_P_DELTA (used internally only), BUCKLING_NL, INFLUENCE (used internally in bridge analysis)
mode_1 – number of high modes + start mode
mode_2 – number of low modes + number of modes
num_iter – number of iterations
p_delta – DEFINE: one p-delta case used for all analysis cases, SELF: each analysis case defines its own p-delta case, An: analysis case n provides the p-delta effects, Cn: combination case n provides the p-delta effects
p_delta_case – P-delta case description
prestress – prestress case description
result – results to be stored - a string where the letters have the following meaning D: displacements, V: velocities, A: accelerations, R: reactions, C: constraints, M: mass, E: element displacements, F: forces and moments, N: 2D forces N & Q and moments M, S: 2D stresses, U: strain energy, T: total loads and total reactions, *: values at centre only for 2D results
prune – pruning of influence results (bridge analysis) INFL: prune influence results, NONE: no pruning of results
geometry – 2D element geometry checks ERROR: treat geometry check failures as errors, SEVERE: treat geometry check failures as severe warnings
lower – lower cut-off (frequency or load factor) NONE: none set, value: cut-off value
upper – upper cut-off (frequency or load factor) NONE: none set, value: cut-off value
raft – this uses enhanced precision for a raft analysis RAFT_HI: use high precision for raft analysis, RAFT_LO: use low (normal) precision for raft analysis
residual – save residual to file RESID_NO: don’t save, RESID_NOCONV: save if not converged, RESID_YES: always save
shift – shift applied in eigensolver
stiff – stiffness factor
mass_filter – effective mass ratio for filtering modes
max_cycle – maximum number of cycles for iterative solutions
- classmethod from_gwa(gwa)¶
Interprets TASK gwa record and returns an AnalysisTaskGSS object.
- Parameters:
gwa – GWA record seperated into a list
- Returns:
AnalysisTaskGSS object
- to_gwa()¶
Compiles TASK gwa record.
- Returns:
TASK gwa record
- class gsapy.modules.AnalysisTaskGSS1(index, name, stage=0, solution='STATIC', mode_1=0, mode_2=0, num_iter=0, p_delta='SELF', p_delta_case=None, prestress=None, result_output=['D', 'V', 'A', 'R', 'C', 'M', 'E', 'F', 'N', 'S', 'Q', 'B', 'H', 'U', '*'], front_option='MIN', front_vector=None, prune=False, geometry_check='FATAL', lower_cutoff=None, upper_cutoff=None, raft_precision=None, save_residual='RESID_NO', shift=0, stiffness_factor=1, sID=None)¶
Analysis task module using GSS solver. Performs: static, modal, ritz, buckling, static P-delta, modal P-delta, ritz P-delta, mass, model stability, and model stability P-delta analysis
- Parameters:
index – index
name – task name
stage – analysis stage, set to 0 to analyse whole model
solution – solution type
mode_1 – number of high modes or starting mode
mode_2 – number of low modes or number of modes
num_iter – number of iterations
p_delta – static p-delta option
p_delta_case – p-delta case description
prestress – prestress case description
result_output – a list of AnalysisResultOutputEnum indicating results to be stored
front_option – front order option
front_vector – a list of X, Y, and Z components of the front vector. Set as None to define the front vector automatically
prune – prune analysis result
geometry_check – how to treat 2D element geometry checks
lower_cutoff – lower cut-off of frequency or load factor
upper_cutoff – upper cut-off of frequency or load factor
raft_precision – raft precision option
save_residual – residual saving option
shift – shift applied in eigensolver
stiffness_factor – stiffness factor
sID – sID
- classmethod from_gwa(gwa)¶
Interprets TASK gwa record and returns an AnalysisTaskGSS object.
- Parameters:
gwa – GWA record separated into a list
- Returns:
AnalysisTaskGSS object
- to_gwa()¶
Compiles TASK gwa record.
- Returns:
TASK gwa record
- class gsapy.modules.AnalysisTaskGSSpec¶
This class exists solely to hold a static from_gwa method that dispatches to the various sub-classes.
- classmethod from_gwa(gwa)¶
Interprets TASK gwa record and returns an object of the appropriate submodule.
- Parameters:
gwa – GWA record separated into a list
- Returns:
AnalysisTask submodule object
- class gsapy.modules.AnalysisTaskGSSpecDynamicResp(index, name, stage=0, mode_task=0, basic_combo_method='CQC', axis=0, spectrum_x=1, modes_x='all', spectrum_y=1, modes_y='all', spectrum_z=1, modes_z='all', include_combined='NONE', rigorous_analysis=True, result_output=['D', 'V', 'A', 'R', 'C', 'M', 'E', 'F', 'N', 'S', 'Q', 'B', 'H', 'U', '*'], source=1, drift=[], disp=[], sID=None)¶
Analysis task module using GSRelax solver for response spectrum analysis.
- Parameters:
index – index
name – task name
stage – analysis stage, set to 0 to analyse whole model
mode_task – task containing modal results
basic_combo_method – basic combination method
axis – axis
spectrum_x – spectrum in x direction
modes_x – modes in x direction
spectrum_y – spectrum in y direction
modes_y – modes in y direction
spectrum_z – spectrum in z direction
modes_z – modes in z direction
include_combined – include basic combination results (NONE or SRSS)
rigorous_analysis – rigorous or fast analysis
result_output – a list of AnalysisResultOutputEnum indicating results to be stored
source – source associated with task
drift – a list of named tuples [‘name’,’x’,’y’,’storey_list’] indicating storey drifts and forces
disp – a list of named tuples [‘name’,’node_1’,’node_2’,’axis’] indicating relative nodal displacements
sID – sID
- classmethod from_gwa(gwa)¶
Interprets TASK gwa record and returns an AnalysisTaskGSSpecDynamicResp object.
- Parameters:
gwa – GWA record seperated into a list
- Returns:
AnalysisTaskGSSpecDynamicResp object
- to_gwa()¶
Compiles TASK gwa record.
- Returns:
TASK gwa record
- class gsapy.modules.AnalysisTaskGSSpecHarmonic(index, name, stage=0, mode_task=0, load_description='', freq_start=1, freq_end=2.5, freq_inc=0.2, damp_calc='CONST', damp_table_ref=0, damp_ratio=0.02, result_output=['D', 'V', 'A', 'R', 'C', 'M', 'E', 'F', 'N', 'S', 'Q', 'B', 'H', 'U', '*'], sID=None)¶
Analysis task module using GSRelax solver for harmonic analysis.
- Parameters:
index – index
name – task name
stage – analysis stage, set to 0 to analyse whole model
mode_task – task containing modal results
load_description – load description
freq_start – start load frequency
freq_end – end load frequency
freq_inc – load frequency increment
damp_calc – damping calculation method
damp_table_ref – damping table reference
damp_ratio – percentage of critical damping ratio
result_output – a list of AnalysisResultOutputEnum indicating results to be stored
sID – sID
- classmethod from_gwa(gwa)¶
Interprets TASK gwa record and returns an AnalysisTaskGSSpecHarmonic object.
- Parameters:
gwa – GWA record seperated into a list
- Returns:
AnalysisTaskGSSpecHarmonic object
- to_gwa()¶
Compiles TASK gwa record.
- Returns:
TASK gwa record
- class gsapy.modules.AnalysisTaskGSSpecPseudoRSA(index, name, stage=0, mode_task=0, basic_combo_method='CQC', axis=0, include_x=True, spectrum_x=1, modes_x='all', include_y=True, spectrum_y=1, modes_y='all', include_z=True, spectrum_z=1, modes_z='all', rigorous_analysis=True, rigid_method='RESP_NO_RIGID', rigid_freq=33, low_trans_freq=0, upper_trans_freq=0, damp_calc='CODE', damp_scale='CODE', damp_ratio=0.02, result_output=['D', 'V', 'A', 'R', 'C', 'M', 'E', 'F', 'N', 'S', 'Q', 'B', 'H', 'U', '*'], source=1, drift=[], disp=[], mode=[], sID=None)¶
Analysis task module using GSRelax solver for response spectrum analysis. Does not support CQC3 combination.
- Parameters:
index – index
name – task name
stage – analysis stage, set to 0 to analyse whole model
mode_task – task containing modal results
basic_combo_method – basic combination method
axis – axis
include_x – include response in x direction
spectrum_x – spectrum in x direction
modes_x – modes in x direction
include_y – include response in y direction
spectrum_y – spectrum in y direction
modes_y – modes in y direction
include_z – include response in z direction
spectrum_z – spectrum in z direction
modes_z – modes in z direction
rigorous_analysis – rigorous or fast analysis
rigid_method – rigid response method
rigid_freq – rigid frequency
low_trans_freq – lower transition frequency
upper_trans_freq – upper transition frequency
damp_calc – damping calculation method
damp_scale – scaling of response spectrum for damping
damp_ratio – damping ratio for constant damping calculation
result_output – a list of AnalysisResultOutputEnum indicating results to be stored
source – source associated with task
drift – a list of named tuples [‘name’,’x’,’y’,’storey_list’] indicating storey drifts and forces
disp – a list of named tuples [‘name’,’node_1’,’node_2’,’axis’] indicating relative nodal displacements
mode – a list of named tuples [‘freq’,’m’,’u_x’,’u_y’,’u_z’] indicating modal sets
sID – sID
- classmethod from_gwa(gwa)¶
Interprets TASK gwa record and returns an AnalysisTaskGSSpecPseudoRSA object.
- Parameters:
gwa – GWA record seperated into a list
- Returns:
AnalysisTaskGSSpecPseudoRSA object
- to_gwa()¶
Compiles TASK gwa record.
- Returns:
TASK gwa record
- class gsapy.modules.AnalysisTaskGSSpecTimeHistory(index, name, stage=0, mode_task=0, excite_type='LOAD_EXCITE', load_description='', history_ref=1, time_int_out=0.1, time_int_hist_out=0.001, time_stop=1, time_step=0, damp_calc='CONST', damp_table_ref=0, damp_ratio=0.02, result_output=['D', 'V', 'A', 'R', 'C', 'M', 'E', 'F', 'N', 'S', 'Q', 'B', 'H', 'U', '*'], sID=None)¶
Analysis task module using GSRelax solver for time history analysis.
- Parameters:
index – index
name – task name
stage – analysis stage, set to 0 to analyse whole model
mode_task – task containing modal results
excite_type – type of excitation
load_description – load description
history_ref – load curve reference for time history
time_int_out – time interval for output
time_int_hist_out – time interval for time-history output
time_stop – stop time
time_step – time step, set to 0 for auto
damp_calc – damping calculation method
damp_table_ref – damping table reference
damp_ratio – percentage of critical damping ratio
result_output – a list of AnalysisResultOutputEnum indicating results to be stored
sID – sID
- classmethod from_gwa(gwa)¶
Interprets TASK gwa record and returns an AnalysisTaskGSSpecTimeHistory object.
- Parameters:
gwa – GWA record seperated into a list
- Returns:
AnalysisTaskGSSpecTimeHistory object
- to_gwa()¶
Compiles TASK gwa record.
- Returns:
TASK gwa record
- gsapy.modules.Beam(index, name='', colour='NO_RGB', prop=1, group=1, topo=(0, 0), orient_node=None, orient_angle=0, releases=None, offsets=None, action='NORMAL', dummy=False)¶
- Parameters:
index
name
colour
prop
group
topo
orient_node
orient_angle
releases
offset_type
offsets
action
dummy
- Returns:
- class gsapy.modules.ConstraintRigid(name='', sID=None, master=0, linkage_type='ALL', slaves=None, stage_list='all', parent_member='')¶
Uses RIGID.3 syntax - RIGID.3 | name | master | type | slaves | stage | parent_member Uses RIGID.2 syntax - RIGID.2 | name | master | type | slaves | stage Stages are group strings, either all or group names Slaves are node GSA lists
- classmethod from_gwa(gwa)¶
- Parameters:
gwa
- Returns:
- to_gwa()¶
- Returns:
- class gsapy.modules.Element(index, sID=None, name='', colour='NO_RGB', type='BEAM', prop=1, group=1, topo=[1, 1], orient_node=0, orient_angle=0, releases=None, offsets=[0.0, 0.0, 0.0, 0.0], action='Normal', dummy=False, parent_member=None)¶
- Uses EL.4 syntax | num | name | colour | type | prop | group | topo() | orient_node | orient_angle |
is_rls { | rls { | k } } off_x1 | off_x2 | off_y | off_z | dummy | parent
- classmethod from_gwa(gwa)¶
Interprets ELEM gwa line and returns a namedtuple of its properties
- static release_from_gwa(tokens, degrees)¶
Each node in an element can have the following releases:
0D - unreleasable (Ground Spring, Mass)
1D - unreleasable (Bar, Tie, Strut, Cable, Link, Spacer, Spring)
1D - releasable (Beam) - Fixed, Released, Stiffness
2D - (Quad4, Quad8, Tri3, Tri6) - Fixed or Released
Release entries are in form x,y,z,xx,yy,zz (translation + rotation) or x,y,z (translation)
Releases are always local.
R = release
F = fixed
K = stiffness
- Parameters:
tokens – deque of gwa_command to parse
degrees – degrees of freedom for interpreting releases
- Returns:
gwa file, and list of lists of releases, one list of releases per node. Each item in the list of releases is either ‘F’, ‘R’, or the stiffness value as a float.
- static release_to_gwa(releases)¶
- Parameters:
releases
- Returns:
- to_gwa()¶
- Returns:
- class gsapy.modules.GSAList(index, sID='', name='list', type='NODE', description='')¶
Uses LIST syntax: LIST | num | name | type | list
- class gsapy.modules.GravityLoad(name='', entity_type='MEMBER', element_list='all', node_list='all', case=1, factors=[0, 0, -1])¶
Uses LOAD_GRAVITY.4 syntax | name | entity_type | elemlist | nodelist | case | x | y | z
- classmethod from_gwa(gwa)¶
- Parameters:
tokens
- Returns:
- class gsapy.modules.Member(index, name='', colour='NO_RGB', member_type='1D_GENERIC', exposure='ALL', prop=1, group=1, topo=[1, 2], orient_node=0, orient_angle=0, mesh_size=1, is_intersector=True, analysis_type='BEAM', fire_resistance=0, limiting_temperature=550, times=[0, 0, 0, 0], dummy=False, releases=[['F', 'F', 'F', 'F', 'F', 'F'], ['F', 'F', 'F', 'F', 'F', 'F']], restraints='', effective_length={'method': 'AUTOMATIC'}, load_height=0, load_ref=0, is_off='NO_OFF', offset_auto={'off_auto_x1': 'MAN', 'off_auto_x2': 'MAN'}, offset=[0, 0, 0, 0], ltb_factor=None, moment_amplification_factor_strong_axis=None, moment_amplification_factor_weak_axis=None, reinforcement_2d=None, mesh_mode='MIXED', sID='')¶
Uses MEMB.8 syntax from GSA 10.1
- classmethod from_gwa(gwa)¶
Interprets MEMB gwa line and returns a named tuple of its properties
- static release_from_gwa(tokens, degrees)¶
Each node in an element can have the following releases:
0D - unreleasable (Ground Spring, Mass)
1D - unreleasable (Bar, Tie, Strut, Cable, Link, Spacer, Spring)
1D - releasable (Beam) - Fixed, Released, Stiffness
2D - (Quad4, Quad8, Tri3, Tri6) - Fixed or Released
Release entries are in form x,y,z,xx,yy,zz (translation + rotation) or x,y,z (translation)
Releases are always local.
R = release
F = fixed
K = stiffness
- Parameters:
tokens – deque of gwa_command to parse
degrees – degrees of freedom for interpreting releases
- Returns:
gwa file, and list of lists of releases, one list of releases per node. Each item in the list of releases is either ‘F’, ‘R’, or the stiffness value as a float.
- static release_to_gwa(releases)¶
- Parameters:
releases
- Returns:
- to_gwa()¶
- Returns:
- class gsapy.modules.Node(index, name=None, colour='NO_RGB', coords=[0, 0, 0], restraint='free', axis=0, mesh_size=None, spring_property=None, mass_property=None, damper_property=None, sID=None)¶
Uses NODE.3 syntax: I’ve not worked out the full chang in sysntax yet, this is based on what i’ve found by trial and error NODE.3 | num | name | colour | x | y | z | restraint | axis | mesh size | springProperty | massProperty | damperProperty
- classmethod from_gwa(gwa)¶
- Parameters:
gwa
- Returns:
- to_gwa()¶
- Returns:
- class gsapy.modules.Profile¶
Module to help create section profile descriptions. Not to be used by itself.
- classmethod from_desc(desc)¶
Interprets a section description and returns a Profile submodule object
- Parameters:
desc – section description
- Returns:
Profile submodule object
- classmethod get_type(desc)¶
Extracts the profile type from a section description.
- Parameters:
desc – section description
- Returns:
profile type
- classmethod get_unit(desc)¶
Extracts the units from a section description.
- Parameters:
desc – section description
- Returns:
unit string
- class gsapy.modules.ProfileAngle(d, w, t_flange, t_web, unit='mm')¶
Angle section description module
- Parameters:
d – depth
w – width
t_flange – flange thickness
t_web – web thickness
unit – unit
- classmethod from_desc(desc)¶
Interprets a section description and returns a ProfileAngle object
- Parameters:
desc – section description
- Returns:
ProfileAngle object
- to_desc()¶
Compiles section description
- Returns:
section description
- class gsapy.modules.ProfileCatalogue(type, section)¶
Catalogue section description module
- Parameters:
type – type of section
section – section
- classmethod from_desc(desc)¶
Interprets a section description and returns a ProfileCatalogue object
- Parameters:
desc – section description
- Returns:
ProfileCatalogue object
- to_desc()¶
Compiles section description
- Returns:
section description
- class gsapy.modules.ProfileChannel(d, w, t_flange, t_web, unit='mm')¶
Channel section description module
- Parameters:
d – depth
w – width
t_flange – flange thickness
t_web – web thickness
unit – unit
- classmethod from_desc(desc)¶
Interprets a section description and returns a ProfileChannel object
- Parameters:
desc – section description
- Returns:
ProfileChannel object
- to_desc()¶
Compiles section description
- Returns:
section description
- class gsapy.modules.ProfileCircular(d, unit='mm')¶
Circular section description module
- Parameters:
d – diameter
unit – unit
- classmethod from_desc(desc)¶
Interprets a section description and returns a ProfileCircular object
- Parameters:
desc – section description
- Returns:
ProfileCircular object
- to_desc()¶
Compiles section description
- Returns:
section description
- class gsapy.modules.ProfileCircularHollow(d, t, unit='mm')¶
Hollow circular section description module
- Parameters:
d – depth
t – thickness
unit – unit
- classmethod from_desc(desc)¶
Interprets a section description and returns a ProfileCircularHollow object
- Parameters:
desc – section description
- Returns:
ProfileCircularHollow object
- to_desc()¶
Compiles section description
- Returns:
section description
- class gsapy.modules.ProfileDoubleAngle(d, w, t_flange, t_web, unit='mm')¶
Double angle section description module
- Parameters:
d – depth
w – width
t_flange – flange thickness
t_web – web thickness
unit – unit
- classmethod from_desc(desc)¶
Interprets a section description and returns a ProfileDoubleAngle object
- Parameters:
desc – section description
- Returns:
ProfileDoubleAngle object
- to_desc()¶
Compiles section description
- Returns:
section description
- class gsapy.modules.ProfileDoubleChannel(d, w, t_flange, t_web, unit='mm')¶
Double channel section description module
- Parameters:
d – depth
w – width
t_flange – flange thickness
t_web – web thickness
unit – unit
- classmethod from_desc(desc)¶
Interprets a section description and returns a ProfileDoubleChannel object
- Parameters:
desc – section description
- Returns:
ProfileDoubleChannel object
- to_desc()¶
Compiles section description
- Returns:
section description
- class gsapy.modules.ProfileFabricated(y_start, z_start, y_end, z_end, t, unit='mm')¶
Fabricated section description module
- Parameters:
y_start – list of segment starting y coordinates
z_start – list of segment starting z coordinates
y_end – list of segment ending y coordinates
z_end – list of segment ending z coordinates
t – list of segment thickness
unit – unit
- classmethod from_desc(desc)¶
Interprets a section description and returns a ProfileFabricated object
- Parameters:
desc – section description
- Returns:
ProfileFabricated object
- to_desc()¶
Compiles section description
- Returns:
section description
- class gsapy.modules.ProfileISection(d, w, t_flange, t_web, unit='mm')¶
I section description module
- Parameters:
d – depth
w – width
t_flange – flange thickness
t_web – web thickness
unit – unit
- classmethod from_desc(desc)¶
Interprets a section description and returns a ProfileISection object
- Parameters:
desc – section description
- Returns:
ProfileISection object
- to_desc()¶
Compiles section description
- Returns:
section description
- class gsapy.modules.ProfilePerimeter(y, z, unit='mm')¶
Perimeter section description module
- Parameters:
y – list of y coordinate values
z – list of z coordinate values
unit – unit
- classmethod from_desc(desc)¶
Interprets a section description and returns a ProfilePerimeter object
- Parameters:
desc – section description
- Returns:
ProfilePerimeter object
- to_desc()¶
Compiles section description
- Returns:
section description
- class gsapy.modules.ProfileRectangular(d, h, unit='mm')¶
Rectangular section description module
- Parameters:
d – depth
h – height
unit – unit
- classmethod from_desc(desc)¶
Interprets a section description and returns a ProfileRectangular object
- Parameters:
desc – section description
- Returns:
ProfileRectangular object
- to_desc()¶
Compiles section description
- Returns:
section description
- class gsapy.modules.ProfileRectangularHollow(d, h, t_side, t_bot, unit='mm')¶
Hollow rectangular section description module
- Parameters:
d – depth
h – height
t_side – side thickness
t_bot – top and bottom thickness
unit – unit
- classmethod from_desc(desc)¶
Interprets a section description and returns a ProfileRectangularHollow object
- Parameters:
desc – section description
- Returns:
ProfileRectangularHollow object
- to_desc()¶
Compiles section description
- Returns:
section description
- class gsapy.modules.ProfileTeeSection(d, w, t_flange, t_web, unit='mm')¶
Tee section description module
- Parameters:
d – depth
w – width
t_flange – flange thickness
t_web – web thickness
unit – unit
- classmethod from_desc(desc)¶
Interprets a section description and returns a ProfileTeeSection object
- Parameters:
desc – section description
- Returns:
ProfileTeeSection object
- to_desc()¶
Compiles section description
- Returns:
section description
- gsapy.modules.Quad4(index, name='', colour='NO_RGB', prop=1, group=1, topo=(0, 0, 0, 0), orient_angle=0, releases=None, offsets=None, dummy=False)¶
- Parameters:
index
name
colour
prop
group
topo
orient_angle
releases
offset_type
offsets
dummy
- Returns:
- gsapy.modules.Quad8(index, name='', colour='NO_RGB', prop=1, group=1, topo=(0, 0, 0, 0, 0, 0, 0, 0), orient_angle=0, releases=None, offsets=None, dummy=False)¶
- Parameters:
index
name
colour
prop
group
topo
orient_angle
releases
offset_type
offsets
dummy
- Returns:
- class gsapy.modules.Rebar_Layout¶
Uses REBAR_2D.1 syntax
- classmethod from_gwa(gwa)¶
- Parameters:
gwa
- Returns:
- class gsapy.modules.Section(index: int, name: str = '', colour: Colours = 'NO_RGB', mat: MaterialEnum = 'GENERIC', grade: int = 1, anal: int = 0, desc: str = 'STD%C%100', cost: float = 0, ref_point='', off_y=0, off_z=0, sID: str = '')¶
Section module.
- Parameters:
index – index
sID – sID
name – name
colour – colour (from gsapy.enum.Colours)
mat – material type (from gsapy.enum.MaterialEnum)
grade – index of design material
anal – index of analysis material, set to 0 to determine from grade
desc – section description string or Profile object
cost – cost per unit mass
- classmethod from_gwa(gwa)¶
Interprets PROP_SPR gwa line and returns a named tuple of its properties
- property profile¶
Interprets the section description and returns an object of the appropriate submodule.
- Returns:
Profile submodule object
- to_gwa()¶
- Returns:
- class gsapy.modules.ThreeDimLoadFace(sID=None, name='', elem_list=None, case=1, axis='GLOBAL', type='CONS', proj=False, face=0, dir='Z', values=0)¶
Based on LOAD_3D_FACE.2
- classmethod from_gwa(gwa)¶
- Parameters:
gwa
- Returns:
- to_gwa()¶
- Returns:
- class gsapy.modules.TwoDimLoadEdge(sID=None, name='', elem_list=None, case=1, axis='GLOBAL', edge='1', dir='Z', value_1=0, value_2=0)¶
Based on LOAD_2D_EDGE.2
- class gsapy.modules.TwoDimLoadFace(sID=None, name='', entity_type='MEMBER', elem_list=None, case=1, axis='GLOBAL', type='CONS', proj: bool = False, dir='Z', values_1=0, values_2=0, values_3=0, values_4=0)¶
Based on LOAD_2D_FACE.3
- classmethod from_gwa(gwa)¶
- Parameters:
gwa
- Returns:
- to_gwa()¶
- Returns:
- class gsapy.modules.UserModuleElement(index, name, colour='NO_RGB', axis='GLOBAL', dir='NONE', dimension='NULL', contour='BLOB', is_centre='NOT_CENTRE_ONLY_2D', data=None, sID='')¶
Uses USER_MOD_ELEM_TITLE.2 syntax from GSA 10.1
User modules for elements.
- Parameters:
index – index
sID – sID
name – name
colour – colour
axis – axis to display in
dir – diagram direction
dimension – units for module
contour – contour type
is_centre – user module is configured for centre values only on 2D elements, or not
data – list of [element, position, value] of user module data
- add_data(element, position, value)¶
Add data to user module.
- Parameters:
element – element index
position – position on element
value – value
- clear_data()¶
Clears data.
- to_gwa()¶
- Returns:
- update_data(element, position, value)¶
Updates data to user module. If data was not originally there, adds new row.
- Parameters:
element – element index
position – position on element
value – value
- class gsapy.modules.UserModuleMember(index, name, colour='NO_RGB', axis='GLOBAL', dir='NONE', dimension='NULL', contour='BLOB', data=None, sID='')¶
Uses USER_MOD_MEMBER_TITLE.2 syntax from GSA 10.1
User modules for members.
- Parameters:
index – index
sID – sID
name – name
colour – colour
axis – axis to display in
dir – diagram direction
dimension – units for module
contour – contour type
data – list of [member, position, value] of user module data
- add_module(member, position, value)¶
Add data to user module.
- Parameters:
member – member index
position – position on element
value – value
- clear_modules()¶
Clears data.
- to_gwa()¶
- Returns:
- update_module(member, position, value)¶
Updates data to user module. If data was not originally there, adds new row.
- Parameters:
member – member index
position – position on element
value – value
- class gsapy.modules.UserModuleNode(index, name, colour='NO_RGB', axis='GLOBAL', dir='NONE', dimension='NULL', data=None, sID='')¶
Uses USER_MOD_NODE_TITLE.2 syntax for GSA 10.1 User modules for members.
- Parameters:
index – index
sID – sID
name – name
colour – colour
axis – axis to display in
dir – diagram direction
dimension – units for module
data – list of [member, position, value] of user module data
- add_module(node, value)¶
Add data to user module.
- Parameters:
node – node index
value – value
- clear_modules()¶
Clears data.
- to_gwa()¶
- Returns:
- update_module(node, value)¶
Updates data to user module. If data was not originally there, adds new row.
- Parameters:
node – node index
value – value
- class gsapy.modules.damper_property(sID=None, num=1, name='', colour='NO_RGB', type='GENERAL', damp_x=0, damp_y=0, damp_z=0, damp_xx=0, damp_yy=0, damp_zz=0)¶
damper property module.
- Parameters:
num – index
name – name
colour – colour (from gsapy.enum.Colours)
type – TRAN: transitional (1 dof), ROTN: rotational (1 dof), GENERAL: general
damp_x – damping value in x direction
damp_y – damping value in y direction
damp_z – damping value in z direction
damp_xx – damping value in xx direction
damp_yy – damping value in yy direction
damp_zz – damping value in zz direction
- classmethod from_gwa(gwa)¶
Interprets PROP_DAMP.2 gwa line and returns a named tuple of its properties
- to_gwa()¶
- Returns:
- class gsapy.modules.mass_property(sID=None, num=1, name='', colour='NO_RGB', mass=0, Ixx=0, Iyy=0, Izz=0, Ixy=0, Iyz=0, Izx=0, mod='DEF', mod_x=0, mod_y=0, mod_z=0)¶
Mass property module. :param num: index :param sID: sID :param name: name :param colour: colour (from gsapy.enum.Colours) :param axis: type of property :param mass: mass of property :param Ixx_default = 0 :param Iyy_default = 0 :param Izz_default = 0 :param Ixy_default = 0 :param Iyz_default = 0 :param Izx_default = 0 :param modification status: boolean if mass has been modified :param mod_x: modified x mass :param mod_y: modified y mass :param mod_z: modified z mass
- classmethod from_gwa(gwa)¶
Interprets PROP_MASS.3 gwa line and returns a named tuple of its properties
- to_gwa()¶
- Returns:
- class gsapy.modules.spring_property(sID=None, num=1, name='', colour='NO_RGB', type='GENERAL', curve_x=0, stiff_x=0, curve_y=0, stiff_y=0, curve_z=0, stiff_z=0, curve_xx=0, stiff_xx=0, curve_yy=0, stiff_yy=0, curve_zz=0, stiff_zz=0, damping_x=0, damping_y=0, damping_z=0, damping_xx=0, damping_yy=0, damping_zz=0, matrix=0, damping=0, pos_lock_up=0, neg_lock_up=0, friction=0)¶
Spring property module. :param num: index :param sID: sID :param name: name :param colour: colour (from gsapy.enum.Colours) :param type: type of property
SPRING: Spring type Property (GeneraL) :param curve_x: nonlinear spring curve ref in x direction (if 0, spring in this direction is elastic; default is linear) :param stiff_x: stiffness value in x direction :param curve_y: nonlinear spring curve ref in y direction (if 0, spring in this direction is elastic; default is linear) :param stiff_y: stiffness value in y direction :param curve_z: nonlinear spring curve ref in z direction (if 0, spring in this direction is elastic; default is linear) :param stiff_z: stiffness value in z direction :param curve_xx: nonlinear spring curve ref in xx direction (if 0, spring in this direction is elastic; default is linear) :param stiff_xx: stiffness value in xx direction :param curve_yy: nonlinear spring curve ref in yy direction (if 0, spring in this direction is elastic; default is linear) :param stiff_yy: stiffness value in yy direction :param curve_zz: nonlinear spring curve ref in zz direction (if 0, spring in this direction is elastic; default is linear) :param stiff_zz: stiffness value in zz direction :param damping: spring damping value
DAMPER: Damper type Property (Doesn’t seem to exist within GSA 10.1?) :param damping_x: damping value in x direction :param damping_y: damping value in y direction :param damping_z: damping value in z direction :param damping_x: damping value in xx direction :param damping_y: damping value in yy direction :param damping_z: damping value in zz direction
MATRIX: Matrix type Property (Matrix) :param matrix: spring stiffness matrix :param damping: damping values
FRICTION: Friction type Property (Friction) :param stiff_x: stiffness value in x :param stiff_y: stiffness value in y :param stiff_z: stiffness value in z :param friction: friction coefficients :param damping: damping values
type: type of Property (Axial,Torsional, Tension-Only, Compression-Only, Connector, Lockup, Gap, ) :param stiff_x: stiffness value in x :param damping: damping value :param +ve_lock_up: Tension/Compression :param -ve_lock_up: Tension/Compression
- classmethod from_gwa(gwa)¶
Interprets PROP_SPR gwa line and returns a named tuple of its properties
- to_gwa()¶
- Returns:
gsapy.util - utility classes and functions¶
- exception gsapy.util.GSAError(*args, **kwargs)¶
A class for passing GSA - specific error messages.
gsapy.util.parse_list¶
- gsapy.util.parse_list.expand_list(gsa_list)¶
Expands a GSA-style list into a list of individual items. The list can either be a list of number or a list of analysis and combination cases. This list contains all the possible items, even those that do not exist in a particular GSA model.
- Parameters:
gsa_list – a GSA-style list description string
- Returns:
a python list of individual items: either integers or GSA-style case strings
- gsapy.util.parse_list.expand_tree(root, items=None)¶
Expands a parsed Abstract Syntax Tree into a list of individual items.
This list contains all the possible items, even those that do not exist in a particular GSA model.
- Parameters:
root – a node of a parse AST or a list of such nodes
items – a list to add expanded items to. If none is passed, a new list is created.
- Returns:
the items list with items added or removed (in the case of NOT), or a new list if none was specified
- gsapy.util.parse_list.parse_list(list)¶
This function takes a GSA-style list description and parses it into an Abstract Syntax Tree (AST). The nodes of the AST are python dicts, which is only guaranteed to have a ‘type’ key. Each type of node has different properties.
NUMBER: ‘index’ - the number
CASE: ‘case_type’ - A or C, ‘index’ - the case number, ‘perm’ - the permutation or None, ‘modifier’ - the case modifier (MIN, MAX, ABS, SIGNABS) or None
NOT: ‘value’ - a node or list of nodes
‘all’ - no other keys
- Parameters:
list – a GSA-style list description string
- Returns:
a list of parsed list nodes (NUMBER, CASE, NOT, ALL, sub-lists)
gsapy.util.registry¶
A command-line runnable script to clear gsapy-generated events from the Windows registry.
To determine how many events are stored in the windows registry, run:
python -m gsapy.util.registry
If there are more than 10,000 events generated by a script, you may encounter performance issues. The following command will delete the script-generated events:
python -m gsapy.util.registry -d
- gsapy.util.registry.registry_cleanup(delete_keys: bool = False, list_values: bool = False)¶
Checks the Windows registry for GSA events, with options to delete or list the events generated by gsapy.
- Parameters:
- Returns:
n_values, n_com_events: a tuple containing the total number of GSA events in the registry and the number of those generated by gsapy