PreviewPropertiesBuilder Class

class NXOpen.PreviewPropertiesBuilder

Bases: NXOpen.Builder

Represents a NXOpen.PreviewPropertiesBuilder to be used for creating and storing previews.

Both part previews and model view previews are supported.

To create a new instance of this class, use NXOpen.PropertiesManager.CreatePreviewPropertiesBuilder()

Default values.

Property Value
ModelViewCreation OnPartSave
PartCreation OnSave
StoreModelViewPreview 0
StorePartPreview 0

New in version NX8.0.0.

Properties

Property Description
ModelViewCreation Returns or sets the model view creation.
PartCreation Returns or sets the part creation.
SelectedObjects Returns the selected object(s) list.
StoreModelViewPreview Returns or sets the store model view preview.
StorePartPreview Returns or sets the store part preview.
Tag Returns the Tag for this object.

Methods

Method Description
Commit Commits any edits that have been applied to the builder.
Destroy Deletes the builder, and cleans up any objects created by the builder.
GetCommittedObjects For builders that create more than one object, this method returns the objects that are created by commit.
GetObject Returns the object currently being edited by this builder.
ShowResults Updates the model to reflect the result of an edit to the model for all builders that support showing results.
Validate Validate whether the inputs to the component are sufficient for commit to be called.

Enumerations

PreviewPropertiesBuilderModelViewCreationOptions Enumeration Specifies when the model view preview will be created
PreviewPropertiesBuilderPartCreationOptions Enumeration Specifies when the part preview will be created

Property Detail

ModelViewCreation

PreviewPropertiesBuilder.ModelViewCreation

Returns or sets the model view creation.

This option determines when the model view preview will be stored. It is only used if the store model view preview is turned on.

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

Getter Method

Signature ModelViewCreation

Returns:
Return type:NXOpen.PreviewPropertiesBuilderModelViewCreationOptions

New in version NX8.0.0.

License requirements: None.

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

Setter Method

Signature ModelViewCreation

Parameters:modelViewCreation (NXOpen.PreviewPropertiesBuilderModelViewCreationOptions) –

New in version NX8.0.0.

License requirements: None.

PartCreation

PreviewPropertiesBuilder.PartCreation

Returns or sets the part creation.

This option determines when the part preview will be stored. It is only used if the store part preview is turned on.

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

Getter Method

Signature PartCreation

Returns:
Return type:NXOpen.PreviewPropertiesBuilderPartCreationOptions

New in version NX8.0.0.

License requirements: None.

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

Setter Method

Signature PartCreation

Parameters:partCreation (NXOpen.PreviewPropertiesBuilderPartCreationOptions) –

New in version NX8.0.0.

License requirements: None.

SelectedObjects

PreviewPropertiesBuilder.SelectedObjects

Returns the selected object(s) list.

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

Getter Method

Signature SelectedObjects

Returns:
Return type:NXOpen.SelectNXObjectList

New in version NX8.0.0.

License requirements: None.

StoreModelViewPreview

PreviewPropertiesBuilder.StoreModelViewPreview

Returns or sets the store model view preview.

Determines if the model view preview will be stored. If true, the model view creation option will decide when the preview will be stored.

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

Getter Method

Signature StoreModelViewPreview

Returns:
Return type:bool

New in version NX8.0.0.

License requirements: None.

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

Setter Method

Signature StoreModelViewPreview

Parameters:storeModelViewPreview (bool) –

New in version NX8.0.0.

License requirements: None.

StorePartPreview

PreviewPropertiesBuilder.StorePartPreview

Returns or sets the store part preview.

Determines if the part preview will be stored. If true, the part creation option will decide when the preview will be stored.

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

Getter Method

Signature StorePartPreview

Returns:
Return type:bool

New in version NX8.0.0.

License requirements: None.

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

Setter Method

Signature StorePartPreview

Parameters:storePartPreview (bool) –

New in version NX8.0.0.

License requirements: None.

Method Detail

Validate

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