Oasys.PRIMER.ConstructionStages class

Properties

property ConstructionStages.ate: float

Analysis time at end of stage

property ConstructionStages.atr: float

Analysis time duration of stage

property ConstructionStages.ats: float

Analysis time at start of stage

property ConstructionStages.exists(read only): boolean

true if *DEFINE_CONSTRUCTION_STAGES exists, false if referred to but not defined

property ConstructionStages.heading: string

The title of the *DEFINE_CONSTRUCTION_STAGES or the empty string if _TITLE is not set

property ConstructionStages.include: integer

The Include file number that the *DEFINE_CONSTRUCTION_STAGES is in

property ConstructionStages.istage: integer

ConstructionStages number. The label is an alternative name for this

property ConstructionStages.ivel0: integer

Flag to set velocities to zero at start of stage

property ConstructionStages.label: integer

ConstructionStages number. The istage is an alternative name for this

property ConstructionStages.model(read only): integer

The Model number that the *DEFINE_CONSTRUCTION_STAGES is in

property ConstructionStages.rte: float

Real time at end of stage

property ConstructionStages.rts: float

Real time at start of stage

Constructor

classmethod ConstructionStages(model, stage_id, heading=Oasys.gRPC.defaultArg)

Create a new ConstructionStages object

Parameters:
  • model (Model) – Model that *DEFINE_CONSTRUCTION_STAGES will be created in

  • stage_id (integer) – ConstructionStages id

  • heading (string) – Optional. Title for the *DEFINE_CONSTRUCTION_STAGES

Returns:

ConstructionStages object

Return type:

dict

Example

To create a new *DEFINE_CONSTRUCTION_STAGES in model m with label 100:

c = Oasys.PRIMER.ConstructionStages(m, 100)

Static methods

classmethod ConstructionStages.Create(model, modal=Oasys.gRPC.defaultArg)

Starts an interactive editing panel to create a *DEFINE_CONSTRUCTION_STAGES

Parameters:
  • model (Model) – Model that the *DEFINE_CONSTRUCTION_STAGES will be created in

  • modal (boolean) – Optional. If this window is modal (blocks the user from doing anything else in PRIMER until this window is dismissed). If omitted the window will be modal

Returns:

ConstructionStages object (or None if not made)

Return type:

dict

Example

To start creating a *DEFINE_CONSTRUCTION_STAGES in model m:

c = Oasys.PRIMER.ConstructionStages.Create(m)
classmethod ConstructionStages.First(model)

Returns the first *DEFINE_CONSTRUCTION_STAGES in the model

Parameters:

model (Model) – Model to get first *DEFINE_CONSTRUCTION_STAGES in

Returns:

ConstructionStages object (or None if there are no *DEFINE_CONSTRUCTION_STAGESs in the model)

Return type:

ConstructionStages

Example

To get the first *DEFINE_CONSTRUCTION_STAGES in model m:

c = Oasys.PRIMER.ConstructionStages.First(m)
classmethod ConstructionStages.FirstFreeLabel(model, layer=Oasys.gRPC.defaultArg)

Returns the first free *DEFINE_CONSTRUCTION_STAGES label in the model. Also see ConstructionStages.LastFreeLabel(), ConstructionStages.NextFreeLabel() and Model.FirstFreeItemLabel()

Parameters:
  • model (Model) – Model to get first free *DEFINE_CONSTRUCTION_STAGES label in

  • layer (Include number) – Optional. Include file (0 for the main file) to search for labels in (Equivalent to First free in layer in editing panels). If omitted the whole model will be used (Equivalent to First free in editing panels)

Returns:

ConstructionStages label

Return type:

int

Example

To get the first free *DEFINE_CONSTRUCTION_STAGES label in model m:

label = Oasys.PRIMER.ConstructionStages.FirstFreeLabel(m)
classmethod ConstructionStages.FlagAll(model, flag)

Flags all of the *DEFINE_CONSTRUCTION_STAGESs in the model with a defined flag

