Oasys.PRIMER.Dummy class

Properties

property Dummy.assemblies(read only): integer

Number of assemblies defined

property Dummy.exists(read only): boolean

true if dummy exists, false if referred to but not defined

property Dummy.id(read only): integer

Dummy number. Also see the label property which is an alternative name for this

property Dummy.include: integer

The Include file number that the dummy is in

property Dummy.label(read only): integer

Dummy number. Also see the id property which is an alternative name for this

property Dummy.model(read only): integer

The Model number that the dummy is in

property Dummy.points(read only): integer

Number of reference points defined

property Dummy.title: string

Dummy title

property Dummy.xhpoint(read only): float

H-Point X coordinate

property Dummy.yhpoint(read only): float

H-Point Y coordinate

property Dummy.zhpoint(read only): float

H-Point Z coordinate

Static methods

classmethod Dummy.BlankAll(model, redraw=Oasys.gRPC.defaultArg)

Blanks all of the dummys in the model

Parameters:
  • model (Model) – Model that all dummys will be blanked in

  • redraw (boolean) – Optional. If model should be redrawn or not. If omitted redraw is false. If you want to do several (un)blanks and only redraw after the last one then use false for all redraws apart from the last one. Alternatively you can redraw using View.Redraw()

Returns:

No return value

Return type:

None

Example

To blank all of the dummys in model m:

Oasys.PRIMER.Dummy.BlankAll(m)
classmethod Dummy.BlankFlagged(model, flag, redraw=Oasys.gRPC.defaultArg)

Blanks all of the flagged dummys in the model

Parameters:
  • model (Model) – Model that all the flagged dummys will be blanked in

  • flag (Flag) – Flag set on the dummys that you want to blank

  • redraw (boolean) – Optional. If model should be redrawn or not. If omitted redraw is false. If you want to do several (un)blanks and only redraw after the last one then use false for all redraws apart from the last one. Alternatively you can redraw using View.Redraw()

Returns:

No return value

Return type:

None

Example

To blank all of the dummys in model m flagged with f:

Oasys.PRIMER.Dummy.BlankFlagged(m, f)
classmethod Dummy.First(model)

Returns the first dummy in the model

Parameters:

model (Model) – Model to get first dummy in

Returns:

Dummy object (or None if there are no dummys in the model)

Return type:

Dummy

Example

To get the first dummy in model m:

d = Oasys.PRIMER.Dummy.First(m)
classmethod Dummy.FirstFreeLabel(model, layer=Oasys.gRPC.defaultArg)

Returns the first free dummy label in the model. Also see Dummy.LastFreeLabel(), Dummy.NextFreeLabel() and Model.FirstFreeItemLabel()

Parameters:
  • model (Model) – Model to get first free dummy 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:

Dummy label

Return type:

int

Example

To get the first free dummy label in model m:

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

Flags all of the dummys in the model with a defined flag

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

  • flag (Flag) – Flag to set on the dummys

Returns:

No return value

Return type:

None

Example

To flag all of the dummys with flag f in model m:

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

Returns a list of Dummy objects for all of the dummys in a model in PRIMER

Parameters:

model (Model) – Model to get dummys from

Returns:

List of Dummy objects

Return type:

list

Example

To make a list of Dummy objects for all of the dummys in model m

d = Oasys.PRIMER.Dummy.GetAll(m)
classmethod Dummy.GetFlagged(model, flag)

Returns a list of Dummy objects for all of the flagged dummys in a model in PRIMER

Parameters:
  • model (Model) – Model to get dummys from

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

Returns:

List of Dummy objects

Return type:

list

Example

To make a list of Dummy objects for all of the dummys in model m flagged with f

d = Oasys.PRIMER.Dummy.GetFlagged(m, f)
classmethod Dummy.GetFromID(model, number)

Returns the Dummy object for a dummy ID

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

  • number (integer) – number of the dummy you want the Dummy object for

Returns:

Dummy object (or None if dummy does not exist)

Return type:

Dummy

Example

To get the Dummy object for dummy 100 in model m

d = Oasys.PRIMER.Dummy.GetFromID(m, 100)
classmethod Dummy.Last(model)

Returns the last dummy in the model

Parameters:

model (Model) – Model to get last dummy in

Returns:

Dummy object (or None if there are no dummys in the model)

Return type:

Dummy

Example

To get the last dummy in model m:

d = Oasys.PRIMER.Dummy.Last(m)
classmethod Dummy.LastFreeLabel(model, layer=Oasys.gRPC.defaultArg)

