NX Open C++ Reference Guide
Public Types | Public Member Functions
NXOpen::View Class Reference

Represents a view. More...

Inheritance diagram for NXOpen::View:
NXOpen::NXObject NXOpen::TaggedObject NXOpen::INXObject NXOpen::Drawings::DraftingView NXOpen::ModelingView NXOpen::Drawings::BaseView NXOpen::Drawings::DetailView NXOpen::Drawings::DrawingView NXOpen::Drawings::ProjectedView NXOpen::Drawings::SectionView NXOpen::Annotations::LightweightSectionView NXOpen::Annotations::SearchModelView NXOpen::CutView

List of all members.

Public Types

enum  Canned {
  CannedTop, CannedFront, CannedRight, CannedBack,
  CannedBottom, CannedLeft, CannedIsometric, CannedTrimetric
}
 Describes a simplified indexing scheme for accessing canned views with interfaces that use this enum as a parameter. More...
enum  RenderingStyleType {
  RenderingStyleTypeShadedWithEdges, RenderingStyleTypeShadedWithBodyColorEdges, RenderingStyleTypeShaded, RenderingStyleTypeWireframeWithDimEdges,
  RenderingStyleTypeWireframeWithHiddenEdges, RenderingStyleTypeWireframeWithDashedEdges, RenderingStyleTypeStudio, RenderingStyleTypeFaceAnalysis,
  RenderingStyleTypePartiallyShaded, RenderingStyleTypeStaticWireframe
}
 Describes the rendering style for geometry displayed in the view. More...
enum  ScaleAdjustment { ScaleAdjustmentFit, ScaleAdjustmentCurrent, ScaleAdjustmentSaved }
 Describes simple, predefined adjustments that may be applied to a view's scale while another operation is performed, in conjunction, on the view. More...
enum  ScaleFactor { ScaleFactorHalfScale, ScaleFactorDoubleScale, ScaleFactorReduceScale, ScaleFactorIncreaseScale }
 Describes the relative scales to which a view can be set. More...

Public Member Functions

std::vector
< NXOpen::DisplayableObject * > 
AskVisibleObjects ()
 Returns an array of objects visible in a view.
void Concatenate (const NXOpen::Point3d &translation)
 Concatenates the given translation with the previous viewing transformation of the specified view.
void Concatenate (double scale)
 Concatenates the given scale with the previous viewing transformation of the specified view.
void Concatenate (const NXOpen::Point3d &translation, double scale)
 Concatenates the given translation and scale with the previous viewing transformation of the specified view.
void Concatenate (const NXOpen::Point3d &centerOfRotation, const NXOpen::Vector3d &rotationAxis, double angle)
 Concatenates the given rotation with the previous viewing transformation of the specified view.
void Concatenate (const NXOpen::Point3d &translation, const NXOpen::Point3d &centerOfRotation, const NXOpen::Vector3d &rotationAxis, double angle)
 Concatenates the given translation and rotation with the previous viewing transformation of the specified view.
void Concatenate (double scale, const NXOpen::Point3d &centerOfRotation, const NXOpen::Vector3d &rotationAxis, double angle)
 Concatenates the given scale and rotation with the previous viewing transformation of the specified view.
void Concatenate (const NXOpen::Point3d &translation, double scale, const NXOpen::Point3d &centerOfRotation, const NXOpen::Vector3d &rotationAxis, double angle)
 Concatenates the given translation, scale and rotation with the previous viewing transformation of the specified view.
NXOpen::ViewDependentDisplayManagerDependentDisplay ()
 Returns an object to perform all view dependent display operations
Created in NX3.0.0.
void 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.
void Fit ()
 Adjusts the bounds of a given view so that it fully encompasses the extents of the model geometry.
void FitToObjects (const std::vector< NXOpen::IFitTo * > &objects)
 Adjusts the bounds of a given view so that it fully encompasses the extents of the given objects.
NXOpen::Vector3d GetAxis (NXOpen::XYZAxis xYZAxis)
 Returns one of the view axes.
void MakeWork ()
 Makes the given view the work view.
