DateItemBuilder Class

class NXOpen.DateItemBuilder

Bases: NXOpen.TaggedObject, NXOpen.GeometricUtilities.IComponentBuilder

This class stores a date and time.

The class does verify that the year string and time string are in a valid format. The first date supported is 2-Jan-1900 00:00:00 UTC and the last date supported is 31st-Dec-9999 00:00:00 UTC. Though note that the time input is in local time and converted to UTC internally.

NOTE: The class does NOT verify that the combination of day, month, year and time is valid.

To create a new instance of this class, use NXOpen.DateBuilder.CreateDateItemBuilder()

New in version NX8.0.0.

Properties

Property Description
Day Returns or sets the day
Month Returns or sets the month
Tag Returns the Tag for this object.
Time Returns or sets the time.
Year Returns or sets the year.

Methods

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

Enumerations

DateItemBuilderDayOfMonth Enumeration Days of the month
DateItemBuilderMonthOfYear Enumeration Months of the year.

Property Detail

Day

DateItemBuilder.Day

Returns or sets the day

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

Getter Method

Signature Day

Returns:
Return type:NXOpen.DateItemBuilderDayOfMonth

New in version NX8.0.0.

License requirements: None.

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

Setter Method

Signature Day

Parameters:day (NXOpen.DateItemBuilderDayOfMonth) –

New in version NX8.0.0.

License requirements: None.

Month

DateItemBuilder.Month

Returns or sets the month

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

Getter Method

Signature Month

Returns:
Return type:NXOpen.DateItemBuilderMonthOfYear

New in version NX8.0.0.

License requirements: None.

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

Setter Method

Signature Month

Parameters:month (NXOpen.DateItemBuilderMonthOfYear) –

New in version NX8.0.0.

License requirements: None.

Time

DateItemBuilder.Time

Returns or sets the time.

The time string is a 24-hour clock time in the format HH:MM:SS or HH:MM. The string can also be empty.

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

Getter Method

Signature Time

Returns:
Return type:str

New in version NX8.0.0.

License requirements: None.

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

Setter Method

Signature Time

Parameters:time (str) –

New in version NX8.0.0.

License requirements: None.

Year

DateItemBuilder.Year

Returns or sets the year.

The year string is four characters long and represents an integer within the range minimum year and maximum year (inclusive). The year can also be an empty string.

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

Getter Method

Signature Year

Returns:
Return type:str

New in version NX8.0.0.

License requirements: None.

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

Setter Method

Signature Year

Parameters:year (str) –

New in version NX8.0.0.

License requirements: None.

Method Detail

Validate

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