Returns the last free dummy label in the model. Also see Dummy.FirstFreeLabel(), Dummy.NextFreeLabel() and see Model.LastFreeItemLabel()

Parameters:
  • model (Model) – Model to get last free dummy 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:

Dummy label

Return type:

int

Example

To get the last free dummy label in model m:

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

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

Parameters:
  • model (Model) – Model to get next free dummy 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:

Dummy label

Return type:

int

Example

To get the next free dummy label in model m:

label = Oasys.PRIMER.Dummy.NextFreeLabel(m)
classmethod Dummy.Pick(prompt, limit=Oasys.gRPC.defaultArg, modal=Oasys.gRPC.defaultArg, button_text=Oasys.gRPC.defaultArg)

Allows the user to pick a dummy

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

  • limit (Model or Flag) – Optional. If the argument is a Model then only dummys from that model can be picked. If the argument is a Flag then only dummys that are flagged with limit can be selected. If omitted, or None, any dummys from any model can be selected. from any model

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

  • button_text (string) – Optional. By default the window with the prompt will have a button labelled ‘Cancel’ which if pressed will cancel the pick and return None. If you want to change the text on the button use this argument. If omitted ‘Cancel’ will be used

Returns:

Dummy object (or None if not picked)

Return type:

dict

Example

To pick a dummy from model m giving the prompt ‘Pick dummy from screen’:

d = Oasys.PRIMER.Dummy.Pick('Pick dummy from screen', m)
classmethod Dummy.RenumberAll(model, start)

Renumbers all of the dummys in the model

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

  • start (integer) – Start point for renumbering

Returns:

No return value

Return type:

None

Example

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

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

Renumbers all of the flagged dummys in the model

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

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

  • start (integer) – Start point for renumbering

Returns:

No return value

Return type:

None

Example

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

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

Allows the user to select dummys using standard PRIMER object menus

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

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

  • limit (Model or Flag) – Optional. If the argument is a Model then only dummys from that model can be selected. If the argument is a Flag then only dummys that are flagged with limit can be selected (limit should be different to flag). If omitted, or None, any dummys 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 dummys selected or None if menu cancelled

Return type:

int

Example

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

Oasys.PRIMER.Dummy.Select(f, 'Select dummys', m)

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

Oasys.PRIMER.Dummy.Select(f, 'Select dummys', l)
classmethod Dummy.SketchFlagged(model, flag, redraw=Oasys.gRPC.defaultArg)

Sketches all of the flagged dummys in the model. The dummys will be sketched until you either call Dummy.Unsketch(), Dummy.UnsketchFlagged(), Model.UnsketchAll(), or delete the model

Parameters:
  • model (Model) – Model that all the flagged dummys will be sketched in

  • flag (Flag) – Flag set on the dummys that you want to sketch

  • redraw (boolean) – Optional. If model should be redrawn or not after the dummys are sketched. If omitted redraw is true. If you want to sketch flagged dummys several times and only redraw after the last one then use false for redraw and call View.Redraw()

Returns:

No return value

Return type:

None

Example

To sketch all dummys flagged with flag in model m:

Oasys.PRIMER.Dummy.SketchFlagged(m, flag)
classmethod Dummy.Total(model, exists=Oasys.gRPC.defaultArg)

Returns the total number of dummys in the model

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

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

Returns:

number of dummys

Return type:

int

Example

To get the total number of dummys in model m:

total = Oasys.PRIMER.Dummy.Total(m)
classmethod Dummy.UnblankAll(model, redraw=Oasys.gRPC.defaultArg)

Unblanks all of the dummys in the model

Parameters:
  • model (Model) – Model that all dummys will be unblanked in

  • redraw (boolean) – Optional. If model should be redrawn or not. If omitted redraw is false. If you want to do several (un)blanks and only redraw after the last one then use false for all redraws apart from the last one. Alternatively you can redraw using View.Redraw()

Returns:

No return value

Return type:

None

Example

To unblank all of the dummys in model m:

Oasys.PRIMER.Dummy.UnblankAll(m)
classmethod Dummy.UnblankFlagged(model, flag, redraw=Oasys.gRPC.defaultArg)

Unblanks all of the flagged dummys in the model

Parameters:
  • model (Model) – Model that the flagged dummys will be unblanked in

  • flag (Flag) – Flag set on the dummys that you want to unblank

  • redraw (boolean) – Optional. If model should be redrawn or not. If omitted redraw is false. If you want to do several (un)blanks and only redraw after the last one then use false for all redraws apart from the last one. Alternatively you can redraw using View.Redraw()

Returns:

No return value

Return type:

None

Example

To unblank all of the dummys in model m flagged with f:

