<< Click to Display Table of Contents > 

Client Control Interface Manual > Other > Screenshot > Screenshot of entities

Screenshot of entities
Previous pageReturn to chapter overviewNext page

Screenshot of entities

SaveView2DBitmapDPI pixel density

SaveView2DAdjustableDPI position and size

SaveView2DAdjustableDPI drawing width

 

Screenshot of entities

Set

Get

DLL Function

int CCI_Return = ScSetStringValue(int Value_Type, string Screenshot_Path)

ASCII Function

int CCI_Return = ScCciSetStringValue(int Value_Type, string Screenshot_Path)

Description

Make a screenshot of entities.

Value_Type

Type: int

ID:

Location: ScComSAMLightClientCtrlValueTypes

scComSAMLightClientCtrlStringValueTypeSaveView2DAdjustableDPI

12

Screenshot_Path

Type: string

Unit: none

Defines the path, where the screenshot is saved to. The path must include the file extension, which must be ".bmp".

CCI_Return

Type: int

CCI error number, see error list.

Notes

The pixel density of the screenshot must be defined with SaveView2DBitmapDPI

The screenshot contains a defined section of the View2D, defined by SaveView2DBitmapX, SaveView2DBitmapY, SaveView2DBitmapXW and SaveView2DBitmapYW.

The line drawing width can be changed with SaveView2DBitmapMode.

The screenshot is black and white.

This CCI command even works if SAMLight is hidden.

C# Example: Make a screenshot of entities

 

int CCI_Return = cci.ScSetStringValue( ( int )ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlStringValueTypeSaveView2DAdjustableDPI, @"F:\screenshot.bmp" );

Table 358: Screenshot of entities

SaveView2DBitmapDPI

Set

Get

DLL Function

int CCI_Return = ScSetDoubleValue(int Value_Type, double DPI)

double DPI = ScGetDoubleValue(int Value_Type)

ASCII Function

int CCI_Return = ScCciSetDoubleValue(int Value_Type, double DPI)

double DPI = ScCciGetDoubleValue(int Value_Type)

Description

Set or get the pixel resolution for SaveView2DAdjustableDPI, depending on SAM2D or SAM3D.

Value_Type

Type: int

ID:

Location: ScComSAMLightClientCtrlValueTypes

scComSAMLightClientCtrlDoubleValueTypeSaveView2DBitmapDPI

44

DPI

Type: double

Unit: depends on constant

Pixel density [dpi]

CCI_Return

Type: int

CCI error number, see error list.

Notes

-

C# Example: Set screenshot to 96.0 dpi:

 

int CCI_Return = cci.ScSetDoubleValue( ( int )ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlDoubleValueTypeSaveView2DBitmapDPI, 96.0 );

C# Example: Get current screenshot DPI:

 

double Screenshot_DPI = cci.ScGetDoubleValue( ( int )ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlDoubleValueTypeSaveView2DBitmapDPI );

Table 359: SaveView2DBitmapDPI pixel density

SaveView2DAdjustableDPI position and size

Set

Get

DLL Function

int CCI_Return = ScSetDoubleValue(int Value_Type, double Value)

double Value = ScGetDoubleValue(int Value_Type)

ASCII Function

int CCI_Return = ScCciSetDoubleValue(int Value_Type, double Value)

double Value = ScCciGetDoubleValue(int Value_Type)

Description

Set or get position and size of the screenshot taken by SaveView2DAdjustableDPI, depending on SAM2D or SAM3D.

Value_Type

Type: int

ID:

Location: ScComSAMLightClientCtrlValueTypes

scComSAMLightClientCtrlDoubleValueTypeSaveView2DBitmapX

82

X center position [mm].

scComSAMLightClientCtrlDoubleValueTypeSaveView2DBitmapY

83

Y center position [mm].

scComSAMLightClientCtrlDoubleValueTypeSaveView2DBitmapXW

84

Width [mm].

scComSAMLightClientCtrlDoubleValueTypeSaveView2DBitmapYW

85

Height [mm].

Value

Type: double

Unit: depends on constant

The corresponding value.

CCI_Return

Type: int

CCI error number, see error list.

Notes

-

C# Example: Set X center position of the screenshot to 0.0 mm:

 

int CCI_Return = cci.ScSetDoubleValue( ( int )ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlDoubleValueTypeSaveView2DBitmapX, 0.0 );

C# Example: Get X center position of the screenshot:

 

double Screenshot_DPI = cci.ScGetDoubleValue( ( int )ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlDoubleValueTypeSaveView2DBitmapX );

Table 360: SaveView2DAdjustableDPI position and size

SaveView2DAdjustableDPI drawing width

Set

Get

DLL Function

int CCI_Return = ScSetLongValue(int Value_Type, int Drawing_Width)

int Drawing_Width = ScGetLongValue(int Value_Type)

ASCII Function

int CCI_Return = ScCciSetLongValue(int Value_Type, int Drawing_Width)

int Drawing_Width = ScCciGetLongValue(int Value_Type)

Description

Set or get the drawing width of SaveView2DAdjustableDPI.

Value_Type

Type: int

ID:

Location: ScComSAMLightClientCtrlValueTypes

scComSAMLightClientCtrlLongValueTypeSaveView2DBitmapMode

63

Drawing_Width

Type: int

Unit: none

0: lines and pixels are drawn normal

1: lines and pixels are drawn thicker

2: hatch only, lines and pixels are drawn normal

3: hatch only, lines and pixels are drawn thicker

CCI_Return

Type: int

CCI error number, see error list.

Notes

-

C# Example: Set thicker drawing width:

 

int CCI_Return = cci.ScSetLongValue( ( int )ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlLongValueTypeSaveView2DBitmapMode, 1 );

C# Example: Get current drawing width:

 

int Drawing_Width = cci.ScGetLongValue( ( int )ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlLongValueTypeSaveView2DBitmapMode );

Table 361: SaveView2DAdjustableDPI drawing width