View Class¶
-
class
NXOpen.
View
¶ Bases:
NXOpen.NXObject
Represents a view.
View can be obtained either from
NXOpen.ViewCollection
or fromNXOpen.ModelingViewCollection
.This class is not created directly by the user.
New in version NX3.0.0.
Properties¶
Property | Description |
---|---|
AbsoluteOrigin | Returns the view origin in absolute space. |
IsOccurrence | Returns whether this object is an occurrence or not. |
JournalIdentifier | Returns the identifier that would be recorded in a journal for this object. |
LockRotations | Returns or sets the Lock Rotations toggle state of a view. |
Matrix | Returns the view matrix. |
Name | Returns the custom name of the object. |
Origin | Returns the view origin. |
OwningComponent | Returns the owning component, if this object is an occurrence. |
OwningPart | Returns the owning part of this object |
Prototype | Returns the prototype of this object if it is an occurrence. |
RenderingStyle | Returns or sets the rendering style of the view. |
Scale | Returns the view scale |
SyncViews | Returns or sets the Synchronized Views toggle state of a view. |
Tag | Returns the Tag for this object. |
TriadVisibility | Returns or sets the visibility of the view triad in the view. |
WcsVisibility | Returns or sets the visibility of the WCS in the view. |
Methods¶
Method | Description |
---|---|
AskVisibleObjects | Returns an array of objects visible in a view @return The array of visible objects |
Concatenate | Concatenates the given translation with the previous viewing transformation of the specified view. |
DeleteAllAttributesByType | Deletes all attributes of a specific type. |
DeleteAttributeByTypeAndTitle | Deletes an attribute by type and title. |
DeleteUserAttribute | Deletes the first attribute encountered with the given Type, Title. |
DeleteUserAttributes | Deletes the attributes encountered with the given Type with option to update or not. |
Expand | Expands the specified view to fill as much of the layout which contains the view as possible, without changing the aspect ratio of the view. |
FindObject | Finds the NXOpen.NXObject with the given identifier as recorded in a journal. |
Fit | Adjusts the bounds of a given view so that it fully encompasses the extents of the model geometry. |
FitAfterShowOrHide | Adjusts the bounds of a given view conditionally so that it fully encompasses the extents of the model geometry. |
FitToObjects | Adjusts the bounds of a given view so that it fully encompasses the extents of the given objects. |
GetAttributeTitlesByType | Gets all the attribute titles of a specific type. |
GetAxis | Returns one of the view axes. |
GetBooleanUserAttribute | Gets a boolean attribute by Title and array Index. |
GetComputationalTimeUserAttribute | Gets a time attribute by Title and array Index. |
GetIntegerAttribute | Gets an integer attribute by title. |
GetIntegerUserAttribute | Gets an integer attribute by Title and array Index. |
GetRealAttribute | Gets a real attribute by title. |
GetRealUserAttribute | Gets a real attribute by Title and array Index. |
GetReferenceAttribute | Gets the reference string (not the calculated value) of a string attribute that uses a reference string. |
GetStringAttribute | Gets a string attribute value by title. |
GetStringUserAttribute | Gets a string attribute by Title and array Index. |
GetTimeAttribute | Gets a time attribute by title. |
GetTimeUserAttribute | Gets a time attribute by Title and array Index. |
GetUserAttribute | Gets the first attribute encountered on the object, if any, with a given Title, Type and array Index. |
GetUserAttributeAsString | Gets the first attribute encountered on the object, if any, with a given title, type and array index. |
GetUserAttributeCount | Gets the count of set attributes on the object, if any, of the given type. |
GetUserAttributeLock | Determine the lock of the given attribute. |
GetUserAttributeSize | Gets the size of the first attribute encountered on the object, if any, with a given Title and Type. |
GetUserAttributeSourceObjects | Returns an array of objects from which this object presents attributes. |
GetUserAttributes | Gets all the attributes that have been set on the given object. |
GetUserAttributesAsStrings | Gets all the attributes that have been set on the given object. |
HasUserAttribute | Determines if an attribute with the given Title, Type and array Index is present on the object Unset attributes will not be detected by this function, as its purpose is to test for the actual presence of the attribute on the object. |
MakeWork | Makes the given view the work view. |
Orient | Changes the view orientation relative to the specified absolute coordinate system. |
Prints a representation of this object to the system log file. | |
Regenerate | Regenerates the display of given view. |
Restore | Restores a view to its last remembered rotation, scale and translation. |
Rotate | Rotates the view by concatenating the given matrix to the existing rotation matrix of the view. |
SetAttribute | Creates or modifies an integer attribute. |
SetBooleanUserAttribute | Creates or modifies a boolean attribute with the option to update or not. |
SetName | Sets the custom name of the object. |
SetOrigin | Moves the given position to the center of the view. |
SetReferenceAttribute | Creates or modifies a string attribute which uses a reference string. |
SetRotationTranslationScale | Sets the rotation, translation and scale of the specified view. |
SetScale | Sets the scale of the specified view to the desired scale factor. |
SetTimeAttribute | Creates or modifies a time attribute. |
SetTimeUserAttribute | Creates or modifies a time attribute with the option to update or not. |
SetUserAttribute | Creates or modifies an attribute with the option to update or not. |
SetUserAttributeLock | Lock or unlock the given attribute. |
SnapToClosestCannedOrientation | Changes the orientation of the given view to the orientation of the canned view whose orientation is the closest to that of the given view. |
SnapToVariantCannedOrientation | Similar to NXOpen.View.SnapToClosestCannedOrientation except it changes the orientation of the given view to the orientation of some canned view variant based on I-deas’s ‘snapview’ logic whose orientation is the closest to one of the six orthographic and eight flavors of trimetric views. |
UpdateCustomSymbols | Updates custom symbol in a drawing member view or drawing sheet |
UpdateDisplay | Updates the display of given view, as needed. |
Zoom | Scales the specified view to a desired relative scale. |
ZoomAboutPoint | Scales the specified view such that the given scale_about_point does not move. |
ZoomByRectangle | Scales the specified view such that the specified rectangle is as large as possible while being fully contained within the viewport. |
Enumerations¶
ViewCanned Enumeration | Describes a simplified indexing scheme for accessing canned views with interfaces that use this enum as a parameter. |
ViewRenderingStyleType Enumeration | Describes the rendering style for geometry displayed in the view. |
ViewScaleAdjustment Enumeration | Describes simple, predefined adjustments that may be applied to a view’s scale while another operation is performed, in conjunction, on the view. |
ViewScaleFactor Enumeration | Describes the relative scales to which a view can be set |
ViewShowOrHideType Enumeration | Specifies whether a show or hide operation, or both, has just been done |
Property Detail¶
AbsoluteOrigin¶
-
View.
AbsoluteOrigin
¶ Returns the view origin in absolute space.
-------------------------------------
Getter Method
Signature
AbsoluteOrigin()
Returns: Return type: NXOpen.Point3d
New in version NX8.5.0.
License requirements: None.
IsOccurrence¶
-
View.
IsOccurrence
¶ Returns whether this object is an occurrence or not.
-------------------------------------
Getter Method
Signature
IsOccurrence()
Returns: This object is an occurrence Return type: bool New in version NX3.0.0.
License requirements: None.
JournalIdentifier¶
-
View.
JournalIdentifier
¶ Returns the identifier that would be recorded in a journal for this object.
This may not be the same across different releases of the software.
-------------------------------------
Getter Method
Signature
JournalIdentifier()
Returns: Return type: str New in version NX3.0.0.
License requirements: None.
LockRotations¶
-
View.
LockRotations
¶ Returns or sets the “Lock Rotations” toggle state of a view.
If there is no error, the current toggle state is returned
-------------------------------------
Getter Method
Signature
LockRotations()
Returns: Returns current toggle state True - Toggle is ON currently
False - Toggle is OFF currently
Return type: bool New in version NX9.0.0.
License requirements: None.
-------------------------------------
Setter Method
Signature
LockRotations(newToggleState)
Parameters: newToggleState (bool) – Sets new toggle state True - Sets toggle ON False - Sets toggle OFF New in version NX9.0.0.
License requirements: None.
Matrix¶
-
View.
Matrix
¶ Returns the view matrix.
This 3x3 orthonormal matrix specifies the rotation from model space to untranslated view space.
-------------------------------------
Getter Method
Signature
Matrix()
Returns: Return type: NXOpen.Matrix3x3
New in version NX3.0.0.
License requirements: None.
Name¶
-
View.
Name
¶ Returns the custom name of the object.
-------------------------------------
Getter Method
Signature
Name()
Returns: Return type: str New in version NX3.0.0.
License requirements: None.
Origin¶
-
View.
Origin
¶ Returns the view origin.
This is the negation of the position in “untranslated view space”, which is the coordinate space obtained by multiplying positions in absolute space by the matrix from
NXOpen.View.Matrix`
. Note that the origin in this method is not in the same space as the origin passed toNXOpen.View.Origin`
, where the input origin is in absolute space.The position given to this property is the same as the translation used in
NXOpen.View.Concatenate
and in the other similar concatenate methods.If you want to get the view origin in absolute space, use
NXOpen.View.AbsoluteOrigin`
-------------------------------------
Getter Method
Signature
Origin()
Returns: Return type: NXOpen.Point3d
New in version NX3.0.0.
License requirements: None.
OwningComponent¶
-
View.
OwningComponent
¶ Returns the owning component, if this object is an occurrence.
-------------------------------------
Getter Method
Signature
OwningComponent()
Returns: Return type: NXOpen.Assemblies.Component
New in version NX3.0.0.
License requirements: None.
OwningPart¶
-
View.
OwningPart
¶ Returns the owning part of this object
-------------------------------------
Getter Method
Signature
OwningPart()
Returns: The owning part of this object or null if it does not have an owner Return type: NXOpen.BasePart
New in version NX3.0.0.
License requirements: None.
Prototype¶
-
View.
Prototype
¶ Returns the prototype of this object if it is an occurrence.
-------------------------------------
Getter Method
Signature
Prototype()
Returns: The prototype of this object or null if this object is not an occurrence Return type: NXOpen.INXObject
New in version NX3.0.0.
License requirements: None.
RenderingStyle¶
-
View.
RenderingStyle
¶ Returns or sets the rendering style of the view.
-------------------------------------
Getter Method
Signature
RenderingStyle()
Returns: Return type: NXOpen.ViewRenderingStyleType
New in version NX4.0.0.
License requirements: None.
-------------------------------------
Setter Method
Signature
RenderingStyle(renderingStyle)
Parameters: renderingStyle ( NXOpen.ViewRenderingStyleType
) –New in version NX4.0.0.
License requirements: None.
Scale¶
-
View.
Scale
¶ Returns the view scale
-------------------------------------
Getter Method
Signature
Scale()
Returns: Return type: float New in version NX3.0.0.
License requirements: None.
SyncViews¶
-
View.
SyncViews
¶ Returns or sets the “Synchronized Views” toggle state of a view.
If there is no error, the current toggle state is returned
-------------------------------------
Getter Method
Signature
SyncViews()
Returns: Returns current toggle state True - Toggle is ON currently
False - Toggle is OFF currently
Return type: bool New in version NX9.0.0.
License requirements: None.
-------------------------------------
Setter Method
Signature
SyncViews(newToggleState)
Parameters: newToggleState (bool) – Sets new toggle state True - Sets toggle ON False - Sets toggle OFF New in version NX9.0.0.
License requirements: None.
TriadVisibility¶
-
View.
TriadVisibility
¶ Returns or sets the visibility of the view triad in the view.
-------------------------------------
Getter Method
Signature
TriadVisibility()
Returns: Return type: bool New in version NX10.0.0.
License requirements: None.
-------------------------------------
Setter Method
Signature
TriadVisibility(triadVisibility)
Parameters: triadVisibility (bool) – New in version NX10.0.0.
License requirements: None.
WcsVisibility¶
-
View.
WcsVisibility
¶ Returns or sets the visibility of the WCS in the view.
-------------------------------------
Getter Method
Signature
WcsVisibility()
Returns: Return type: bool New in version NX10.0.0.
License requirements: None.
-------------------------------------
Setter Method
Signature
WcsVisibility(isVisible)
Parameters: isVisible (bool) – New in version NX10.0.0.
License requirements: None.
Method Detail¶
AskVisibleObjects¶
-
View.
AskVisibleObjects
¶ Returns an array of objects visible in a view
Signature
AskVisibleObjects()
Returns: The array of visible objects Return type: list of NXOpen.DisplayableObject
New in version NX4.0.0.
License requirements: None.
Concatenate¶
-
View.
Concatenate
¶ Overloaded method Concatenate
Concatenate(translation)
Concatenate(scale)
Concatenate(translation, scale)
Concatenate(centerOfRotation, rotationAxis, angle)
Concatenate(translation, centerOfRotation, rotationAxis, angle)
Concatenate(scale, centerOfRotation, rotationAxis, angle)
Concatenate(translation, scale, centerOfRotation, rotationAxis, angle)
-------------------------------------
Concatenates the given translation with the previous viewing transformation of the specified view. The translation is defined in view space.
In batch mode, the translation of the view is modified, but no display occurs
Signature
Concatenate(translation)
Parameters: translation ( NXOpen.Point3d
) – Point in view space to put at the center of the viewNew in version NX4.0.0.
License requirements: None.
-------------------------------------
Concatenates the given scale with the previous viewing transformation of the specified view. The scale is applied to the view using the current view origin.
In batch mode, the scale of the view is modified, but no display occurs.
Signature
Concatenate(scale)
Parameters: scale (float) – Relative scale factor New in version NX4.0.0.
License requirements: None.
-------------------------------------
Concatenates the given translation and scale with the previous viewing transformation of the specified view. The translation is defined in view space, and conceptually occurs first. Then, the scale is applied to the view using the new view origin. Although this is logically a two step process, only the final result appears in the graphics window.
In batch mode, the translation and scale of the view are modified, but no display occurs.
Signature
Concatenate(translation, scale)
Parameters: - translation (
NXOpen.Point3d
) – Point in view space to put at the center of the view - scale (float) – Relative scale factor
New in version NX4.0.0.
License requirements: None.
-------------------------------------
Concatenates the given rotation with the previous viewing transformation of the specified view. First, if a center of rotation is given, a translation occurs to move the center of the view to the center of rotation. Then, the rotation occurs about the center of rotation. Finally, if a center of rotation is being used, the view is translated back to the origin it had upon entering the function. Although this is logically a three step process, only the final result appears in the graphics window.
In batch mode, the rotation of the view is modified, but no display occurs.
Signature
Concatenate(centerOfRotation, rotationAxis, angle)
Parameters: - centerOfRotation (
NXOpen.Point3d
) – If not NULL, this specifies a point in view space about which the view is to be rotated - rotationAxis (
NXOpen.Vector3d
) – The axis to rotate about - angle (float) – Rotation angle in radians
New in version NX4.0.0.
License requirements: None.
-------------------------------------
Concatenates the given translation and rotation with the previous viewing transformation of the specified view. The translation is defined in view space, and conceptually occurs first. Then, if a center of rotation is given, a translation occurs to move the center of the view to the center of rotation. Third, the rotation occurs about the center of rotation. Finally, if a center of rotation is being used, the view is translated back to the origin it had after the translation. Although this is logically a four step process, only the final result appears in the graphics window.
In batch mode, the translation and rotation of the view are modified, but no display occurs.
Signature
Concatenate(translation, centerOfRotation, rotationAxis, angle)
Parameters: - translation (
NXOpen.Point3d
) – Point in view space to put at the center of the view - centerOfRotation (
NXOpen.Point3d
) – If not NULL, this specifies a point in view space about which the view is to be rotated - rotationAxis (
NXOpen.Vector3d
) – The axis to rotate about - angle (float) – Rotation angle in radians
New in version NX4.0.0.
License requirements: None.
-------------------------------------
Concatenates the given scale and rotation with the previous viewing transformation of the specified view. First, the scale is applied to the view using the current view origin. Then, if a center of rotation is given, a translation occurs to move the center of the view to the center of rotation. Third, the rotation occurs about the center of rotation. Finally, if a center of rotation is being used, the view is translated back to the origin it had upon entering the function. Although this is logically a four step process, only the final result appears in the graphics window.
In batch mode, the scale and rotation of the view are modified, but no display occurs.
Signature
Concatenate(scale, centerOfRotation, rotationAxis, angle)
Parameters: - scale (float) – Relative scale factor
- centerOfRotation (
NXOpen.Point3d
) – If not NULL, this specifies a point in view space about which the view is to be rotated - rotationAxis (
NXOpen.Vector3d
) – The axis to rotate about - angle (float) – Rotation angle in radians
New in version NX4.0.0.
License requirements: None.
-------------------------------------
Concatenates the given translation, scale and rotation with the previous viewing transformation of the specified view. The translation is defined in view space, and conceptually occurs first. Then the scale is applied to the view using the newly defined center. Third, a translation occurs to move the center of the view to the center of rotation (if any). Fourth, the rotation occurs about the center of rotation. Finally, if a center of rotation is being used, the view is translated back to its origin as specified by the first argument. Although this is logically a five step process, only the final result appears in the graphics window.
In batch mode, the translation, scale and rotation of the view are modified, but no display occurs.
Signature
Concatenate(translation, scale, centerOfRotation, rotationAxis, angle)
Parameters: - translation (
NXOpen.Point3d
) – Point in view space to put at the center of the view - scale (float) – Relative scale factor
- centerOfRotation (
NXOpen.Point3d
) – If not NULL, this specifies a point in view space about which the view is to be rotated - rotationAxis (
NXOpen.Vector3d
) – The axis to rotate about - angle (float) – Rotation angle in radians
New in version NX4.0.0.
License requirements: None.
-------------------------------------
Expand¶
-
View.
Expand
¶ Expands the specified view to fill as much of the layout which contains the view as possible, without changing the aspect ratio of the view.
Other views in the layout are no longer displayed. The view becomes the work view. A view that is not displayed cannot be expanded.
In batch mode, the data for the view is changed to reflect that the view is expanded, but no display occurs.
Signature
Expand()
New in version NX4.0.0.
License requirements: None.
FindObject¶
-
View.
FindObject
¶ Finds the
NXOpen.NXObject
with the given identifier as recorded in a journal.An object may not return the same value as its JournalIdentifier in different versions of the software. However newer versions of the software should find the same object when FindObject is passed older versions of its journal identifier. In general, this method should not be used in handwritten code and exists to support record and playback of journals.
An exception will be thrown if no object can be found with the given journal identifier.
Signature
FindObject(journalIdentifier)
Parameters: journalIdentifier (str) – Journal identifier of the object Returns: Return type: NXOpen.INXObject
New in version NX3.0.0.
License requirements: None.
Fit¶
-
View.
Fit
¶ Adjusts the bounds of a given view so that it fully encompasses the extents of the model geometry.
If the view is displayed, the changes will appear in the display of that view, and, if enabled, the change in the bounds of the view is animated.
In batch mode, the data for the bounds of the view are changed to the adjusted bounds, but no display occurs.
Signature
Fit()
New in version NX3.0.0.
License requirements: None.
FitAfterShowOrHide¶
-
View.
FitAfterShowOrHide
¶ Adjusts the bounds of a given view conditionally so that it fully encompasses the extents of the model geometry.
This method is intended to be used only immediately after a show or hide operation has been done. The fit operation is performed only if the “Fit on Show or Hide” option is enabled by
Preferences.SessionVisualizationScreen.DoFitOnHideOrShow
, and if the work view is not a drawing view. If only a hide operation has been done and a fit would cause the view scale to decrease, the fit will not be done. If the view is displayed, the changes will appear in the display of that view, and, if enabled, the change in the bounds of the view is animated.In batch mode, the data for the bounds of the view may be changed to the adjusted bounds, if the “Fit on Show or Hide” option is enabled and the other conditions are met, but no display occurs.
Signature
FitAfterShowOrHide(type)
Parameters: type ( NXOpen.ViewShowOrHideType
) – Whether a Show or Hide or both has been doneNew in version NX8.5.0.
License requirements: None.
FitToObjects¶
-
View.
FitToObjects
¶ Adjusts the bounds of a given view so that it fully encompasses the extents of the given objects.
If the view is displayed, the changes will appear in the display of that view and, if enabled, the change in the bounds of the view is animated.
In batch mode, the data for the bounds of the view are changed to the adjusted bounds, but no display occurs.
Signature
FitToObjects(objects)
Parameters: objects (list of NXOpen.IFitTo
) – The objects whose display is to be included in the displayed bounds of the viewNew in version NX4.0.0.
License requirements: None.
GetAxis¶
-
View.
GetAxis
¶ Returns one of the view axes.
These are the components of the 3x3 matrix which is the rotation of absolute space which results in view space.
Signature
GetAxis(xYZAxis)
Parameters: xYZAxis ( NXOpen.XYZAxis
) – Whether to return the X, Y or Z axisReturns: The X, Y or Z axis of the view Return type: NXOpen.Vector3d
New in version NX6.0.0.
License requirements: None.
MakeWork¶
-
View.
MakeWork
¶ Makes the given view the work view.
The view must be currently displayed. As there must be exactly one work view at any time, the previous work view is no longer the work view.
In batch mode, the given view becomes the work view internally, but no display occurs.
Signature
MakeWork()
New in version NX4.0.0.
License requirements: None.
Orient¶
-
View.
Orient
¶ Overloaded method Orient
Orient(matrix)
Orient(viewName, viewScale)
Orient(viewName, viewScale)
-------------------------------------
Changes the view orientation relative to the specified absolute coordinate system. If enabled, the change in orientation of the view is animated. A view that is not displayed cannot be oriented.
In batch mode, the orientation of given view is changed internally, but no display occurs.
Signature
Orient(matrix)
Parameters: matrix ( NXOpen.Matrix3x3
) – Orientation relative to the absolute coordinate system. Must be orthonormal.New in version NX3.0.0.
License requirements: None.
-------------------------------------
Changes the view orientation to a specified canned view. If enabled, the change in orientation of the view is animated. A view that is not displayed cannot be oriented.
In batch mode, the orientation of given view is changed internally, but no display occurs.
Signature
Orient(viewName, viewScale)
Parameters: - viewName (
NXOpen.ViewCanned
) – Canned view name - viewScale (
NXOpen.ViewScaleAdjustment
) – Desired view scale
New in version NX3.0.0.
License requirements: None.
-------------------------------------
Changes the view orientation to a specified view. If enabled, the change in orientation of the view is animated. A view that is not displayed cannot be oriented.
In batch mode, the orientation of given view is changed internally, but no display occurs.
Signature
Orient(viewName, viewScale)
Parameters: - viewName (str) – Custom view name NOTE: The full Unicode character set is not supported for this parameter.
- viewScale (
NXOpen.ViewScaleAdjustment
) – Desired view scale
New in version NX3.0.0.
License requirements: None.
-------------------------------------
Print¶
-
View.
Print
¶ Prints a representation of this object to the system log file.
Signature
Print()
New in version NX3.0.0.
License requirements: None.
Regenerate¶
-
View.
Regenerate
¶ Regenerates the display of given view.
The current scale of the view is used to determine the tessalation of curves, facets and software line fonts. The view must be already displayed.
In batch mode, internal state information is reset as if the display were regenerated, but no display occurs.
Signature
Regenerate()
New in version NX4.0.0.
License requirements: None.
Restore¶
-
View.
Restore
¶ Restores a view to its last remembered rotation, scale and translation.
A view that is not displayed cannot be restored. If enabled, the restoration of the view is animated.
In batch mode, internal state information is restored, but no display occurs.
Signature
Restore()
Returns: Status of restore operation False - Restore successful
True - No Restore data available
Return type: bool New in version NX3.0.0.
License requirements: None.
Rotate¶
-
View.
Rotate
¶ Overloaded method Rotate
Rotate(matrix)
Rotate(origin, vector, angle)
-------------------------------------
Rotates the view by concatenating the given matrix to the existing rotation matrix of the view. A view that is not displayed cannot be rotated.
In batch mode, the rotation of the view is modified, but no display occurs.
Signature
Rotate(matrix)
Parameters: matrix ( NXOpen.Matrix3x3
) – Matrix relative to the absolute coordinate system. Must be orthonormal.New in version NX3.0.0.
License requirements: None.
-------------------------------------
Rotates the specified view using the specified origin of rotation and about the specified axis. The origin and the axis are specified in absolute coordinates. A view that is not displayed cannot be rotated.
In batch mode, the rotation of the view is modified, but no display occurs.
Signature
Rotate(origin, vector, angle)
Parameters: - origin (
NXOpen.Point3d
) – Origin in absolute space - vector (
NXOpen.Vector3d
) – X,Y,Z components in absolute space - angle (float) – Angle in degrees
New in version NX3.0.0.
License requirements: None.
-------------------------------------
SetName¶
-
View.
SetName
¶ Sets the custom name of the object.
NOTE: This method should not be used to edit a read-only object such as a Mirrored PMI object. If it is, the changes will be overridden when the part is updated.
Signature
SetName(name)
Parameters: name (str) – New in version NX3.0.0.
License requirements: None.
SetOrigin¶
-
View.
SetOrigin
¶ Moves the given position to the center of the view.
The position is given in absolute coordinates. The scale and rotation of the view are unchanged.
In batch mode, the origin of the view is changed internally, but no display occurs.
Signature
SetOrigin(origin)
Parameters: origin ( NXOpen.Point3d
) – The new view originNew in version NX4.0.0.
License requirements: None.
SetRotationTranslationScale¶
-
View.
SetRotationTranslationScale
¶ Sets the rotation, translation and scale of the specified view.
The rotation is applied first, about the absolute origin. Then the translation of the “look at” point to the view center is done, then the view is scaled about the view center.
In batch mode, the rotation, translation and scale of the view are modified, but no display occurs.
Signature
SetRotationTranslationScale(rotMatrix, translation, scale)
Parameters: - rotMatrix (
NXOpen.Matrix3x3
) – 3x3 rotation matrix to use for the view - replaces * the existing view rotation matrix (is not * concatenated with it - translation (
NXOpen.Point3d
) – Point in view space to put at the center of the view - scale (float) – Absolute scale factor
New in version NX4.0.0.
License requirements: None.
- rotMatrix (
SetScale¶
-
View.
SetScale
¶ Sets the scale of the specified view to the desired scale factor.
In batch mode, the scale of the view is modified, but no display occurs.
Signature
SetScale(scale)
Parameters: scale (float) – Absolute scale factor New in version NX3.0.0.
License requirements: None.
SnapToClosestCannedOrientation¶
-
View.
SnapToClosestCannedOrientation
¶ Changes the orientation of the given view to the orientation of the canned view whose orientation is the closest to that of the given view.
A view that is not displayed cannot be snapped. If enabled, the change in the orientation of the view is animated.
In batch mode, the orientation of the view is changed internally, but no display occurs.
Signature
SnapToClosestCannedOrientation()
New in version NX4.0.0.
License requirements: None.
SnapToVariantCannedOrientation¶
-
View.
SnapToVariantCannedOrientation
¶ Similar to
NXOpen.View.SnapToClosestCannedOrientation
except it changes the orientation of the given view to the orientation of some canned view “variant” based on I-deas’s ‘snapview’ logic whose orientation is the closest to one of the six orthographic and eight flavors of trimetric views.In batch mode, the orientation of the view is changed internally, but no display occurs.
Signature
SnapToVariantCannedOrientation()
New in version NX5.0.0.
License requirements: None.
UpdateCustomSymbols¶
-
View.
UpdateCustomSymbols
¶ Updates custom symbol in a drawing member view or drawing sheet
Signature
UpdateCustomSymbols()
New in version NX8.0.1.
License requirements: None.
UpdateDisplay¶
-
View.
UpdateDisplay
¶ Updates the display of given view, as needed.
The current scale of the view is used to determine the tessalation of curves, facets and software line fonts. The view must be already displayed.
In batch mode, internal state information is updated, but no display occurs.
Signature
UpdateDisplay()
New in version NX4.0.0.
License requirements: None.
Zoom¶
-
View.
Zoom
¶ Scales the specified view to a desired relative scale.
The “reduce” and “increase” scale options are fixed at 10%. All the scale options provided by
NXOpen.ViewScaleFactor
have an internal limiting factor. This scale can’t be increased or decreased indefinitely. The change in view scale is not animated.In batch mode, the scale of the view is modified, but no display occurs.
Signature
Zoom(scaleFactor)
Parameters: scaleFactor ( NXOpen.ViewScaleFactor
) – Relative scale factorNew in version NX3.0.0.
License requirements: None.
ZoomAboutPoint¶
-
View.
ZoomAboutPoint
¶ Scales the specified view such that the given scale_about_point does not move.
If the specified scale is extremely small or extremely large, a minimum or maximum scale will be used. These are the same minimum and maximum values as used interactively. The relative_scale will be concatenated to the current scale of the view, so that 1.0 means no change of scale and 2.0 means that the scale of the view will be doubled. The scale_about_point and current_view_center are given in View Space. The view must already be displayed.
In batch mode, the scale and translation of the view are modified, but no display occurs.
Signature
ZoomAboutPoint(relativeScale, scaleAboutPoint, viewCenter)
Parameters: - relativeScale (float) – Relative scale [1.0 = no change]
- scaleAboutPoint (
NXOpen.Point3d
) – The point to remain stationary, in View Space - viewCenter (
NXOpen.Point3d
) – The point to be considered as the view center, in View Space. This may be NULL, in which case the current view center is used.
New in version NX4.0.0.
License requirements: None.
ZoomByRectangle¶
-
View.
ZoomByRectangle
¶ Scales the specified view such that the specified rectangle is as large as possible while being fully contained within the viewport.
If the rectangle and the viewport do not have the same aspect ratio, the viewport will contain some of the view not within the rectangle. If the rectangle is extremely small or extremely large, a minimum or maximum scale will be used. These are the same minimum and maximum values as used interactively. The two opposite corners of the rectangle are given in View Space. The view must already be displayed. If enabled, the change in the bounds of the view is animated.
In batch mode, the scale and translation of the view are modified, but no display occurs.
Signature
ZoomByRectangle(corner1, corner2)
Parameters: - corner1 (
NXOpen.Point3d
) – One corner of the rectangle, in View Space - corner2 (
NXOpen.Point3d
) – The opposite corner of the rectangle, in View Space
New in version NX4.0.0.
License requirements: None.
- corner1 (