Oasys.PRIMER.Dummy.UnblankFlagged(m, f)
classmethod Dummy.UnflagAll(model, flag)

Unsets a defined flag on all of the dummys in the model

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

  • flag (Flag) – Flag to unset on the dummys

Returns:

No return value

Return type:

None

Example

To unset the flag f on all the dummys in model m:

Oasys.PRIMER.Dummy.UnflagAll(m, f)
classmethod Dummy.UnsketchAll(model, redraw=Oasys.gRPC.defaultArg)

Unsketches all dummys

Parameters:
  • model (Model) – Model that all dummys will be unblanked in

  • redraw (boolean) – Optional. If model should be redrawn or not after the dummys are unsketched. If omitted redraw is true. If you want to unsketch several things and only redraw after the last one then use false for redraw and call View.Redraw()

Returns:

No return value

Return type:

None

Example

To unsketch all dummys in model m:

Oasys.PRIMER.Dummy.UnsketchAll(m)
classmethod Dummy.UnsketchFlagged(model, flag, redraw=Oasys.gRPC.defaultArg)

Unsketches all flagged dummys in the model

Parameters:
  • model (Model) – Model that all dummys will be unsketched in

  • flag (Flag) – Flag set on the dummys that you want to unsketch

  • redraw (boolean) – Optional. If model should be redrawn or not after the dummys are unsketched. If omitted redraw is true. If you want to unsketch several things and only redraw after the last one then use false for redraw and call View.Redraw()

Returns:

No return value

Return type:

None

Example

To unsketch all dummys flagged with flag in model m:

Oasys.PRIMER.Dummy.UnsketchAll(m, flag)

Instance methods

Dummy.AssociateComment(comment)

Associates a comment with a dummy

Parameters:

comment (Comment) – Comment that will be attached to the dummy

Returns:

No return value

Return type:

None

Example

To associate comment c to the dummy d:

d.AssociateComment(c)
Dummy.Blank()

Blanks the dummy

Returns:

No return value

Return type:

None

Example

To blank dummy d:

d.Blank()
Dummy.Blanked()

Checks if the dummy is blanked or not

Returns:

True if blanked, False if not

Return type:

bool

Example

To check if dummy d is blanked:

if d.Blanked():
    do_something..
Dummy.ClearFlag(flag)

Clears a flag on the dummy

Parameters:

flag (Flag) – Flag to clear on the dummy

Returns:

No return value

Return type:

None

Example

To clear flag f for dummy d:

d.ClearFlag(f)
Dummy.Copy(range=Oasys.gRPC.defaultArg)

Copies the dummy. The target include of the copied dummy 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:

Dummy object

Return type:

Dummy

Example

To copy dummy d into dummy z:

z = d.Copy()
Dummy.DetachComment(comment)

Detaches a comment from a dummy

Parameters:

comment (Comment) – Comment that will be detached from the dummy

Returns:

No return value

Return type:

None

Example

To detach comment c from the dummy d:

d.DetachComment(c)
Dummy.Flagged(flag)

Checks if the dummy is flagged or not

Parameters:

flag (Flag) – Flag to test on the dummy

Returns:

True if flagged, False if not

Return type:

bool

Example

To check if dummy d has flag f set on it:

if d.Flagged(f):
    do_something..
Dummy.GetAssembly(index)

Returns the information for an assembly

Parameters:

index (integer) – The index of the assembly you want the coordinates for. Note that reference points start at 0, not 1. 0 <= index < assemblies

Returns:

Dict with properties

label:

(integer) Assembly label

parent:

(integer) Parent assembly label

title:

(string) Assembly title

Return type:

dict

Example

To get the information for the 3rd assembly for dummy d:

info = d.GetAssembly(2)
Dummy.GetAssemblyChildInfo(label, index)

Get information about a child assembly from its parent assembly

Parameters:
  • label (integer) – The label of the parent assembly

  • index (integer) – index of the child (start with 0 till n-1, where n is total number of child)

Returns:

Dict with properties

dof_code:

(String) Degree of freedom codes

joint_stiff:

(integer) Constrained joint stiffness label

label:

(integer) Label of the child assembly

node_a:

(integer) Node A label

node_b:

(integer) Node B label

Return type:

dict

Example

To get the information of first child assembly for which index will be 0 (starts with 0) in the assembly with label = 2 for dummy d:

info = d.GetAssemblyChildInfo(2, 0)
Dummy.GetAssemblyFromID(label)

Get assembly information for a given assembly ID and returns an object containing the details

Parameters:

label (integer) – The label of the assembly you want the Assembly object for

Returns:

