SheetViewState Class

A view of a SheetModel.

Extends

Implements

Methods

Name Description
constructor(props: ViewDefinition2dProps, iModel: IModelConnection, categories: CategorySelectorState, displayStyle: DisplayStyle2dState, sheetProps: SheetProps, attachments: Id64Array): SheetViewState    
getExtents(): Vector3d    
getOrigin(): Point3d    
toProps(): ViewStateProps    
createFromProps(viewStateData: ViewStateProps, iModel: IModelConnection): SheetViewState Static    

Inherited methods

Name Inherited from Description
_updateMaxGlobalScopeFactor(): void Protected ViewState  
adjustAspectRatio(aspect: number): void ViewState Adjust the aspect ratio of this ViewState so it matches the supplied value.
allow3dManipulations(): boolean ViewState2d  
calculateFocusCorners(): Point3d[] ViewState  
calculateFrustum(result?: Frustum): Frustum | undefined ViewState Calculate the world coordinate Frustum from the parameters of this ViewState.
clone(iModel?: IModelConnection): this EntityState Make an independent copy of this EntityState
createAuxCoordSystem(acsName: string): AuxCoordSystemState ViewState2d  
equals(other: this): boolean ViewState Determine whether this ViewState exactly matches another.
forEachModel(func: (model: GeometricModelState) => void): void ViewState2d  
getAspectRatio(): number ViewState Get the aspect ratio (width/height) of this view
getAspectRatioSkew(): number ViewState Get the aspect ratio skew (x/y, usually 1.0) that is used to exaggerate the y axis of the view.
getAuxiliaryCoordinateSystemId(): Id64String ViewState Get the Id of the auxiliary coordinate system for this ViewState
getCenter(result?: Point3d): Point3d ViewState Get the point at the geometric center of the view.
getGridOrientation(): GridOrientationType ViewState Get the grid settings for this view
getGridSettings(vp: Viewport, origin: Point3d, rMatrix: Matrix3d, orientation: GridOrientationType): void ViewState Populate the given origin and rotation with information from the grid settings from the grid orientation.
getGridSpacing(): XAndY ViewState  
getGridsPerRef(): number ViewState  
getModelAppearanceOverride(id: Id64String): FeatureAppearance | undefined ViewState Query the symbology overrides applied to a model when rendered using this ViewState.
getModelDisplayTransform(modelId: Id64String, baseTransform: Transform): Transform ViewState Obtain the transform with which the specified model will be displayed, accounting for this view's ModelDisplayTransformProvider.
getRotation(): Matrix3d ViewState2d  
getSubCategoryOverride(id: Id64String): SubCategoryOverride | undefined ViewState Query the symbology overrides applied to geometry belonging to a specific subcategory when rendered using this ViewState.
getTargetPoint(result?: Point3d): Point3d ViewState Get the target point of the view.
getUpVector(point: Point3d): Vector3d ViewState  
getViewClip(): ClipVector | undefined ViewState Get the clipping volume for this view, if defined
getViewedModel(): GeometricModel2dState | undefined ViewState2d Return the model for this 2d view.
getXVector(result?: Vector3d): Vector3d ViewState Get the unit vector that points in the view X (left-to-right) direction.
getYVector(result?: Vector3d): Vector3d ViewState Get the unit vector that points in the view Y (bottom-to-top) direction.
getZVector(result?: Vector3d): Vector3d ViewState Get the unit vector that points in the view Z (front-to-back) direction.
hasSameCoordinates(other: ViewState): boolean ViewState Determine whether this ViewState has the same coordinate system as another one.
is2d(): this ViewState Returns true if this ViewState is-a ViewState2d
isCameraEnabled(): this ViewState Returns true if this ViewState is-a ViewState3d with the camera currently on.
lookAtViewAlignedVolume(volume: Range3d, aspect?: number, options?: ViewChangeOptions): void ViewState Look at a volume of space defined by a range in view local coordinates, keeping its current rotation.
lookAtVolume(volume: LowAndHighXYZ | LowAndHighXY, aspect?: number, options?: ViewChangeOptions): void ViewState Change the volume that this view displays, keeping its current rotation.
onRenderFrame(_viewport: Viewport): void ViewState2d This function is never called.
resetExtentLimits(): void ViewState Resets the largest and smallest values allowed for the extents of this ViewState to their default values.
setAspectRatioSkew(val: number): void ViewState Set the aspect ratio skew (x/y) for this view.
setAuxiliaryCoordinateSystem(acs?: AuxCoordSystemState): void ViewState Set or clear the AuxiliaryCoordinateSystem for this view.
setCategorySelector(categories: CategorySelectorState): void ViewState Set the CategorySelector for this view.
setCenter(center: Point3d): void ViewState set the center of this view to a new position.
setDisplayStyle(style: DisplayStyleState): void ViewState  
setExtents(delta: XAndY): void ViewState2d  
setGridSettings(orientation: GridOrientationType, spacing: Point2d, gridsPerRef: number): void ViewState Set the grid settings for this view
setOrigin(origin: XAndY): void ViewState2d  
setRotation(rot: Matrix3d): void ViewState2d  
setRotationAboutPoint(rotation: Matrix3d, point?: Point3d): void ViewState Set the rotation of this ViewState to the supplied rotation, by rotating it about a point.
setStandardRotation(id: StandardViewId): void ViewState Orient this view to one of the StandardView rotations.
setViewClip(clip?: ClipVector): void ViewState Set or clear the clipping volume for this view.
setupFromFrustum(inFrustum: Frustum, opts?: ViewChangeOptions): ViewStatus ViewState Initialize the origin, extents, and rotation from an existing Frustum
toJSON(): ViewDefinition2dProps ViewState2d  
viewsCategory(id: Id64String): boolean ViewState Determine whether the specified Category is displayed in this view
viewsModel(modelId: Id64String): boolean ViewState2d  