NXOpen::Matrix3x3 Matrix ()
 Returns the view matrix.
void Orient (const NXOpen::Matrix3x3 &matrix)
 Changes the view orientation relative to the specified absolute coordinate system.
void Orient (NXOpen::View::Canned viewName, NXOpen::View::ScaleAdjustment viewScale)
 Changes the view orientation to a specified canned view.
void Orient (const NXString &viewName, NXOpen::View::ScaleAdjustment viewScale)
 Changes the view orientation to a specified view.
NXOpen::Point3d Origin ()
 Returns the view origin.
void Regenerate ()
 Regenerates the display of given view.
NXOpen::View::RenderingStyleType RenderingStyle ()
 Returns the rendering style of the view.
bool Restore ()
 Restores a view to its last remembered rotation, scale and translation.
void Rotate (const NXOpen::Matrix3x3 &matrix)
 Rotates the view by concatenating the given matrix to the existing rotation matrix of the view.
void Rotate (const NXOpen::Point3d &origin, const NXOpen::Vector3d &vector, double angle)
 Rotates the specified view using the specified origin of rotation and about the specified axis.
double Scale ()
 Returns the view scale
Created in NX3.0.0.
void SetOrigin (const NXOpen::Point3d &origin)
 Moves the given position to the center of the view.
void SetRenderingStyle (NXOpen::View::RenderingStyleType renderingStyle)
 Sets the rendering style of the view.
void SetRotationTranslationScale (const NXOpen::Matrix3x3 &rotMatrix, const NXOpen::Point3d &translation, double scale)
 Sets the rotation, translation and scale of the specified view.
void SetScale (double scale)
 Sets the scale of the specified view to the desired scale factor.
void 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.
void SnapToVariantCannedOrientation ()
 Similar to 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.
void UpdateCustomSymbols ()
 Updates custom symbol in a drawing member view or drawing sheet
Created in NX8.0.1.
void UpdateDisplay ()
 Updates the display of given view, as needed.
NXOpen::Preferences::ViewVisualizationSpecialEffectsVisualizationSpecialEffectsPreferences ()
 Returns an object to perform all visualization Special Effects related preferences settings
Created in NX3.0.0.
NXOpen::Preferences::ViewVisualizationVisualVisualizationVisualPreferences ()
 Returns an object to perform all visualization related preferences settings
Created in NX3.0.0.
void Zoom (NXOpen::View::ScaleFactor scaleFactor)
 Scales the specified view to a desired relative scale.
void ZoomAboutPoint (double relativeScale, const NXOpen::Point3d &scaleAboutPoint, const NXOpen::Point3d &viewCenter)
 Scales the specified view such that the given scale_about_point does not move.
void ZoomByRectangle (const NXOpen::Point3d &corner1, const NXOpen::Point3d &corner2)
 Scales the specified view such that the specified rectangle is as large as possible while being fully contained within the viewport.

Detailed Description

Represents a view.

View can be obtained either from ViewCollection or from ModelingViewCollection .
This class is not created directly by the user.

Created in NX3.0.0.


Member Enumeration Documentation

Describes a simplified indexing scheme for accessing canned views with interfaces that use this enum as a parameter.

Enumerator:
CannedTop 

top

CannedFront 

front

CannedRight 

right

CannedBack 

back

CannedBottom 

bottom

CannedLeft 

left

CannedIsometric 

isometric

CannedTrimetric 

trimetric

Describes the rendering style for geometry displayed in the view.

Enumerator:
RenderingStyleTypeShadedWithEdges 

shaded with edges

RenderingStyleTypeShadedWithBodyColorEdges 

shaded with body color edges

RenderingStyleTypeShaded 

shaded

RenderingStyleTypeWireframeWithDimEdges 

wireframe with dim edges

RenderingStyleTypeWireframeWithHiddenEdges 

wireframe with hidden edges

RenderingStyleTypeWireframeWithDashedEdges 

wireframe with dashed edges

RenderingStyleTypeStudio 

studio

RenderingStyleTypeFaceAnalysis 

face analysis

RenderingStyleTypePartiallyShaded 

partially shaded

