SilverScreen Solid Modeler

SilverEngine Basics

SilverEngine Basics

Previous topic Next topic  

SilverEngine Basics

Previous topic Next topic JavaScript is required for the print function  

SilverEngineEllipse

 

SilverEngine Basics

 


Overview

 

A SilverEngine application is one that manipulates, and typically views or renders, SilverScreen drawings using the SilverEngine DLL.  Manipulation of SilverScreen drawings is largely the province of the SilverScreen API, which is covered in a separate section. What is relevant here is the startup and shutdown of the SilverEngine DLL, and aspects relating to viewing and rendering SilverScreen drawings.

 

 


Loading SilverEngine

 

SilverEngine is implemented as a Win32 DLL. A SilverEngine application should link implicitly to SilverEngine. This means that the bookkeeping tasks associated with locating and loading the DLL, resolving its symbolic references, and unloading SilverEngine are handled by the operating system.

 

It is possible, albeit impractical, to link to SilverEngine explicitly, by using the Win32 API function LoadLibrary. Such an approach would require that any needed SilverScreen API functions be obtained via the Win32 API function GetProcAddress.

 

 


SilverEngine Startup

 

The SilverEngine DLL must be initialized before it may be used. To do this, the engine_initialize function is used. The engine_initialize function supplies SilverEngine with the name of a SilverScreen environment file (.ENV). This environment file contains a number of important startup settings for SilverEngine.

 

Other functions that may be called in the initialization phase are:

 

Function

Description

engine_set_frame_window

Define frame window to SilverEngine, for purposes of attachment of UI elements

set_qmessage_handler

Define a handler for SilverEngine status messages

 

set_show_error_handler

Define a handler for SilverEngine error messsages

 

set_location_change_handler

Define a handler for SilverEngine WORLDXYZ location change notifications

set_status_change_handler

Define a handler for SilverEngine status changes (e.g. grid, space, snap, etc. changes)

set_tempfile_create_handler

Define a function that is notified when a temporary file is created by SilverEngine

set_tempfile_close_handler

Define a function that is notified when a temporary file is created by SilverEngine

 

 


SilverEngine Shutdown

 

SilverEngine shutdown is accomplished automatically when the SilverEngine DLL is unloaded. Typically this means when the SilverEngine client exits.