Parameters:
  • model (Model) – Model that all *DEFINE_CONSTRUCTION_STAGESs will be flagged in

  • flag (Flag) – Flag to set on the *DEFINE_CONSTRUCTION_STAGESs

Returns:

No return value

Return type:

None

Example

To flag all of the *DEFINE_CONSTRUCTION_STAGESs with flag f in model m:

Oasys.PRIMER.ConstructionStages.FlagAll(m, f)
classmethod ConstructionStages.GetAll(model)

Returns a list of ConstructionStages objects for all of the *DEFINE_CONSTRUCTION_STAGESs in a model in PRIMER

Parameters:

model (Model) – Model to get *DEFINE_CONSTRUCTION_STAGESs from

Returns:

List of ConstructionStages objects

Return type:

list

Example

To make a list of ConstructionStages objects for all of the *DEFINE_CONSTRUCTION_STAGESs in model m

c = Oasys.PRIMER.ConstructionStages.GetAll(m)
classmethod ConstructionStages.GetFlagged(model, flag)

Returns a list of ConstructionStages objects for all of the flagged *DEFINE_CONSTRUCTION_STAGESs in a model in PRIMER

Parameters:
  • model (Model) – Model to get *DEFINE_CONSTRUCTION_STAGESs from

  • flag (Flag) – Flag set on the *DEFINE_CONSTRUCTION_STAGESs that you want to retrieve

Returns:

List of ConstructionStages objects

Return type:

list

Example

To make a list of ConstructionStages objects for all of the *DEFINE_CONSTRUCTION_STAGESs in model m flagged with f

c = Oasys.PRIMER.ConstructionStages.GetFlagged(m, f)
classmethod ConstructionStages.GetFromID(model, number)

Returns the ConstructionStages object for a *DEFINE_CONSTRUCTION_STAGES ID

Parameters:
  • model (Model) – Model to find the *DEFINE_CONSTRUCTION_STAGES in

  • number (integer) – number of the *DEFINE_CONSTRUCTION_STAGES you want the ConstructionStages object for

Returns:

ConstructionStages object (or None if *DEFINE_CONSTRUCTION_STAGES does not exist)

Return type:

ConstructionStages

Example

To get the ConstructionStages object for *DEFINE_CONSTRUCTION_STAGES 100 in model m

c = Oasys.PRIMER.ConstructionStages.GetFromID(m, 100)
classmethod ConstructionStages.Last(model)

Returns the last *DEFINE_CONSTRUCTION_STAGES in the model

Parameters:

model (Model) – Model to get last *DEFINE_CONSTRUCTION_STAGES in

Returns:

ConstructionStages object (or None if there are no *DEFINE_CONSTRUCTION_STAGESs in the model)

Return type:

ConstructionStages

Example

To get the last *DEFINE_CONSTRUCTION_STAGES in model m:

c = Oasys.PRIMER.ConstructionStages.Last(m)
classmethod ConstructionStages.LastFreeLabel(model, layer=Oasys.gRPC.defaultArg)

Returns the last free *DEFINE_CONSTRUCTION_STAGES label in the model. Also see ConstructionStages.FirstFreeLabel(), ConstructionStages.NextFreeLabel() and see Model.LastFreeItemLabel()

Parameters:
  • model (Model) – Model to get last free *DEFINE_CONSTRUCTION_STAGES label in

  • layer (Include number) – Optional. Include file (0 for the main file) to search for labels in (Equivalent to Highest free in layer in editing panels). If omitted the whole model will be used

Returns:

ConstructionStages label

Return type:

int

Example

To get the last free *DEFINE_CONSTRUCTION_STAGES label in model m:

label = Oasys.PRIMER.ConstructionStages.LastFreeLabel(m)
classmethod ConstructionStages.NextFreeLabel(model, layer=Oasys.gRPC.defaultArg)

Returns the next free (highest+1) *DEFINE_CONSTRUCTION_STAGES label in the model. Also see ConstructionStages.FirstFreeLabel(), ConstructionStages.LastFreeLabel() and Model.NextFreeItemLabel()