RenderingStyleTypeStaticWireframe 

static wireframe

Describes simple, predefined adjustments that may be applied to a view's scale while another operation is performed, in conjunction, on the view.

For more details, refer to those interfaces that use this enum as a parameter.

Enumerator:
ScaleAdjustmentFit 

fit

ScaleAdjustmentCurrent 

current

ScaleAdjustmentSaved 

saved

Describes the relative scales to which a view can be set.

Enumerator:
ScaleFactorHalfScale 

half scale

ScaleFactorDoubleScale 

double scale

ScaleFactorReduceScale 

Reduce scale by 10%.

ScaleFactorIncreaseScale 

Increase scale by 10%.


Member Function Documentation

Returns an array of objects visible in a view.

Returns:
The array of visible objects
Created in NX4.0.0.

License requirements : None
void NXOpen::View::Concatenate ( const NXOpen::Point3d translation)

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

Created in NX4.0.0.

License requirements : None

Parameters:
translationPoint in view space to put at the center of the view
void NXOpen::View::Concatenate ( double  scale)

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.

Created in NX4.0.0.

License requirements : None

Parameters:
scaleRelative scale factor
void NXOpen::View::Concatenate ( const NXOpen::Point3d translation,
double  scale 
)

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.

Created in NX4.0.0.

License requirements : None

Parameters:
translationPoint in view space to put at the center of the view
scaleRelative scale factor
void NXOpen::View::Concatenate ( const NXOpen::Point3d centerOfRotation,
const NXOpen::Vector3d rotationAxis,
double  angle 
)

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.

Created in NX4.0.0.

License requirements : None

Parameters:
centerOfRotationIf not NULL, this specifies a point in view space about which the view is to be rotated
rotationAxisThe axis to rotate about
angleRotation angle in radians
void NXOpen::View::Concatenate ( const NXOpen::Point3d translation,
const NXOpen::Point3d centerOfRotation,
const NXOpen::Vector3d rotationAxis,
double  angle 
)

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.

Created in NX4.0.0.

License requirements : None

Parameters:
translationPoint in view space to put at the center of the view
centerOfRotationIf not NULL, this specifies a point in view space about which the view is to be rotated
rotationAxisThe axis to rotate about
angleRotation angle in radians
void NXOpen::View::Concatenate ( double  scale,
const NXOpen::Point3d centerOfRotation,
const NXOpen::Vector3d rotationAxis,
double  angle 
)

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.

Created in NX4.0.0.

License requirements : None

Parameters:
scaleRelative scale factor
centerOfRotationIf not NULL, this specifies a point in view space about which the view is to be rotated
rotationAxisThe axis to rotate about
angleRotation angle in radians
void NXOpen::View::Concatenate ( const NXOpen::Point3d translation,
double  scale,
const NXOpen::Point3d centerOfRotation,
const NXOpen::Vector3d rotationAxis,
double  angle 
)

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.

Created in NX4.0.0.

License requirements : None

Parameters:
translationPoint in view space to put at the center of the view
scaleRelative scale factor
centerOfRotationIf not NULL, this specifies a point in view space about which the view is to be rotated
rotationAxisThe axis to rotate about
angleRotation angle in radians

Returns an object to perform all view dependent display operations
Created in NX3.0.0.


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.

Created in NX4.0.0.

License requirements : None

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.

Created in NX3.0.0.

License requirements : None

void NXOpen::View::FitToObjects ( const std::vector< NXOpen::IFitTo * > &  objects)

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.

Created in NX4.0.0.

License requirements : None

Parameters:
objectsThe objects whose display is to be included in the displayed bounds of the view

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.

Returns:
The X, Y or Z axis of the view
Created in NX6.0.0.

License requirements : None
Parameters:
xYZAxisWhether to return the X, Y or Z axis

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.

Created in NX4.0.0.

License requirements : None

Returns the view matrix.

This 3x3 orthonormal matrix specifies the rotation from model space to view space.
Created in NX3.0.0.

License requirements : None

void NXOpen::View::Orient ( const NXOpen::Matrix3x3 matrix)

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.

