Oasys.THIS.Group class
Properties
- property Group.crv_at_ymax: integer
Curve number of the curve with the maximum Y value in the group
- property Group.crv_at_ymin: integer
Curve number of the curve with the minimum Y value in the group
- property Group.curves(read only): integer
Number of curves in the group
- property Group.name(read only): string
Group name
- property Group.x_at_ymax: float
X value at the maximum Y value over all curves in the group
- property Group.x_at_ymin: float
X value at the minimum Y value over all curves in the group
- property Group.x_at_yminpos: float
X value at the minimum positive Y value over all curves in the group
- property Group.xmax: float
Maximum X value over all curves in the group
- property Group.xmin: float
Minimum X value over all curves in the group
- property Group.xminpos: float
Minimum positive X value over all curves in the group
- property Group.ymax: float
Maximum Y value over all curves in the group
- property Group.ymin: float
Minimum Y value over all curves in the group
- property Group.yminpos: float
Minimum positive Y value over all curves in the group
Constructor
Static methods
- classmethod Group.DeleteGroup(group_id_or_name, delete_automatic_groups=Oasys.gRPC.defaultArg)
Deletes a curve group
- Parameters:
group_id_or_name (integer or string) – ID of group to delete or name of group. If this argument is 0, delete all groups. Automatically generated groups won’t be deleted unless the next argument is set to 1
delete_automatic_groups (integer) – Optional. If this argument is 1, automatic groups can be deleted. If no argument or 0, automatic groups cant be deleted
- Returns:
No return value
- Return type:
None
Example
To delete group n
Oasys.THIS.Group.DeleteGroup(n)
- classmethod Group.Get(name)
Returns a group object
- Parameters:
name (string) – Name of the group to return object for
- Returns:
Group object (or None if the group does not exist)
- Return type:
Group
Example
To get the group called ‘left’
group = Oasys.THIS.Group.Get("left")
- classmethod Group.GetFromID(id)
Returns a group object
- Parameters:
id (integer) – ID of the group to return object for
- Returns:
Group object (or None if the group does not exist)
- Return type:
Group
Example
To get the group number 1
group = Oasys.THIS.Group.GetFromID(1)
- classmethod Group.Total()
Returns the total number of curve group currently defined
- Returns:
Number of curve groups currently defined
- Return type:
int
Example
To get the number of curve groups
total = Oasys.THIS.Group.Total()
Instance methods
- Group.Add(curve)
Adds a curve object to group
- Parameters:
curve (Curve) –
Curvethat will be added to group- Returns:
No return value
- Return type:
None
Example
To add curve c to curve group g:
g.Add(c)
- Group.AddAll()
Adds all curves to group
- Returns:
No return value
- Return type:
None
Example
To add all curves to curve group g:
g.AddAll()
- Group.AddID(id)
Adds curve by ID to a group
- Parameters:
id (integer) – The ID of the curve you want to add
- Returns:
No return value
- Return type:
None
Example
To add curve 3 to curve group g:
g.AddID(3)
- Group.Contains(curve)
Checks if a curve object is in a curve group
- Parameters:
curve (Curve) –
Curvethat will be checked- Returns:
True if the curve is in the group, otherwise False
- Return type:
bool
Example
To check if a curve object n is in group g
exists = g.Contains(n)
- Group.ContainsID(id)
Checks if a curve ID is in a curve group
- Parameters:
id (integer) – The ID of the curve you want to check
- Returns:
True if the curve is in the group, otherwise False
- Return type:
bool
Example
To check if a curve ID n is in group g
exists = g.ContainsID(n)
- Group.GetCurveIDs()
Returns a list of Curve ID’s for all the Curves in the group
- Returns:
List of integers
- Return type:
int
Example
To make a list of Curve ID’s for all the curves in group g:
curves = g.GetCurveIDs()
- Group.GetCurves()
Returns a list of Curve Objects for all the Curves in the group
- Returns:
List of Curve objects
- Return type:
list
Example
To make a list of Curve objects for all the curves in group g:
curves = g.GetCurves()
- Group.Remove(curve)
Removes a curve object from a group
- Parameters:
curve (Curve) –
Curvethat will be removed from group- Returns:
No return value
- Return type:
None
Example
To remove curve c from curve group g:
g.Remove(c)
- Group.RemoveAll()
Removes all curves from a group
- Returns:
No return value
- Return type:
None
Example
To remove all curves from curve group g:
g.RemoveAll()
- Group.RemoveID(id)
Remove a curve by ID from a group
- Parameters:
id (integer) – The ID of the curve you want to remove
- Returns:
No return value
- Return type:
None
Example
To remove curve 3 from curve group g:
g.RemoveID(3)
- Group.Spool()
Spools a group, entry by entry and returns the curve objects. See also
Group.StartSpool
- Returns:
Curve Object of item, or None if no more curves in group
- Return type:
Curve
Example
To spool group g:
g.StartSpool() while mylist := g.Spool(): do something..
- Group.SpoolID()
Spools a group, entry by entry and returns the curve ID’s or 0 when no more curves in group. See also
Group.StartSpool
- Returns:
integer
- Return type:
int
Example
To spool group g :
g.StartSpool() while mylist := g.SpoolID(): do something..
- Group.StartSpool()
Starts a group spooling operation. See also
Group.Spool
- Returns:
No return value
- Return type:
None
Example
To start spooling group g:
g.StartSpool()