Parameters:
  • model (Model) – Model to get next free *DEFINE_CONSTRUCTION_STAGES label in

  • layer (Include number) – Optional. Include file (0 for the main file) to search for labels in (Equivalent to Highest+1 in layer in editing panels). If omitted the whole model will be used (Equivalent to Highest+1 in editing panels)

Returns:

ConstructionStages label

Return type:

int

Example

To get the next free *DEFINE_CONSTRUCTION_STAGES label in model m:

label = Oasys.PRIMER.ConstructionStages.NextFreeLabel(m)
classmethod ConstructionStages.RenumberAll(model, start)

Renumbers all of the *DEFINE_CONSTRUCTION_STAGESs in the model

Parameters:
  • model (Model) – Model that all *DEFINE_CONSTRUCTION_STAGESs will be renumbered in

  • start (integer) – Start point for renumbering

Returns:

No return value

Return type:

None

Example

To renumber all of the *DEFINE_CONSTRUCTION_STAGESs in model m, from 1000000:

Oasys.PRIMER.ConstructionStages.RenumberAll(m, 1000000)
classmethod ConstructionStages.RenumberFlagged(model, flag, start)

Renumbers all of the flagged *DEFINE_CONSTRUCTION_STAGESs in the model

Parameters:
  • model (Model) – Model that all the flagged *DEFINE_CONSTRUCTION_STAGESs will be renumbered in

  • flag (Flag) – Flag set on the *DEFINE_CONSTRUCTION_STAGESs that you want to renumber

  • start (integer) – Start point for renumbering

Returns:

No return value

Return type:

None

Example

To renumber all of the *DEFINE_CONSTRUCTION_STAGESs in model m flagged with f, from 1000000:

Oasys.PRIMER.ConstructionStages.RenumberFlagged(m, f, 1000000)
classmethod ConstructionStages.Select(flag, prompt, limit=Oasys.gRPC.defaultArg, modal=Oasys.gRPC.defaultArg)

Allows the user to select *DEFINE_CONSTRUCTION_STAGESs using standard PRIMER object menus

Parameters:
  • flag (Flag) – Flag to use when selecting *DEFINE_CONSTRUCTION_STAGESs

  • prompt (string) – Text to display as a prompt to the user

  • limit (Model or Flag) – Optional. If the argument is a Model then only *DEFINE_CONSTRUCTION_STAGESs from that model can be selected. If the argument is a Flag then only *DEFINE_CONSTRUCTION_STAGESs that are flagged with limit can be selected (limit should be different to flag). If omitted, or None, any *DEFINE_CONSTRUCTION_STAGESs can be selected. from any model

  • modal (boolean) – Optional. If selection is modal (blocks the user from doing anything else in PRIMER until this window is dismissed). If omitted the selection will be modal

Returns:

Number of *DEFINE_CONSTRUCTION_STAGESs selected or None if menu cancelled

Return type:

int

Example

To select *DEFINE_CONSTRUCTION_STAGESs from model m, flagging those selected with flag f, giving the prompt ‘Select *DEFINE_CONSTRUCTION_STAGESs’:

Oasys.PRIMER.ConstructionStages.Select(f, 'Select \*DEFINE_CONSTRUCTION_STAGESs', m)

To select *DEFINE_CONSTRUCTION_STAGESs, flagging those selected with flag f but limiting selection to *DEFINE_CONSTRUCTION_STAGESs flagged with flag l, giving the prompt ‘Select *DEFINE_CONSTRUCTION_STAGESs’:

Oasys.PRIMER.ConstructionStages.Select(f, 'Select \*DEFINE_CONSTRUCTION_STAGESs', l)
classmethod ConstructionStages.Total(model, exists=Oasys.gRPC.defaultArg)

Returns the total number of *DEFINE_CONSTRUCTION_STAGESs in the model

Parameters:
  • model (Model) – Model to get total for

  • exists (boolean) – Optional. true if only existing *DEFINE_CONSTRUCTION_STAGESs should be counted. If false or omitted referenced but undefined *DEFINE_CONSTRUCTION_STAGESs will also be included in the total