Dict with properties

child (read only):

(integer) Total number of child assembly(s)

exists (read only):

(logical) true if assembly exists, false if not defined

index:

(integer) Assembly index

label:

(integer) Assembly label

parent:

(integer) Parent assembly label

rx (read only):

(real) x-angle of the assembly

ry (read only):

(real) y-angle of the assembly

rz (read only):

(real) z-angle of the assembly

title:

(string) Assembly title

Return type:

dict

Example

To get the information for the assembly with label = 2 for dummy d:

info = d.GetAssemblyFromID(2)
Dummy.GetAssemblyPart(label)

Returns a list of Part objects representing all the parts within the assembly

Parameters:

label (integer) – The label of the assembly

Returns:

List of Part objects

Return type:

list

Example

To get all the parts in the assembly with label = 2 for dummy d:

info = d.GetAssemblyPart(2)
Dummy.GetComments()

Extracts the comments associated to a dummy

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 dummy d:

comm_list = d.GetComments()
Dummy.GetParameter(prop)

Checks if a Dummy 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 Dummy.ViewParameters() method and ‘method chaining’ (see the examples below)

Parameters:

prop (string) – dummy property to get parameter for

Returns:

Parameter object if property is a parameter, None if not

Return type:

dict

Example

To check if Dummy property d.example is a parameter:

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

To check if Dummy property d.example is a parameter by using the GetParameter method:

if d.ViewParameters().GetParameter(d.example):
    do_something..
Dummy.GetPoint(index)

Returns the information for a reference point

Parameters:

index (integer) – The index of the reference point you want the information for. Note that reference points start at 0, not 1. 0 <= index < points

Returns:

Dict with properties

assembly:

(integer) Assembly label

csys:

(integer) Coordinate system

hpt:

(boolean) If point has been automatically created by PRIMER at the H-point

label:

(integer) Point label

node:

(integer) Node label (0 if coordinate)

rx:

(boolean) Point restrained rotationally in X

ry:

(boolean) Point restrained rotationally in Y

rz:

(boolean) Point restrained rotationally in Z

title:

(string) Point title

tx:

(boolean) Point restrained translationally in X

ty:

(boolean) Point restrained translationally in Y

tz:

(boolean) Point restrained translationally in Z

x:

(real) Node/point x coordinate

y:

(real) Node/point y coordinate

z:

(real) Node/point z coordinate

Return type:

dict

Example

To get the information for the 3rd reference point for dummy d:

info = d.GetPoint(2)
Dummy.GetPointData(rpt)

Returns the coordinates of a reference point

Parameters:

rpt (integer) – The reference point you want the coordinates for. Note that reference points start at 0, not 1

Returns:

List containing the reference point coordinates

Return type:

list

Example

To get the coordinates of the 3rd reference point for dummy d:

c = d.GetPointData(2)
Dummy.GetPointTitle(rpt)

Returns the title of a reference point

Parameters:

rpt (integer) – The reference point you want the title for. Note that reference points start at 0, not 1

Returns:

The reference point title

Return type:

str

Example

To get the title of the 3rd reference point for dummy d:

c = d.GetPointTitle(2)
Dummy.Next()

Returns the next dummy in the model

Returns:

Dummy object (or None if there are no more dummys in the model)

Return type:

Dummy

Example

To get the dummy in model m after dummy d:

d = d.Next()
Dummy.Previous()

Returns the previous dummy in the model

Returns:

Dummy object (or None if there are no more dummys in the model)

Return type:

Dummy

Example

To get the dummy in model m before dummy d:

d = d.Previous()
Dummy.RemovePoint(index)

Removes a reference point from a dummy

Parameters:

index (integer) – The index of the reference point you want to remove. Note that reference points start at 0, not 1. 0 <= index < points

Returns:

no return value

Return type:

None

Example

To remove for the 3rd reference point for dummy d:

d.RemovePoint(2)
Dummy.SelectAssembly()

Returns a list of objects containing the assembly informaitons or None if menu cancelled

Returns:

List of dicts with properties

label:

(integer) Assembly label

parent:

(integer) Parent assembly label

title:

(string) Assembly title

Return type:

list

Example

To select assemblies in dummy d, giving the prompt “Select assemblies”:

d.SelectAssembly()
Dummy.SetAssemblyStopAngle(label, axis, stop_neg, stop_pos)

Sets -ve and +ve stop angles in the assembly

Parameters:
  • label (integer) – The label of the assembly

  • axis (integer) – Axis (0 = X, 1 = Y, or 2 = Z) on which to define stop angles

  • stop_neg (real) – -ve stop angle

  • stop_pos (real) – +ve stop angle

