View
A 3D model view window.
Example
app = cf.GetApplication() project = app:NewProject() -- Create a large cuboid cube = project.Geometry:AddCuboid(cf.Point(0,0,0), 10, 10, 10) -- Get the first view view1 = app.Views[1] -- Zoom to extents on the view view1:ZoomToExtents()
Property List
- Axes
- The axes properties. (Read only View3DAxesFormat)
- DisplayMode
- The display mode properties. (Read only ViewDisplayMode)
- Entities
- The entities properties. (Read only View3DEntityFormat)
- Format
- The 3D view properties. (Read only View3DFormat)
- Height
- The height of the view window. (Read only number)
- Rendering
- The model and mesh rendering properties. (Read only ViewRendering)
- Type
- The object type string. (Read only string)
- Width
- The width of the view window. (Read only number)
- WindowActive
- True if this window is the active window. (Read only boolean)
- WindowTitle
- The title of the view window. (Read/Write string)
- XPosition
- The X position of the view window. (Read only number)
- YPosition
- The Y position of the view window. (Read only number)
Method List
- Close ()
- Close the view window.
- ExportImage (filename string, fileformat string)
- Export the view window image at its same size to a specified file.
- ExportImage (filename string, fileformat string, imagewidth number, imageheight number)
- Export the view window image at the given size to a specified file.
- GetProperties ()
- Returns a table of properties representing the state of the object. The properties table can be used with the SetProperties method to change multiple properties of the object in one step. (Returns a table object.)
- Maximise ()
- Maximise the view window.
- Minimise ()
- Minimise the view window.
- Restore ()
- Restore the view window.
- SetPosition (xposition number, yposition number)
- Sets the view position. Note that the view is restored when this function is called.
- SetProperties (properties table)
- Modifies the state of the object using the provided table of properties. This method is used to modify multiple properties of the object in a single step.
- SetSize (imagewidth number, imageheight number)
- Sets the view window size. Note that the view is restored when this function is called.
- SetViewDirection (direction ViewDirectionEnum)
- Specifies the direction from which the model is viewed, e.g., Isometric, Top, Bottom, Left, etc.
- Show ()
- Shows the view window.
- ZoomToExtents ()
- Zoom the content of the view window to its extent.
Property Details
- Axes
- The axes properties.
- Type
- View3DAxesFormat
- Access
- Read only
- DisplayMode
- The display mode properties.
- Type
- ViewDisplayMode
- Access
- Read only
- Entities
- The entities properties.
- Type
- View3DEntityFormat
- Access
- Read only
- Format
- The 3D view properties.
- Type
- View3DFormat
- Access
- Read only
- Height
- The height of the view window.
- Type
- number
- Access
- Read only
- Rendering
- The model and mesh rendering properties.
- Type
- ViewRendering
- Access
- Read only
- Type
- The object type string.
- Type
- string
- Access
- Read only
- Width
- The width of the view window.
- Type
- number
- Access
- Read only
- WindowActive
- True if this window is the active window.
- Type
- boolean
- Access
- Read only
- WindowTitle
- The title of the view window.
- Type
- string
- Access
- Read/Write
- XPosition
- The X position of the view window.
- Type
- number
- Access
- Read only
- YPosition
- The Y position of the view window.
- Type
- number
- Access
- Read only
Method Details
- Close ()
- Close the view window.
- ExportImage (filename string, fileformat string)
- Export the view window image at its same size to a specified file.
- ExportImage (filename string, fileformat string, imagewidth number, imageheight number)
- Export the view window image at the given size to a specified file.
- GetProperties ()
- Returns a table of properties representing the state of the object. The properties table can be used with the SetProperties method to change multiple properties of the object in one step.
- Return
- table
- A properties table.
- Maximise ()
- Maximise the view window.
- Minimise ()
- Minimise the view window.
- Restore ()
- Restore the view window.
- SetPosition (xposition number, yposition number)
- Sets the view position. Note that the view is restored when this function is called.
- SetProperties (properties table)
- Modifies the state of the object using the provided table of properties. This method is used to modify multiple properties of the object in a single step.
- Input Parameters
- properties(table)
- A table of properties defining the new state of the object.
- SetSize (imagewidth number, imageheight number)
- Sets the view window size. Note that the view is restored when this function is called.
- SetViewDirection (direction ViewDirectionEnum)
- Specifies the direction from which the model is viewed, e.g., Isometric, Top, Bottom, Left, etc.
- Input Parameters
- direction(ViewDirectionEnum)
- The direction specified by ViewDirectionEnum.
- Show ()
- Shows the view window.
- ZoomToExtents ()
- Zoom the content of the view window to its extent.