Returns:

number of *DEFINE_CONSTRUCTION_STAGESs

Return type:

int

Example

To get the total number of *DEFINE_CONSTRUCTION_STAGESs in model m:

total = Oasys.PRIMER.ConstructionStages.Total(m)
classmethod ConstructionStages.UnflagAll(model, flag)

Unsets a defined flag on all of the *DEFINE_CONSTRUCTION_STAGESs in the model

Parameters:
  • model (Model) – Model that the defined flag for all *DEFINE_CONSTRUCTION_STAGESs will be unset in

  • flag (Flag) – Flag to unset on the *DEFINE_CONSTRUCTION_STAGESs

Returns:

No return value

Return type:

None

Example

To unset the flag f on all the *DEFINE_CONSTRUCTION_STAGESs in model m:

Oasys.PRIMER.ConstructionStages.UnflagAll(m, f)

Instance methods

ConstructionStages.AssociateComment(comment)

Associates a comment with a *DEFINE_CONSTRUCTION_STAGES

Parameters:

comment (Comment) – Comment that will be attached to the *DEFINE_CONSTRUCTION_STAGES

Returns:

No return value

Return type:

None

Example

To associate comment c to the *DEFINE_CONSTRUCTION_STAGES c:

c.AssociateComment(c)
ConstructionStages.Browse(modal=Oasys.gRPC.defaultArg)

Starts an edit panel in Browse mode

Parameters:

modal (boolean) – Optional. If this window is modal (blocks the user from doing anything else in PRIMER until this window is dismissed). If omitted the window will be modal

Returns:

no return value

Return type:

None

Example

To Browse *DEFINE_CONSTRUCTION_STAGES c:

c.Browse()
ConstructionStages.ClearFlag(flag)

Clears a flag on the *DEFINE_CONSTRUCTION_STAGES

Parameters:

flag (Flag) – Flag to clear on the *DEFINE_CONSTRUCTION_STAGES

Returns:

No return value

Return type:

None

Example

To clear flag f for *DEFINE_CONSTRUCTION_STAGES c:

c.ClearFlag(f)
ConstructionStages.Copy(range=Oasys.gRPC.defaultArg)

Copies the *DEFINE_CONSTRUCTION_STAGES. The target include of the copied *DEFINE_CONSTRUCTION_STAGES can be set using Options.copy_target_include

Parameters:

range (boolean) – Optional. If you want to keep the copied item in the range specified for the current include. Default value is false. To set current include, use Include.MakeCurrentLayer()

Returns:

ConstructionStages object

Return type:

ConstructionStages

Example

To copy *DEFINE_CONSTRUCTION_STAGES c into *DEFINE_CONSTRUCTION_STAGES z:

z = c.Copy()
ConstructionStages.DetachComment(comment)

Detaches a comment from a *DEFINE_CONSTRUCTION_STAGES

Parameters:

comment (Comment) – Comment that will be detached from the *DEFINE_CONSTRUCTION_STAGES

Returns:

No return value

Return type:

None

Example

To detach comment c from the *DEFINE_CONSTRUCTION_STAGES c:

c.DetachComment(c)
ConstructionStages.Edit(modal=Oasys.gRPC.defaultArg)

Starts an interactive editing panel

Parameters:

modal (boolean) – Optional. If this window is modal (blocks the user from doing anything else in PRIMER until this window is dismissed). If omitted the window will be modal

Returns:

no return value

Return type:

None

Example

To Edit *DEFINE_CONSTRUCTION_STAGES c:

c.Edit()
ConstructionStages.Flagged(flag)

Checks if the *DEFINE_CONSTRUCTION_STAGES is flagged or not

Parameters:

flag (Flag) – Flag to test on the *DEFINE_CONSTRUCTION_STAGES

Returns:

True if flagged, False if not

Return type:

bool

Example

To check if *DEFINE_CONSTRUCTION_STAGES c has flag f set on it:

if c.Flagged(f):
    do_something..
ConstructionStages.GetComments()