Returns:

No return value

Return type:

None

Example

To set -90 and 90 stop angles in X-axis in the assembly with label = 2 for dummy d:

d.SetAssemblyStopAngle(2, 0, -90, 90)
Dummy.SetFlag(flag)

Sets a flag on the dummy

Parameters:

flag (Flag) – Flag to set on the dummy

Returns:

No return value

Return type:

None

Example

To set flag f for dummy d:

d.SetFlag(f)
Dummy.SetPoint(index, data)

Sets the data for a reference point in a dummy

Parameters:
  • index (integer) – The index of the reference point you want to set. Note that reference points start at 0, not 1. To add a new point use index points

  • data (dict) –

    Object containing the reference point data. The properties can be:

    assembly:

    (integer) Assembly label

    csys (optional):

    (integer) Coordinate system label

    node (optional):

    (integer) Node label (not rewuired if using x, y and z)

    rx (optional):

    (boolean) Point restrained rotationally in X

    ry (optional):

    (boolean) Point restrained rotationally in Y

    rz (optional):

    (boolean) Point restrained rotationally in Z

    title (optional):

    (string) Title

    tx (optional):

    (boolean) Point restrained translationally in X

    ty (optional):

    (boolean) Point restrained translationally in Y

    tz (optional):

    (boolean) Point restrained translationally in Z

    x (optional):

    (real) X coordinate (not required if using node)

    y (optional):

    (real) Y coordinate (not required if using node)

    z (optional):

    (real) Z coordinate (not required if using node)

Returns:

no return value

Return type:

None

Example

To add a new reference point to dummy d assembly 5 at node 1000 with title “Example point” restrained in x:

data = { "assembly":5, "node":1000, "title":"Example point", "tx":True }
d.SetPoint(d.points, data)

To add a new reference point to dummy d assembly 5 at (10, 20, 30) with title “Example point”:

data = { "assembly":5, "x":10, "y":20, "z":30, "title":"Example point" }
d.SetPoint(d.points, data)
Dummy.Sketch(redraw=Oasys.gRPC.defaultArg)

Sketches the dummy. The dummy will be sketched until you either call Dummy.Unsketch(), Dummy.UnsketchAll(), Model.UnsketchAll(), or delete the model

Parameters:

redraw (boolean) – Optional. If model should be redrawn or not after the dummy is sketched. If omitted redraw is true. If you want to sketch several dummys and only redraw after the last one then use false for redraw and call View.Redraw()

Returns:

No return value

Return type:

None

Example

To sketch dummy d:

d.Sketch()
Dummy.SketchAssembly(label, redraw=Oasys.gRPC.defaultArg)

Sketches the assembly

Parameters:
  • label (integer) – The label of the assembly you want to sketch

  • redraw (boolean) – Optional. If model should be redrawn or not. If omitted redraw is false. If you want to do several (un)blanks and only redraw after the last one then use false for all redraws apart from the last one. Alternatively you can redraw using View.Redraw()

Returns:

No return value

Return type:

None

Example

To sketch the assembly with label 3 in dummy d:

info = d.SketchAssembly(3)
Dummy.Unblank()

Unblanks the dummy

Returns:

No return value

Return type:

None

Example

To unblank dummy d:

d.Unblank()
Dummy.Unsketch(redraw=Oasys.gRPC.defaultArg)

Unsketches the dummy

Parameters:

redraw (boolean) – Optional. If model should be redrawn or not after the dummy is unsketched. If omitted redraw is true. If you want to unsketch several dummys and only redraw after the last one then use false for redraw and call View.Redraw()

Returns:

No return value

Return type:

None

Example

To unsketch dummy d:

d.Unsketch()
Dummy.UnsketchAssembly(label, redraw=Oasys.gRPC.defaultArg)

Unsketches the assembly

Parameters:
  • label (integer) – The label of the assembly you want to unsketch

  • redraw (boolean) – Optional. If model should be redrawn or not. If omitted redraw is false. If you want to do several (un)blanks and only redraw after the last one then use false for all redraws apart from the last one. Alternatively you can redraw using View.Redraw()

Returns:

No return value

Return type:

None

Example

To unsketch the assembly with label 3 in dummy d:

info = d.UnsketchAssembly(3)
Dummy.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:

Dummy object

Return type:

dict

Example

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

if d.ViewParameters().GetParameter(d.example):
    do_something..
Dummy.Xrefs()

Returns the cross references for this dummy

Returns:

Xrefs object

Return type:

dict

Example

To get the cross references for dummy d:

xrefs = d.Xrefs()