SilverScreen Solid Modeler

ICOMMANDs

ICOMMANDs

Previous topic Next topic  

ICOMMANDs

Previous topic Next topic JavaScript is required for the print function  

SilverScreenAPI

 

Interactive Commands

 

Icommands are used less frequently than commands.  But when they are used, they often provide a great convenience for both the user and the developer.  We will give examples in the areas of viewing, rendering and printing.

 

Viewing

 

C / C++ Code

 

 ss_command("icommand swing");

 ss_command("icommand truck");

 ss_command("icommand zoom area");

 

 

Swing allows the user to view the drawing from different angles.  Truck allows the drawing to be panned.   Zoom area allows the user to zoom in on a specific area of the drawing.

 

A developer can choose to write each of these tools "from scratch".  But this takes time.  It is much simpler and easier to use these icommands and let the SilverEngine do the work.

 

Rendering

C / C++ Code

 

 ss_command("icommand property object select-entity");

 

 

When this icommand is executed, the user will be asked to select an object (or a group of objects).  Then, for the selected object, a Properties dialog will appear.  Within this dialog, the user may change edge, surface, texture and rendering properties.  Below are displayed two tabs from this dialog.

 

Texture Properties

 

 

Shading Properties

 

 

C / C++ Code

 

ss_command("icommand light edit");

 

 

This icommand invokes the Light Source Editor.  Here light sources may be created, deleted, and modified.   If continuous rendering mode is in effect, the results of the changes can be immediately seen.

 

Light Source Editor

 

Printing

 

C / C++ Code

 

 ss_command("icommand print setup");

 

 

This icommand will allow the user to setup his printer configuration and paper orientation.  For the developer, the alternative is to write a custom dialog to query the user for this information.

 

Print Setup

 

 

 

C / C++ Code

 

ss_command("icommand page setup");

 

 

This icommand sets up page properties.  Below is the dialog that will appear when this command is executed.   As is evident from the dialog, there is good deal of functionality that is immediately available to both the developer and the user.

 

Page Setup

 

 

C / C++ Code

 

ss_command("icommand print screen");

 

 

This icommand will invoke the SilverScreen Print dialog.  Note that a print preview appears in the dialog, and that Page Setup and Print Setup are both available.

 

Print ...