Extracts the comments associated to a *DEFINE_CONSTRUCTION_STAGES

Returns:

List of Comment objects (or None if there are no comments associated to the node)

Return type:

list

Example

To get the list of comments associated to the *DEFINE_CONSTRUCTION_STAGES c:

comm_list = c.GetComments()
ConstructionStages.GetParameter(prop)

Checks if a ConstructionStages property is a parameter or not. Note that object properties that are parameters are normally returned as the integer or float parameter values as that is virtually always what the user would want. For this function to work the JavaScript interpreter must use the parameter name instead of the value. This can be done by setting the Options.property_parameter_names option to true before calling the function and then resetting it to false afterwards.. This behaviour can also temporarily be switched by using the ConstructionStages.ViewParameters() method and ‘method chaining’ (see the examples below)

Parameters:

prop (string) – *DEFINE_CONSTRUCTION_STAGES property to get parameter for

Returns:

Parameter object if property is a parameter, None if not

Return type:

dict

Example

To check if ConstructionStages property c.example is a parameter:

Oasys.PRIMER.Options.property_parameter_names = True
if c.GetParameter(c.example):
    do_something...
Oasys.PRIMER.Options.property_parameter_names = False

To check if ConstructionStages property c.example is a parameter by using the GetParameter method:

if c.ViewParameters().GetParameter(c.example):
    do_something..
ConstructionStages.Keyword()

Returns the keyword for this *DEFINE_CONSTRUCTION_STAGES. Note that a carriage return is not added. See also ConstructionStages.KeywordCards()

Returns:

string containing the keyword

Return type:

str

Example

To get the keyword for ConstructionStages c:

key = c.Keyword()
ConstructionStages.KeywordCards()

Returns the keyword cards for the *DEFINE_CONSTRUCTION_STAGES. Note that a carriage return is not added. See also ConstructionStages.Keyword()

Returns:

string containing the cards

Return type:

str

Example

To get the cards for construction_stages c:

cards = c.KeywordCards()
ConstructionStages.Next()

Returns the next *DEFINE_CONSTRUCTION_STAGES in the model

Returns:

ConstructionStages object (or None if there are no more *DEFINE_CONSTRUCTION_STAGESs in the model)

Return type:

ConstructionStages

Example

To get the *DEFINE_CONSTRUCTION_STAGES in model m after *DEFINE_CONSTRUCTION_STAGES c:

c = c.Next()
ConstructionStages.Previous()

Returns the previous *DEFINE_CONSTRUCTION_STAGES in the model

Returns:

ConstructionStages object (or None if there are no more *DEFINE_CONSTRUCTION_STAGESs in the model)

Return type:

ConstructionStages

Example

To get the *DEFINE_CONSTRUCTION_STAGES in model m before *DEFINE_CONSTRUCTION_STAGES c:

c = c.Previous()
ConstructionStages.SetFlag(flag)

Sets a flag on the *DEFINE_CONSTRUCTION_STAGES

Parameters:

flag (Flag) – Flag to set on the *DEFINE_CONSTRUCTION_STAGES

Returns:

No return value

Return type:

None

Example

To set flag f for *DEFINE_CONSTRUCTION_STAGES c:

c.SetFlag(f)
ConstructionStages.ViewParameters()

Object properties that are parameters are normally returned as the integer or float parameter values as that is virtually always what the user would want. This function temporarily changes the behaviour so that if a property is a parameter the parameter name is returned instead. This can be used with ‘method chaining’ (see the example below) to make sure a property argument is correct

Returns:

ConstructionStages object

Return type:

dict

Example

To check if ConstructionStages property c.example is a parameter by using the ConstructionStages.GetParameter() method:

if c.ViewParameters().GetParameter(c.example):
    do_something..
ConstructionStages.Xrefs()

Returns the cross references for this *DEFINE_CONSTRUCTION_STAGES

Returns:

Xrefs object

Return type:

dict

Example

To get the cross references for *DEFINE_CONSTRUCTION_STAGES c:

xrefs = c.Xrefs()