ShipNameFieldBuilder Class

class NXOpen.Features.ShipDesign.ShipNameFieldBuilder

Bases: NXOpen.TaggedObject, NXOpen.GeometricUtilities.IComponentBuilder

A field, combined with other fields, to generate a name for a Ship Basic Design Object such as a Deck.

The ShipNameFieldBuilder class contains the information used to generate a name for a Basic Design object, such as a Deck, Bulkhead, Stiffener System, etc.

Fields can be one of four types: 1) Fixed A string with an unchangeable value 2) Any A user entered string value 3) Option A predefined set of strings from which the user can choose one 4) Index A system generated, leading zeros, number which pretends to provide name uniqueness.

There may be as many Fixed, Any, and Option fields as the user deems appropriate. There may be only one Index field.

The fields for a particular Ship object type NXOpen.Features.ShipDesign.ShipNamesBuilder are defined in a “recipes” file which specifies, for a particular object type, the fields and their values. See ShipNamesRecipes.xml in UGII_BASE_DIR/nxship/data for details on the recipes.

A sample recipe might be defined having the following fields:

Type Value ——– ——– Fixed “TBH-” Option “Port”, “Starboard”, “None” Fixed “-” Index nnnnnn

This is an abstract class and cannot be instantiated

New in version NX9.0.2.

Properties

Property Description
Tag Returns the Tag for this object.
Value Returns or sets the field value.

Methods

Method Description
GetOptionValues Get the valid option values for an Option type field.
Validate Validate whether the inputs to the component are sufficient for commit to be called.

Property Detail

Value

ShipNameFieldBuilder.Value

Returns or sets the field value.

-------------------------------------

Getter Method

Signature Value

Returns:
Return type:str

New in version NX9.0.2.

License requirements: None.

-------------------------------------

Setter Method

Signature Value

Parameters:newValue (str) –

New in version NX9.0.2.

License requirements: nx_ship_basic (“Ship Basic Design”) OR nx_ship_detail (“Ship Detail Design”)

Method Detail

GetOptionValues

ShipNameFieldBuilder.GetOptionValues

Get the valid option values for an Option type field.

No values are returned (and the count is set to zero) if this is not an option field

Signature GetOptionValues()

Returns:
Return type:list of str

New in version NX9.0.2.

License requirements: None.

Validate

ShipNameFieldBuilder.Validate

Validate whether the inputs to the component are sufficient for commit to be called.

If the component is not in a state to commit then an exception is thrown. For example, if the component requires you to set some property, this method will throw an exception if you haven’t set it. This method throws a not-yet-implemented NXException for some components.

Signature Validate()

Returns:Was self validation successful
Return type:bool

New in version NX3.0.1.

License requirements: None.