ShipNamesBuilder Class

class NXOpen.Features.ShipDesign.ShipNamesBuilder

Bases: NXOpen.TaggedObject, NXOpen.GeometricUtilities.IComponentBuilder

This class provides the mechanism for defining the names of Basic Design objects such as Decks, Bulkheads, Stiffener Systems, etc.

Each Ship object type (Deck, etc.) has a specific format for the names defined in a “recipes” files located at UGII_BASE_DIR/nxship/data/ShipNamesRecipes.xml.

A recipe is composed of two or more “fields”. Individual fields are defined via a :py:class:`NXOpen.Features.ShipDesign.ShipNameFieldBuilder`object.

New in version NX9.0.0.

Properties

Property Description
ContextAttribute Returns or sets the Context Attribute value.
ShipObjectType Returns or sets the Ship object type (Hull, Deck, etc.
Tag Returns the Tag for this object.

Methods

Method Description
GetField Get the ShipNameField at the given index (starting at 0)
GetFieldcount Get the number of ShipNameFields in this recipe
Validate Validate whether the inputs to the component are sufficient for commit to be called.

Property Detail

ContextAttribute

ShipNamesBuilder.ContextAttribute

Returns or sets the Context Attribute value.

This is the value of the SAW_SUB_NAME part attribute added to the newly created / named Ship objects.

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

Getter Method

Signature ContextAttribute

Returns:
Return type:str

New in version NX9.0.2.

License requirements: None.

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

Setter Method

Signature ContextAttribute

Parameters:newValue (str) –

New in version NX9.0.2.

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

ShipObjectType

ShipNamesBuilder.ShipObjectType

Returns or sets the Ship object type (Hull, Deck, etc.

) for which names will be generated.

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

Getter Method

Signature ShipObjectType

Returns:
Return type:NXOpen.Features.ShipDesign.ShipnamesBuilderType

New in version NX9.0.2.

License requirements: None.

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

Setter Method

Signature ShipObjectType

Parameters:type (NXOpen.Features.ShipDesign.ShipnamesBuilderType) –

New in version NX9.0.2.

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

Method Detail

GetField

ShipNamesBuilder.GetField

Get the ShipNameField at the given index (starting at 0)

Signature GetField(idx)

Parameters:idx (int) –
Returns:
Return type:NXOpen.Features.ShipDesign.ShipNameFieldBuilder

New in version NX9.0.2.

License requirements: None.

GetFieldcount

ShipNamesBuilder.GetFieldcount

Get the number of ShipNameFields in this recipe

Signature GetFieldcount()

Returns:
Return type:int

New in version NX9.0.2.

License requirements: None.

Validate

ShipNamesBuilder.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.