Created in NX3.0.0.

License requirements : None

Parameters:
matrixOrientation relative to the absolute coordinate system. Must be orthonormal.

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.

Created in NX3.0.0.

License requirements : None

Parameters:
viewNameCanned view name
viewScaleDesired view scale
void NXOpen::View::Orient ( const NXString viewName,
NXOpen::View::ScaleAdjustment  viewScale 
)

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.

Created in NX3.0.0.

License requirements : None

Parameters:
viewNameCustom view name
NOTE: The full Unicode character set is not supported for this parameter.
viewScaleDesired view scale

Returns the view origin.

This is the negation of the position in untranslated view space which appears in the middle of the viewport. This is the same as the translation used in View::Concatenate and in the other similar concatenate methods.
Created in NX3.0.0.

License requirements : None

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.

Created in NX4.0.0.

License requirements : None

Returns the rendering style of the view.


Created in NX4.0.0.

License requirements : None

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.

Returns:
Status of restore operation
False - Restore successful

True - No Restore data available


Created in NX3.0.0.

License requirements : None

void NXOpen::View::Rotate ( const NXOpen::Matrix3x3 matrix)

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.

Created in NX3.0.0.

License requirements : None

Parameters:
matrixMatrix relative to the absolute coordinate system. Must be orthonormal.
void NXOpen::View::Rotate ( const NXOpen::Point3d origin,
const NXOpen::Vector3d vector,
double  angle 
)

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.

Created in NX3.0.0.

License requirements : None

Parameters:
originOrigin in absolute space
vectorX,Y,Z components in absolute space
angleAngle in degrees
double NXOpen::View::Scale ( )

Returns the view scale
Created in NX3.0.0.



License requirements : None

void NXOpen::View::SetOrigin ( const NXOpen::Point3d origin)

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.

Created in NX4.0.0.

License requirements : None

Parameters:
originThe new view origin

Sets the rendering style of the view.


Created in NX4.0.0.

License requirements : None

Parameters:
renderingStylerendering style
void NXOpen::View::SetRotationTranslationScale ( const NXOpen::Matrix3x3 rotMatrix,
const NXOpen::Point3d translation,
double  scale 
)

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.

Created in NX4.0.0.

License requirements : None

Parameters:
rotMatrix3x3 rotation matrix to use for the view - replaces the existing view rotation matrix (is not concatenated with it
translationPoint in view space to put at the center of the view
scaleAbsolute scale factor
void NXOpen::View::SetScale ( double  scale)

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.

Created in NX3.0.0.

License requirements : None

Parameters:
scaleAbsolute scale factor

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.

Created in NX4.0.0.

License requirements : None

Similar to 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.

Created in NX5.0.0.

License requirements : None

Updates custom symbol in a drawing member view or drawing sheet
Created in NX8.0.1.



License requirements : None

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.

Created in NX4.0.0.

License requirements : None

Returns an object to perform all visualization Special Effects related preferences settings
Created in NX3.0.0.


Returns an object to perform all visualization related preferences settings
Created in NX3.0.0.


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 View::ScaleFactor 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.

Created in NX3.0.0.

License requirements : None

Parameters:
scaleFactorRelative scale factor
void NXOpen::View::ZoomAboutPoint ( double  relativeScale,
const NXOpen::Point3d scaleAboutPoint,
const NXOpen::Point3d viewCenter 
)

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.

Created in NX4.0.0.

License requirements : None

Parameters:
relativeScaleRelative scale [1.0 = no change]
scaleAboutPointThe point to remain stationary, in View Space
viewCenterThe point to be considered as the view center, in View Space. This may be NULL, in which case the current view center is used.
void NXOpen::View::ZoomByRectangle ( const NXOpen::Point3d corner1,
const NXOpen::Point3d corner2 
)

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.

Created in NX4.0.0.

License requirements : None

Parameters:
corner1One corner of the rectangle, in View Space
corner2The opposite corner of the rectangle, in View Space

The documentation for this class was generated from the following file:
Copyright 2011 Siemens Product Lifecycle Management Software Inc. All Rights Reserved.