Properties

Name Type Description
attachmentIds Accessor ReadOnly Id64Array    
attachments Accessor ReadOnly Object[] | undefined Strictly for testing.  
sheetSize Point2d The width and height of the sheet in world coordinates.  
viewAttachmentProps Accessor ReadOnly Array<Readonly<ViewAttachmentProps>> Strictly for testing.  

Inherited properties

Name Type Inherited from Description
_baseModelId Protected Id64String ViewState2d  
analysisStyle Accessor ReadOnly AnalysisStyle | undefined ViewState  
angle Angle ViewState2d  
auxiliaryCoordinateSystem Accessor ReadOnly AuxCoordSystemState ViewState get the auxiliary coordinate system state object for this ViewState.
backgroundColor Accessor ReadOnly ColorDef ViewState Get this view's background color.
baseModelId Accessor ReadOnly Id64String ViewState2d  
categorySelector Accessor CategorySelectorState ViewState Selects the categories that are display by this ViewState.
classFullName Accessor StaticReadOnly string EntityState Get full BIS class name of this Entity in the form "SchemaName:ClassName".
classFullName string EntityState The full class name in the form "schema:class".
className Accessor ReadOnly string EntityState The name of the BIS class associated with this class.
code Code ElementState The Code for this element
delta Point2d ViewState2d  
description undefined | string ViewState  
details Accessor ReadOnly ViewDetails ViewState2d Provides access to optional detail settings for this view.
displayStyle Accessor DisplayStyleState ViewState The style that controls how the contents of the view are displayed.
extentLimits Accessor ExtentLimits ViewState Get or set the largest and smallest values allowed for the extents for this ViewState
The default limits vary based on the type of view:
- Spatial view extents cannot exceed the diameter of the earth.
- Drawing view extents cannot exceed twice the longest axis of the drawing model's range.
- Sheet view extents cannot exceed ten times the paper size of the sheet.
Explicitly setting the extent limits overrides the default limits.
federationGuid undefined | GuidString ElementState A FederationGuid assigned to this element by some other federated database
globalScopeFactor Accessor ReadOnly number ViewState A value that represents the global scope of the view -- a value greater than one indicates that the scope of this view is global (viewing most of Earth).
id Id64String EntityState The Id of this Entity.
iModel IModelConnection EntityState The iModel from which this Entity was loaded
isAttachedToViewport Accessor ReadOnly boolean ViewState Returns whether this view is currently being displayed by a Viewport.
isPrivate undefined | false | true ViewState  
jsonProperties [key: string]: any EntityState Optional json properties of this Entity.
model Id64String ElementState The ModelId of the Model containing this element
modelDisplayTransformProvider Accessor ModelDisplayTransformProvider | undefined ViewState Specify a provider of per-model display transforms. Intended chiefly for use by model alignment tools.
name Accessor ReadOnly string ViewState Get the name of the ViewDefinition from which this ViewState originated.
onDisplayStyleChanged BeEvent<(newStyle: DisplayStyleState) => void> ViewState An event raised just before assignment to the ViewState.displayStyle property, only if the view is attached to a Viewport.
onModelDisplayTransformProviderChanged BeEvent<(newProvider: ModelDisplayTransformProvider | undefined) => void> ViewState Event raised just before assignment to the ViewState.modelDisplayTransformProvider property, only if the view is attached to a Viewport.
onViewedCategoriesChanged BeEvent<() => void> ViewState An event raised when the set of categories viewed by this view changes, only if the view is attached to a Viewport.
origin Point2d ViewState2d  
parent undefined | RelatedElement ElementState The parent Element of this, or undefined if no parent.
scheduleScript Accessor ReadOnly Script | undefined ViewState The RenderSchedule.Script that animates the contents of the view, if any.
schemaName Accessor StaticReadOnly string EntityState The name of the BIS schema for this class.
userLabel undefined | string ElementState A user-assigned label for this element.
viewFlags Accessor ViewFlags ViewState Flags controlling various aspects of this view's DisplayStyleState.

Defined in

Last Updated: 06 October, 2021