Methods

Public Methods

fitView()

Ensures all visible objects can be seen in the view.

orientView(direction='top', up=None)

Rotates your model to a standard view, an isometric view, to the closest principal axis, or so that the sketch plane is normal to the grid.

param direction

View direction. Valid choices are: - “front” - “back” - “left” - “right” - “top” - “bottom” - “iso”

type direction

str

param up

Specifies the vector that points up on the screen.

type up

math.Vector

isolate(obj)

Isolates objects in the modeling window.

Isolating an object zooms in and temporarily hides all other objects.

param obj

Any inspire object that can change visibility.

type obj

Named

redrawView(processEvents=False)

Forces a redraw of the active graphics window. Useful when executing commands from the Console and the graphics are cached or updating the view for animation.

param processEvents

True, makes gui responsive to the user.

type processEvents

bool

showMessage(msg)

Displays a message in the status bar.

param msg

Message to be displayed in the status bar.

type msg

str

clearMessage()

Removes a message from the status bar.

saveSnapShot(filename, background=None, width=None, height=None, fitToImage=False)

Saves what is currently in the graphics window under the given filename.

param filename

The complete file name to write the image to. its extension implicitly defines the graphic file format Allowed formats are .jpg, .png.

type filename

str

param background

The desired background color of the snapshot. If not provided, the current gradient background of the active view will be used.

type background

str | tuple[float, float, float]

param width

The desired width of the image.

type width

int

param height

The desired height of the image.

type height

int

param fitToImage

If true, fits the objects to be drawn into the image.

type fitToImage

bool

saveCurrentResultSnapshot(filename, bgColor=None, width=None, height=None, fitToImage=False)

Saves the results graphic window and analysis explorer dialog to a file.

Keep the graphics window as big as possible to get a clear snapshot.

param filename

The complete file name to write the image to.

type filename

str

param bgColor

The desired background color.

type bgColor

str | tuple[float, float, float]

param width

The desired width of the image.

type width

int

param height

The desired height of the image.

type height

int

param fitToImage

If true, fits the objects to be drawn into the image.

type fitToImage

bool

raises RuntimeError

In case you call the method in batch mode.

raises RuntimeError

In case the Analysis explorer isn’t displayed in the graphics window.