0% found this document useful (0 votes)
92 views

Client Control Interface

Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
92 views

Client Control Interface

Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 321

Client Control Interface Manual

© 2022 SCAPS GmbH


03.06.2022
Client Control Interface Manual - Contents 2

Table of Contents

1 .........................................................................................................................
Introduction 7

2 .........................................................................................................................
Base Functions 8

3.........................................................................................................................
Application 15

3.1 Async Mode


.............................................................................................................. 22
4.........................................................................................................................
Global Settings 25

4.1 View
.............................................................................................................. 26
4.2 Optic
.............................................................................................................. 28
4.2.1 Min
.......................................................................................................
/ Max ... 36
4.2.2 Advanced
....................................................................................................... 39
4.2.2.1 ................................................................................................
Head Optic Settings 41
4.2.2.2 ................................................................................................
MOTF hardware settings 44
4.3 General
.............................................................................................................. 47
4.4 Remote
.............................................................................................................. 47
4.5 I/O
.............................................................................................................. 48
4.6 Extras
.............................................................................................................. 50
4.7 Splitting
.............................................................................................................. 50
4.8 User level
.............................................................................................................. 52
4.9 sc_setup
.............................................................................................................. 53
5.........................................................................................................................
Pen Settings 56

5.1 Advanced Settings


.............................................................................................................. 63
5.2 Main
.............................................................................................................. 65
5.3 Laser-Specials
.............................................................................................................. 68
5.3.1 IPG
....................................................................................................... 68
5.3.2 SPI
....................................................................................................... 68
5.4 Scanner
.............................................................................................................. 70
5.5 Misc
.............................................................................................................. 72
5.6 Drill
.............................................................................................................. 74
5.7 Ramping
.............................................................................................................. 76
5.8 Path
.............................................................................................................. 78
5.9 Bitmap
.............................................................................................................. 79

© 2022 SCAPS GmbH


Client Control Interface Manual - Contents 3

6.........................................................................................................................
Job 81

6.1 Entity Objects


.............................................................................................................. 90
6.1.1 Geometry
.......................................................................................................
Objects 93
6.1.1.1 ................................................................................................
Spiral 93
6.1.1.2 ................................................................................................
Ellipse 95
6.1.1.3 ................................................................................................
PolyLine 97
6.1.2 Barcode
....................................................................................................... 98
6.1.2.1................................................................................................
Data Matrix 103
6.1.2.2................................................................................................
QR-Code 108
6.1.3.......................................................................................................
Bitmap 109
6.1.4.......................................................................................................
Serial Number 112
6.1.5.......................................................................................................
Date Time 116
6.1.6.......................................................................................................
Text2D 117
6.1.7.......................................................................................................
Control Objects 124
6.2 ..............................................................................................................
Entities Properties 132
6.2.1.......................................................................................................
Entity Naming 136
6.2.2.......................................................................................................
Entity Hierarchy 138
6.2.3.......................................................................................................
Transformations 139
6.2.4.......................................................................................................
Hatch 147
6.2.5.......................................................................................................
Entity Info 159
6.2.6.......................................................................................................
Array Copy 165
6.2.7.......................................................................................................
Bitmap 167
6.3 ..............................................................................................................
Data Wizard 168
7 Direct motion control
......................................................................................................................... 175

7.1 ..............................................................................................................
Direct motion home 175
7.2 ..............................................................................................................
Direct motion move 175
7.3 ..............................................................................................................
Direct motion RS-232 179
7.4 ..............................................................................................................
Direct motion status 180
7.5 ..............................................................................................................
Direct motion stop 181
8 Inputs and Outputs
......................................................................................................................... 181

9 Mark
......................................................................................................................... 190

9.1 ..............................................................................................................
Mark Dialog 193
9.1.1.......................................................................................................
Red Pointer 194
9.2 ..............................................................................................................
Trigger Dialog 195

© 2022 SCAPS GmbH


Client Control Interface Manual - Contents 4

9.3 ..............................................................................................................
Mark Preview 196
9.4 ..............................................................................................................
Mark Sequence 196
9.5 ..............................................................................................................
Mark Time 197
9.6 ..............................................................................................................
Mark Counter 198
10 Splitting
......................................................................................................................... 200

10.1 Angular Splitting


.............................................................................................................. 207
10.2 1D Planar Splitting
.............................................................................................................. 209
10.3 2D Planar Splitting
.............................................................................................................. 211
10.4 Ring Splitting
.............................................................................................................. 213
10.5 1D MOTF Splitting
.............................................................................................................. 214
10.6 Bitmap Rotary Splitting
.............................................................................................................. 217
10.7 Step and Repeat
.............................................................................................................. 218
11 Option Optic3D
......................................................................................................................... 220

11.1 3D Surfaces
.............................................................................................................. 221
12 Option SAM3D
......................................................................................................................... 227

12.1 Specific Commands


.............................................................................................................. 228
13 Other
......................................................................................................................... 241

13.1 Background Camera Image


.............................................................................................................. 241
13.2 External Stop
.............................................................................................................. 242
13.3 Hardware Status
.............................................................................................................. 243
13.4 RS-232
.............................................................................................................. 245
13.5 RTC only commands
.............................................................................................................. 248
13.6 Screenshot
.............................................................................................................. 251
13.6.1
.......................................................................................................
Screenshot of current View2D 251
13.6.2
.......................................................................................................
Screenshot of entities 253
13.7 Scan Head
.............................................................................................................. 255
13.8 sc_corr_table
.............................................................................................................. 260
13.9 View2D
.............................................................................................................. 263
14 List of Commands
......................................................................................................................... 265

14.1 ASCII Commands


.............................................................................................................. 265
14.2 DLL Commands
.............................................................................................................. 267
15 List of Constants
......................................................................................................................... 268

15.1 Double Value Types


.............................................................................................................. 268

© 2022 SCAPS GmbH


Client Control Interface Manual - Contents 5

15.2 Long Value Types


.............................................................................................................. 273
15.3 String Value Types
.............................................................................................................. 279
15.4 Double Data ID
.............................................................................................................. 280
15.5 Long Data ID
.............................................................................................................. 282
15.6 String Data ID
.............................................................................................................. 287
15.7 Cmd ID
.............................................................................................................. 288
16 Implementation
......................................................................................................................... 290

16.1 OCX (ActiveX)


.............................................................................................................. 290
16.2 COM (CCI Ex)
.............................................................................................................. 292
16.3 ASCII (plain text)
.............................................................................................................. 293
16.4 cci.
.............................................................................................................. 294
17 Programming Examples
......................................................................................................................... 295

17.1 Create beam-compensated Copy of Entity


.............................................................................................................. 295
17.2 Create screenshot of SAMLight View2D
.............................................................................................................. 295
17.3 Create Entity
.............................................................................................................. 296
17.3.1
.......................................................................................................
Text2D 296
17.3.2
.......................................................................................................
BarCode 296
17.3.3
.......................................................................................................
SerialNumber 297
17.3.4
.......................................................................................................
Ellipse 297
17.3.5
.......................................................................................................
Rectangle 298
17.3.6
.......................................................................................................
PolyLine 298
17.4 Correct UCF
.............................................................................................................. 299
17.5 Fit to entity
.............................................................................................................. 299
17.6 Get / Set Inputs and Outputs
.............................................................................................................. 300
17.7 Get / Set text properties
.............................................................................................................. 301
17.8 Get Server Status with Mask
.............................................................................................................. 301
17.9 Handle texts
.............................................................................................................. 302
17.10 How to work with Flags
.............................................................................................................. 303
17.11 Mirror Entity on Y Axis
.............................................................................................................. 304
17.12 Motion Control
.............................................................................................................. 305
17.13 Precalculating Marking Time
.............................................................................................................. 306
17.14 Retrieve Entities
.............................................................................................................. 307
17.15 Rotate Output Matrix
.............................................................................................................. 308
17.16 Save Splitted Job as Tiles
.............................................................................................................. 308

© 2022 SCAPS GmbH


Client Control Interface Manual - Contents 6

17.17 Set Array


.............................................................................................................. 309
17.18 Optimize Performance
.............................................................................................................. 310
17.18.1
.......................................................................................................
Example 1 313
17.18.2
.......................................................................................................
Example 2 314
18 Error Codes
......................................................................................................................... 316

19 Deprecated commands
......................................................................................................................... 317

© 2022 SCAPS GmbH


Client Control Interface Manual - Introduction 7

1 Introduction
Welcome to our new client control documentation. In the past, this documentation was part of the SAMLight
manual. As the Client Control Interface (CCI) was growing and growing we decided that a separate manual
with a more user friendly structure and detailed descriptions of the commands including the definition and
explanation of all relevant parameters as well as an easy example for each function was necessary.
If there are any questions or problems related to our documentation, feel free to contact us.

This manual will teach and show you how to remote control SAMLight from another software via a CCI
application. The following chapters specify the main base functions used in combination with their constants
as well as some programming examples and give tips to optimize the performance.

The basic structure of this manual follows the structure in the SAMLight manual. Each chapter of the
SAMLight manual can be found in a similar way here if any relevant commands do exist. The amount of
functions in SAMLight is huge - not all functions are also available in CCI. If there is a command missing in
your opinion, feel free to contact us.

Client Control can be done via one of the following ways (further details in implementation):
· Function calls
o OCX - ActiveX
o COM
· ASCII commands

Regarding the function calls, the OCX (ActiveX) control SCAPS.ScSamlightClientCtrl and the COM (CCI Ex)
control SCAPS.ScSamlightClientCtrlEx are providing function commands to remote control SAMLight from
another software. This allows fast development of automation with different Windows development
environments. OCX and COM can be used with a 32-bit or a 64-bit custom software. In addition CCI can be
used without the OCX or COM encapsulation. In this case, plain ASCII commands are sent via TCP from a
different system which does not need to be a Windows PC.

In total, there are three different options:


1. Remote control SAMLight at the same Windows PC: CCI Function commands (OCX or COM) via
Function Calls.
2. Remote control SAMLight from another Windows PCs: CCI Function commands (OCX or COM) via
TCP.
3. Remote control SAMLight from any system supporting telnet-like network connections: CCI ASCII
commands via TCP.

These three different ways to realize CCI are illustrated and described in further detail in the following
(images always show the connection to a USC card, but CCI of course can also be used together with an
RTC card.):

1. CCI Function Commands (OCX or COM) via Function Calls

· SAMLight can be controlled by a CCI application running on the same PC:


· SAMLight Settings System Remote Function Calls must be enabled.
· The client application can use all Function commands, see DLL Commands.

2.CCI Function commands (OCX or COM) via TCP © 2022 SCAPS GmbH
Client Control Interface Manual - Introduction 8

2 Base Functions
This chapter explains some of the major functions needed to realize a CCI application. These basic
commands can then be used in combination with the CCI constants. For each function, a small example in
C# is given.
The commands given in this chapter are:

· DoubleValue
· EntityDoubleData
· EntityLongData
· EntityStringData
· ExecCommand
· IDStringData
· LongValue
· StringValue

DoubleValue Set
Get
DLL Function int CCI_Return = ScSetDoubleValue(int Value_Type, double Parameter)
double Parameter = ScGetDoubleValue(int Value_Type)
ASCII Function int CCI_Return = ScCciSetDoubleValue(int Value_Type, double Parameter)
double Parameter = ScCciGetDoubleValue(int Value_Type)
Description This is the definition of the base function to use Double Value Types. The function
needs two arguments: Value_Type and Parameter. The available Value_Types are
listed at List of Constants Double Value Types.
Value_Type Type: int
Location: ScComSAMLightClientCtrlValueTypes
See available Double Value Types.
Parameter Type: double Unit: depends on constant
Further details are given in Double Value Types.
CCI_Return Type: int
CCI return number, see error list.
Notes -
C# Example: How to use DoubleValue Types:

// Set maximum mark speed to 200.0 mm/s


int CCI_Return = cci.ScSetDoubleValue( ( int )
ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlDoubleValueTypeMaxMarkSpeed, 200.0 );

// Get maximum mark speed


double Max_Mark_Speed = cci.ScGetDoubleValue( ( int )
ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlDoubleValueTypeMaxMarkSpeed );
Table 1: DoubleValue

© 2022 SCAPS GmbH


Client Control Interface Manual - Base Functions 9

EntityDoubleData Set
Get
DLL Function int CCI_Return = ScSetEntityDoubleData(string Entity_Name, int Data_ID, double Parameter)
int CCI_Return = ScGetEntityDoubleData(string Entity_Name, int Data_ID, ref double Parameter)
ASCII Function int CCI_Return = ScCciSetEntityDoubleData(string Entity_Name, int Data_ID, double Parameter)
double Parameter = ScCciGetEntityDoubleData(string Entity_Name, int Data_ID)
Description This is the definition of the base function to use Entity Double Data IDs. The function
needs two/three arguments: Entity_Name, Data_ID and Parameter. Sometimes the
function returns the parameter or the parameter has to be initialized before. The
available Data_IDs are listed at List of Constants Double Data IDs.
Entity_Name Type: string Unit: none
Specify the entity based on the name.
Data_ID Type: int
Location: ScComSAMLightClientCtrlFlags
See available Double Data IDs.
Data_ID can be combined with:
· scComSAMLightClientCtrlDoubleDataIdFlagDontUpdateView 0x10000 (set only)
The view will not be updated to increase the performance.
· scComSAMLightClientCtrlDoubleDataIdFlagDontUpdateEntity 0x20000 (set only)
The vectors will not be updated to increase the performance.
· scComSAMLightClientCtrlDoubleDataIdFlagToplevelOnly 0x40000
Only entities in the top level of the job will be considered to increase the
performance.
Parameter Type: double Unit: none
Set or get the required data. Further details are given in the Double Data IDs.
CCI_Return Type: int
CCI return number, see error list.
Notes · Set function also available for SAM3D. No get function.
C# Example: How to use EntityDoubleDataIDs:

// Set line spacing value to 200%


int CCI_Return_01 = cci.ScSetEntityDoubleData( "Text_Entity", ( int )
ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlDoubleDataIdTextLineSpacing, 200.0 );

// Get line spacing value


double Text_Line_Spacing = 0.0;
int CCI_Return_02 = cci.ScGetEntityDoubleData( "Text_Entity", ( int )
ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlDoubleDataIdTextLineSpacing, ref Text_Line_Spacing );
Table 2: EntityDoubleData

© 2022 SCAPS GmbH


Client Control Interface Manual - Base Functions 10

EntityLongData Set
Get
DLL Function int CCI_Return = ScSetEntityLongData(string Entity_Name, int Data_ID, int Parameter)
int Parameter = ScGetEntityLongData(string Entity_Name, int Data_ID)
ASCII Function int CCI_Return = ScCciSetEntityLongData(string Entity_Name, int Data_ID, int Parameter)
int Parameter = ScCciGetEntityLongData(string Entity_Name, int Data_ID)
Description This is the definition of the base function to use Entity Long Data IDs. The function
needs two/three arguments: Entity_Name, Data_ID and Parameter. Sometimes the
function returns the parameter or the parameter has to be initialized before. The
available Data_IDs are listed at List of Constants Long Data IDs.
Entity_Name Type: string Unit: none
Specify the entity based on the name.
Data_ID Type: int
Location: ScComSAMLightClientCtrlFlags
See available Long Data IDs.
Data_ID can be combined with following ScComSAMLightClientCtrlFlags:
· scComSAMLightClientCtrlLongDataIdFlagDontUpdateView 0x10000 (set only)
The view will not be updated to increase the performance.
· scComSAMLightClientCtrlLongDataIdFlagDontUpdateEntity 0x20000 (set only)
The vectors will not be updated to increase the performance.
Parameter Type: int Unit: none
See available Long Data IDs.
CCI_Return Type: int
CCI return number, see error list.
Notes -
C# Example: How to use EntityLongDataIDs:

// Set current setting for text alignment line center


int CCI_Return = cci.ScSetEntityLongData( "Text_Entity", ( int )
ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlLongDataIdTextAlignment, 1024 );

// Get current setting for text alignment line center


int Text_Alignment = cci.ScGetEntityLongData( "Text_Entity", ( int )
ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlLongDataIdTextAlignment );
Table 3: EntityLongData

© 2022 SCAPS GmbH


Client Control Interface Manual - Base Functions 11

EntityStringData Set
Get
DLL Function int CCI_Return = ScSetEntityStringData(string Entity_Name, int Data_ID, string Parameter)
int CCI_Return = ScGetEntityStringData(string Entity_Name, int Data_ID, ref string Parameter)
ASCII Function int CCI_Return = ScCciSetEntityStringData(string Entity_Name, int Data_ID, string Parameter)
string Parameter = ScCciGetEntityStringData(string Entity_Name, int Data_ID)
Description Set or get specific string data of an entity Entity_Name depending on the Data_ID.
Entity_Name Type: string Unit: none
Specify the entity based on the name.
Data_ID Type: int
Location: ScComSAMLightClientCtrlFlags
See available Entity String Data IDs.
Data_ID can be combined with following ScComSAMLightClientCtrlFlags:
· scComSAMLightClientCtrlStringDataIdFlagDontUpdateView 0x10000 (set only)
The view will not be updated to increase the performance.
· scComSAMLightClientCtrlStringDataIdFlagDontUpdateEntity 0x20000 (set only)
The vectors will not be updated to increase the performance.
· scComSAMLightClientCtrlStringDataIdFlagToplevelOnly 0x200000
Only entities in the top level of the job will be considered to increase the
performance.
Parameter Type: string Unit: none
The corresponding value.
CCI_Return Type: int
CCI return number, see error list.
Notes -
C# Example: How to use Entity String Data IDs

// Set content of text entity


int CCI_Return_01 = cci.ScSetEntityStringData( "Text_Entity", ( int )
ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlStringDataIdTextText, "Test" );

// Get content of text entity


string Entity_Text = "";
int CCI_Return_02 = cci.ScGetEntityStringData( "Text_Entity", ( int )
ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlStringDataIdTextText, ref Entity_Text );
Table 4: EntityStringData

© 2022 SCAPS GmbH


Client Control Interface Manual - Base Functions 12

Exec Command Set


Get
DLL Function int CCI_Return = ScExecCommand(int Cmd_ID)

ASCII Function int CCI_Return = ScCciExecCommand(int Cmd_ID)

Description This is the definition of the base function to use Excec Commands. Only the Cmd_ID
has to be given. The available Cmd_IDs are listed at List of Constants Cmd ID.
Cmd_ID Type: int
Location: ScComSAMLightClientCtrlExecCommandConstants
See available Cmd IDs.
CCI_Return Type: int
CCI return number, see error list.
Notes -
C# Example: How to use Exec Commands:

// Create new job


int CCI_Return = cci.ScExecCommand( ( int )
ScComSAMLightClientCtrlExecCommandConstants.scComSAMLightClientCtrlExecCommandNewJob );
Table 5: ExecCommand

© 2022 SCAPS GmbH


Client Control Interface Manual - Base Functions 13

IDStringData Set
Get
DLL Function int CCI_Return = ScSetIDStringData(int Data_ID, int Index, string Parameter)
int CCI_Return = ScGetIDStringData(int Data_ID, int Index, ref string Parameter)
ASCII Function int CCI_Return = ScCciSetIDStringData(int Data_ID, int Index, string Parameter)
string Parameter = ScCciGetIDStringData(int Data_ID, int Index)
Description Set or get specific string data of an entity by Index depending on the Data_ID.
Data_ID Type: int
Location: ScComSAMLightClientCtrlValueTypes
See available ID String Data IDs.
Index Type: int Unit: none
0 based entity index of current job.
Index can be combined with following ScComSAMLightClientCtrlFlags:
· scComSAMLightClientCtrlStringDataIdFlagDontUpdateView 0x10000 (set only)
The view will not be updated to increase the performance.
· scComSAMLightClientCtrlStringDataIdFlagDontUpdateEntity 0x20000 (set only)
The vectors will not be updated to increase the performance.
· scComSAMLightClientCtrlStringDataIdFlagToplevelOnly 0x200000
Only entities in the top level of the job will be considered to increase the
performance.
Parameter Type: string Unit: none
The corresponding value.
CCI_Return Type: int
CCI return number, see error list.
Notes -
C# Example: How to use ID String Data IDs

int Top_Level_Entity_Num = cci.ScGetLongValue( ( int )


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlLongValueTypeTopLevelEntityNum );

for( int i = 0; i < Top_Level_Entity_Num; i++ )


{
// Set entity name by index
int CCI_Return_01 = cci.ScSetIDStringData( ( int )
ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlStringDataIdSetEntityName, i | ( int )
ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlStringDataIdFlagToplevelOnly, "Entity_" +
Convert.ToString(i) );

// Get entity name by index


string Entity_Name = "";
int CCI_Return_02 = cci.ScGetIDStringData( ( int )
ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlStringDataIdGetEntityName, i | ( int )
ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlStringDataIdFlagToplevelOnly, ref Entity_Name );
}
Table 6: IDStringData

© 2022 SCAPS GmbH


Client Control Interface Manual - Base Functions 14

LongValue Set
Get
DLL Function int CCI_Return = ScSetLongValue(int Value_Type, int Parameter)
int Parameter = ScGetLongValue(int Value_Type)
ASCII Function int CCI_Return = ScCciSetLongValue(int Value_Type, int Parameter)
int Parameter = ScCciGetLongValue(int Value_Type)
Description This is the definition of the base function to use Long Value Types. The function
needs two arguments: Value_Type and Parameter. The available Value_Types are
listed at List of Constants Long Value Types.
Value_Type Type: int
Location: ScComSAMLightClientCtrlValueTypes
See available Long Value Types.
Parameter Type: int Unit: depends on constant
Further details are given in Long Value Types.
CCI_Return Type: int
CCI return number, see error list.
Notes -
C# Example: How to use Long Value Types

// Set job execution delay to 100 ms


int CCI_Return = cci.ScSetLongValue( ( int )
ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlLongValueTypeJobExecutionDelay, 100 );

// Get job execution delay


double Job_Execution_Delay = cci.ScGetLongValue( ( int )
ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlLongValueTypeJobExecutionDelay );
Table 7: LongValue

© 2022 SCAPS GmbH


Client Control Interface Manual - Base Functions 15

StringValue Set
Get
DLL Function int CCI_Return = ScSetStringValue(int Value_Type, string Parameter)
int CCI_Return = ScGetStringValue(int Value_Type, ref string Parameter)
ASCII Function int CCI_Return = ScCciSetStringValue(int Value_Type, string Parameter)
string Parameter = ScCciGetStringValue(int Value_Type)
Description This is the definition of the base function to use String Value Types. The function
needs two arguments: Value_Type and Parameter. The available Value_Types are
listed at List of Constants String Value Types.
Value_Type Type: int
Location: ScComSAMLightClientCtrlValueTypes
See available String Value Type.
Parameter Type: string Unit: none
See available String Value Types.
CCI_Return Type: int
CCI return number, see error list.
Notes -
C# Example: How to use String Value Types

// Set name of current pen


int CCI_Return = cci.ScSetStringValue( ( int )
ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlStringValueTypeCurrentPenName, "Test Pen" );

// Get current pen name


string pen_name = "";
int CCI_Return = cci.ScGetStringValue( ( int )
ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlStringValueTypeCurrentPenName, ref pen_name );
Table 8: StringValue

3 Application
The following commands can be used to check the global state of the system. There is a subchapter for:

· Async Mode

The following commands are described in this chapter:

· Change View2D
· Check Communication
· Connection Status
· Entity List/Property Sheet
· Extended Error Mode
· Mode
· SAMLight ShutDown
· SAMLight Status
· SAMLight Window
· Simulation Mode
· Update View2D
· Write Trail

© 2022 SCAPS GmbH


Client Control Interface Manual - Application 16

Change View2D Set


Get
DLL Function int CCI_Return = ScExecCommand(int Cmd_ID)

ASCII Function int CCI_Return = ScCciExecCommand(int Cmd_ID)

Description Change the position and zoom level of the View2D.


Cmd_ID Type: int ID:
Location: ScComSAMLightClientCtrlExecCommandConstants
scComSAMLightClientCtrlExecCommandFitViewToWorkingArea 4
Fit the view to the working area.
scComSAMLightClientCtrlExecCommandFitViewToAllEntities 5
Fit the view to all entities.
scComSAMLightClientCtrlExecCommandFitViewToSelectedEntities 6
Fit the view only to selected entities.
CCI_Return Type: int
CCI return number, see error list.
Notes -
C# Example: Fit the view to the working area:

int CCI_Return = cci.ScExecCommand( ( int )


ScComSAMLightClientCtrlExecCommandConstants.scComSAMLightClientCtrlExecCommandFitViewToWorkingArea );
Table 9: Change View2D

Check Communication Set


Get
DLL Function int CCI_Return = ScExecCommand(int Cmd_ID)

ASCII Function int CCI_Return = ScCciExecCommand(int Cmd_ID)

Description SAMLight pops up a test message box to check the communication between the CCI
application and SAMLight.
Cmd_ID Type: int ID:
Location: ScComSAMLightClientCtrlExecCommandConstants
scComSAMLightClientCtrlExecCommandTest 1
CCI_Return Type: int
CCI return number, see error list.
Notes · The message box that has to be closed manually.
· The command returns after the message box is closed.
C# Example: Check communication:
int CCI_Return = cci.ScExecCommand( ( int )
ScComSAMLightClientCtrlExecCommandConstants.scComSAMLightClientCtrlExecCommandTest );
Table 10: Check Communication

© 2022 SCAPS GmbH


Client Control Interface Manual - Application 17

Connection Status Set


Get
DLL Function -

ASCII Function int CCI_Return = ScCciTest(string Message)

Description SAMLight pops up a cci test message box to check the communication between the
CCI application and SAMLight.
Message Type: string Unit: none
This string will be part of the message in the message box.
CCI_Return Type: int
CCI return number, see error list.
Notes · The command returns immediately.
· The message box that has to be closed manually.
ASCII Example: Send a test message to SAMLight:

ScCciTest("Test message.")<LF>
Table 11: Connection Status

Entity List / Property Sheet Set


Get
DLL Function int CCI_Return = ScSetLongValue(int Value_Type, int Value)
int Value = ScGetLongValue(int Value_Type)
ASCII Function int CCI_Return = ScCciSetLongValue(int Value_Type, int Value)
int Value = ScCciGetLongValue(int Value_Type)
Description Set or get the status of the entity list or property sheet in SAMLight.
Value_Type Type: int ID:
Location: ScComSAMLightClientCtrlValueTypes
scComSAMLightClientCtrlLongValueTypeShowEntityList 99
Hide or show the Entity List.
scComSAMLightClientCtrlLongValueTypeShowPropSheet 100
Hide or show the Property Sheet.
Value Type: int Unit: none
· 0: hide
· 1: show
CCI_Return Type: int
CCI return number, see error list.
Notes -
C# Example: Show entity list:

int CCI_Return = cci.ScSetLongValue( ( int )


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlLongValueTypeShowEntityList, 1 );
C# Example: Check if entity list is shown:

int Entity_List_Status = cci.ScGetLongValue( ( int )


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlLongValueTypeShowEntityList );
Table 12: Entity List / Property Sheet

© 2022 SCAPS GmbH


Client Control Interface Manual - Application 18

Extended Error Mode Set


Get
DLL Function int CCI_Return = ScSetLongValue(int Value_Type, int Mode)
int Mode = ScGetLongValue(int Value_Type)
ASCII Function -

Description Activates the extended error mode.


Value_Type Type: int ID:
Location: ScComSAMLightClientCtrlValueTypes
scComSAMLightClientCtrlLongValueTypeNewCciErrorReturn 105
Mode Type: int Unit: none
· 0: Disable extended error mode.
· 1: Enable extended error mode.
CCI_Return Type: int
CCI return number, see error list.
Notes · This only works for OCX and not for ASCII or COM.
C# Example: Enable the extended error mode:

int CCI_Return = cci.ScSetLongValue( ( int )


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlLongValueTypeNewCciErrorReturn, 1 );
C# Example: Check the state of the extended error mode:

int Extended_Error_Mode = cci.ScGetLongValue( ( int )


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlLongValueTypeNewCciErrorReturn );
Table 13: Extended Error Mode

© 2022 SCAPS GmbH


Client Control Interface Manual - Application 19

Mode Set
Get
DLL Function int CCI_Return = ScSetMode(int Mode)
int CCI_Return = ScGetMode(ref int Mode)
ASCII Function int CCI_Return = ScCciSetMode(int Mode)
int Mode = ScCciGetMode()
Description Set or get global SAMLight parameters by combining following flags.
Mode Type: int Flag:
Location: ScComSAMLightClientCtrlFlags
scComSAMLightClientCtrlModeFlagTopLevelOnly 0x1
The next calls only search for objects in the top level of the job. This can be helpful
to increase the performance.
scComSAMLightClientCtrlModeFlagDontUpdateView 0x2
Suppress drawing of entities in the view or in the entity list. This can be helpful to
increase the performance.
scComSAMLightClientCtrlModeFlagDisableFileCompression 0x10
Checks the check box Disable file compression in Settings System General.
scComSAMLightClientCtrlModeFlagEntityNamesSeparatedBySemicolon 0x20
The parameter Entity_Name in ScMarkEntityByName and others can include more
than one entity name. They have to be separated by a semicolon. If the client control
is used via a TCP connection then the maximum length of the parameter
Entity_Name is 512 characters (511 + an ending zero).
scComSAMLightClientCtrlModeFlagDisableUndo 0x4000
Checks the checkbox Disable Undo in Settings System General, which
disables Undo function.
scComSAMLightClientCtrlModeFlagArrayCopyAdapt 0x8000
ArrayCopy of a serial number results in an array of serial numbers where the copies
are enumerated from the number of the original one up to n. If not checked all copies
will get the same number as the original one.
scComSAMLightClientCtrlModeFlagArrayCopyAssociate 0x10000
This function is useful for creating multiple serial numbers with a complex sequence.
If checked the ArrayCopy of two and more different serial numbers results in one
serial so that no serial number gets repeated. This check button is only enabled if
Adapt is selected and association is possible. Creating one serial after an array copy
is only possible if the actual values of the current serial differ in a constant step.
CCI_Return Type: int
CCI return number, see error list.
Notes · To prevent incorrect operation please read chapter How to work with flags
· For more information about Performance optimization under usage of these flags,
please refer to Optimize Performance chapter.
C# Example: Enable Don't Update View and don't change all other flags:

int Mode = 0;
int CCI_Return_01 = cci.ScGetMode( ref Mode );
Mode = Mode | ( int )ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlModeFlagDontUpdateView;
int CCI_Return_02 = cci.ScSetMode( Mode );
C# Example: Disable Don't Update View and don't change all other flags:

int Mode = 0;
int CCI_Return_01 = cci.ScGetMode( ref Mode );
Mode = Mode & ~( int )ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlModeFlagDontUpdateView;
int CCI_Return_02 = cci.ScSetMode( Mode );

© 2022 SCAPS GmbH


Client Control Interface Manual - Application 20

Table 14: Mode

SAMLight ShutDown Set


Get
DLL Function int CCI_Return = ScShutDown()

ASCII Function int CCI_Return = ScCciShutDown()

Description Terminates SAMLight.


CCI_Return Type: int
CCI return number, see error list.
Notes · After that no further commands should be given.
C# Example: Shut down SAMLight:

int CCI_Return = cci.ScShutDown();


Table 15: SAMLight ShutDown

SAMLight Status Set


Get
DLL Function int Is_Running = ScIsRunning()

ASCII Function -

Description Can be used for checking whether the scanner application software is running or not.
Is_Running Type: int Unit: none
· 0: SAMLight doesn't run or is not found.
· 1: SAMLight runs.
Notes · If this function returns 0, it makes no sense to use any other CCI commands.
C# Example: Check SAMLight status:

int Is_Running = cci.ScIsRunning();


Table 16: SAMLight Status

SAMLight Window Set


Get
DLL Function int CCI_Return = ScShowApp(int Window_Properties)

ASCII Function int CCI_Return = ScCciShowApp(int Window_Properties)

Description Set SAMLight into one of the common show states of Windows.
Window_Properties Type: int Unit: none
· 0: Hide SAMLight.
· 2: Minimize SAMLight.
· 3: Maximize SAMLight.
· 5: Show SAMLight and display it in its current size and position.
· 9: Show SAMLight and restore its original size and position, if it is minimized or
maximized.
CCI_Return Type: int
CCI return number, see error list.
Notes · You can set only one index simultaneously.
C# Example: Hide the SAMLight window:

int CCI_Return = cci.ScShowApp( 0 );


Table 17: SAMLight Window

© 2022 SCAPS GmbH


Client Control Interface Manual - Application 21

Simulation Mode Set


Get
DLL Function int CCI_Return = ScSetLongValue(int Value_Type, int Mode)
int Mode = ScGetLongValue(int Value_Type)
ASCII Function int CCI_Return = ScCciSetLongValue(int Value_Type, int Mode)
int Mode = ScCciGetLongValue(int Value_Type)
Description Set or get the status of the SAMLight simulation mode.
Value_Type Type: int ID:
Location: ScComSAMLightClientCtrlValueTypes
scComSAMLightClientCtrlLongValueTypeDisableSimulationMode 109
Mode Type: int Unit: none
· 0: Simulation mode
· 1: Normal mode
CCI_Return Type: int
CCI return number, see error list.
Notes -
C# Example: Enable simulation mode:

int CCI_Return = cci.ScSetLongValue( ( int )


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlLongValueTypeDisableSimulationMode, 0 );
C# Example: Check state of simulation mode:

int Mode = cci.ScGetLongValue( ( int )


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlLongValueTypeDisableSimulationMode );
Table 18: Simulation Mode

Update View2D Set


Get
DLL Function int CCI_Return = ScExecCommand(int Cmd_ID)

ASCII Function int CCI_Return = ScCciExecCommand(int Cmd_ID)

Description Update the View2D now.


Cmd_ID Type: int ID:
Location: ScComSAMLightClientCtrlExecCommandConstants
scComSAMLightClientCtrlExecCommandUpdateViewNow 22
CCI_Return Type: int
CCI return number, see error list.
Notes -
C# Example: Update the View2D:

int CCI_Return = cci.ScExecCommand( ( int )


ScComSAMLightClientCtrlExecCommandConstants.scComSAMLightClientCtrlExecCommandUpdateViewNow );
Table 19: Update View2D

© 2022 SCAPS GmbH


Client Control Interface Manual - Application 22

Write Trail Set


Get
DLL Function int CCI_Return = ScSetStringValue(int Value_Type, string Text)

ASCII Function int CCI_Return = ScCciSetStringValue(int Value_Type, string Text)

Description Set a entry in the Sam2DThreadsafeDebugWrite.txt if activated.


Value_Type Type: int
Location: ScComSAMLightClientCtrlValueTypes
scComSAMLightClientCtrlStringValueTypeTrail 31
Text Type: string Unit: none
Write the wanted text.
CCI_Return Type: int
CCI return number, see error list.
Notes -
C# Example: Write trail entry:

int CCI_Return = cci.ScSetStringValue( ( int )


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlStringValueTypeTrail, "Test" );
Table 20: Write Trail

3.1 Async Mode


The async mode allows the CCI thread of the CCI program to continue without waiting for return values of
SAMLight. It does not allow a parallelization of CCI commands, the commands still have to be sent
sequentially. A better alternative to the async mode is if the CCI program has several threads and the CCI
part takes place in its own thread.

Async Mode Enable Set


Get
DLL Function int CCI_Return = ScSetLongValue(int Value_Type, int Parameter)
int Parameter = ScGetLongValue(int Value_Type)
ASCII Function int CCI_Return = ScCciSetLongValue(int Value_Type, int Parameter)
int Parameter = ScCciGetLongValue(int Value_Type)
Description Set or get the status of async mode.
Value_Type Type: int ID:
Location: ScComSAMLightClientCtrlValueTypes
scComSAMLightClientCtrlLongValueTypeClientCtrlAsyncMode 28
Parameter Type: int Unit: none
· 0: Async mode disabled.
· 1: Async mode enabled.
CCI_Return Type: int
CCI return number, see error list.
Notes · Async supported commands are listed in DoubleValue Async, LongValue Async
and StringValue Async.
C# Example: Enable async mode:

int CCI_Return = cci.ScSetLongValue( ( int )


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlLongValueTypeClientCtrlAsyncMode, 1 );
Table 21: Async Mode Enable

© 2022 SCAPS GmbH


Client Control Interface Manual - Application 23

Async Status Set


Get
DLL Function int Parameter = ScGetLongValue(int Value_Type)

ASCII Function int Parameter = ScCciGetLongValue(int Value_Type)

Description Check if prior async CCI command is completed.


Value_Type Type: int ID:
Location: ScComSAMLightClientCtrlValueTypes
scComSAMLightClientCtrlLongValueTypeClientCtrlAsyncModeIsRunni 29
ng
Parameter Type: int Unit: none
· 0: Async cci command is completed.
· 1: Async cci command is executing.
CCI_Return Type: int
CCI return number, see error list.
Notes · Async mode must be enabled.
· Async supported commands are listed in DoubleValue Async, LongValue Async
and StringValue Async.
C# Example: Check if async CCI command is executing:

int Aync_Command_Is_Running = cci.ScGetLongValue( ( int )


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlLongValueTypeClientCtrlAsyncModeIsRunning );
Table 22: Async Status

DoubleValue Async Set


Get
DLL Function double Parameter = ScGetDoubleValue(int Value_Type)

ASCII Function double Parameter = ScCciGetDoubleValue(int Value_Type)

Description Get double value of async CCI command. Supported commands:


· ScGetEntityOutline
Value_Type Type: int ID:
Location: ScComSAMLightClientCtrlValueTypes
scComSAMLightClientCtrlDoubleValueTypeAsyncModeResult 63
Parameter Type: double Unit: depends on async cci command
Double value.
Notes · Async mode must be enabled.
C# Example: Async ScGetEntityOutline:

// With enabled async mode the CCI commmand returns immediately without returning an answer.
double dummy = cci.ScGetEntityOutline( "Circle", 0 );
do
{
// Your operations while async CCI command executes.
}
// Check if cci command is completed.
while( cci.ScGetLongValue( ( int )
ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlLongValueTypeClientCtrlAsyncModeIsRunning ) !=
0 );
// Get the return double value of async CCI command.
double Entity_Outline = cci.ScGetDoubleValue( ( int )
ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlDoubleValueTypeAsyncModeResult );
Table 23: DoubleValue Async

© 2022 SCAPS GmbH


Client Control Interface Manual - Application 24

LongValue Async Set


Get
DLL Function int CCI_Return = ScGetLongValue(int Value_Type)

ASCII Function int CCI_Return = ScCciGetLongValue(int Value_Type)

Description Get CCI return of async CCI command. Supported commands:


· ScExecCommand
· ScImport
· ScLoadJob
· ScMarkEntityByName
· ScRotateEntity
· ScScaleEntity
· ScTranslateEntity
Value_Type Type: int ID:
Location: ScComSAMLightClientCtrlValueTypes
scComSAMLightClientCtrlLongValueTypeClientCtrlAsyncModeResult 30
CCI_Return Type: int
CCI return number, see error list.
Notes · Async mode must be enabled.
C# Example: Async ScExecCommand:

// With enabled async mode the CCI commmand returns immediately without returning an answer.
int dummy = cci.ScExecCommand( ( int )
ScComSAMLightClientCtrlExecCommandConstants.scComSAMLightClientCtrlExecCommandNewJob );
do
{
// Your operations while async CCI command executes.
}
// Check if cci command is completed.
while( cci.ScGetLongValue( ( int )
ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlLongValueTypeClientCtrlAsyncModeIsRunning ) !=
0 );
// Get the integer cci return of async CCI command.
int CCI_Return = cci.ScGetLongValue( ( int )
ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlLongValueTypeClientCtrlAsyncModeResult );
Table 24: LongValue Async

© 2022 SCAPS GmbH


Client Control Interface Manual - Application 25

StringValue Async Set


Get
DLL Function int CCI_Return = ScGetStringValue(int Value_Type, ref string Parameter)

ASCII Function string Parameter = ScCciGetStringValue(int Value_Type)

Description Get string value of async CCI command. Supported commands:


· ScGetStringValue
Value_Type Type: int ID:
Location: ScComSAMLightClientCtrlValueTypes
scComSAMLightClientCtrlLongValueTypeClientCtrlAsyncModeResult 18
Parameter Type: string Unit: none
String value.
CCI_Return Type: int
CCI return number, see error list.
Notes · Async mode must be enabled.
C# Example: Async ScGetStringValue:

string dummy_01 = "";


// With enabled async mode the CCI commmand returns immediately without returning an answer.
int dummy_02 = cci.ScGetStringValue( ( int )
ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlStringValueTypeCorrectionFile, ref dummy_01 );
do
{
// Your operations while async CCI command executes.
}
// Check if cci command is completed.
while( cci.ScGetLongValue( ( int )
ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlLongValueTypeClientCtrlAsyncModeIsRunning ) !=
0 );
// Get the return string of async CCI command.
string Corr_File = "";
int CCI_Return = cci.ScGetStringValue( ( int )
ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlStringValueTypeAsyncModeResult, ref Corr_File );
Table 25: StringValue Async

4 Global Settings
The following chapter will guide you through the commands used to set up the main parameters and global
settings. In SAMLight this functions can be found at Settings System. The main structure follows the
structure of SAMLight. In total there are more tabs at Settings System than subchapters. Not all options
in SAMLight are also implemented in CCI, meaning that if one tab is not listed as subchapter here, then we
do not have any commands for this tab. Even not all functions of SAMLight are also available in CCI. There
is an additional subsection sc_setup, which was located here.

· View
· Optic
· General
· Remote
· I/O
· Extras
· Splitting
· User Level
· sc_setup

© 2022 SCAPS GmbH


Client Control Interface Manual - Global Settings 26

4.1 View
This subchapter refers in SAMLight to Settings System View to change the Toolbar settings.

© 2022 SCAPS GmbH


Client Control Interface Manual - Global Settings 27

Toolbar Settings Set


Get
DLL Function int CCI_Return = ScSetLongValue(int Value_Type, int Flag)
int Flag = ScGetLongValue(int Value_Type)
ASCII Function int CCI_Return = ScCciSetLongValue(int Value_Type, int Flag)
int Flag = ScCciGetLongValue(int Value_Type)
Description This function can be used to set or get the current state of the SAMLight toolbars.
Value_Type Type: int ID:
Location: ScComSAMLightClientCtrlValueTypes
scComSAMLightClientCtrlLongValueTypeShowToolBars 103
Flag Type: int Flag:
Location: None
SC_SHOW_TOOLBAR_MAIN 0x1
The main toolbar includes such functions, as Open File, Save Job, undo, redo and
so on. It corresponds to the file toolbar in the toolbar settings.
SC_SHOW_TOOLBAR_CAMERA 0x2
Background camera toolbar.
SC_SHOW_TOOLBAR_VIEW_LEVEL 0x4
View level toolbar provides two arrow buttons for increasing or decreasing the
view level of the entity list.
SC_SHOW_TOOLBAR_FUNC_OBJECTS 0x8
The functionality objects toolbar includes timer, wait for trigger and other control
objects, some entity objects such as date time or serial number and data wizard and
parameter finder.
SC_SHOW_TOOLBAR_ALIGN 0x10
Align toolbar containing object alignment settings.
SC_SHOW_TOOLBAR_GEOM_OBJECTS 0x20
Geometry objects toolbar.
SC_SHOW_TOOLBAR_EXTRAS 0x40
Extras toolbar, containing the splitting, step/repeat and bitmap splitting settings.
SC_SHOW_TOOLBAR_STEPPER 0x80
Stepper position toolbar.
SC_SHOW_TOOLBAR_SURFACE 0x100
3D surfaces toolbar. This toolbar is available only if the option Optic3D license is
present.
SC_SHOW_TOOLBAR_ANALOG_IN 0x200
Analog In toolbar. Only available if USC-2/-3 is used.
CCI_Return Type: int
CCI return number, see error list.
Notes · The flags can be combined by using logical operators. Please refer to the chapter
How to work with Flags for more information.
C# Example: Activate camera toolbars:

int CCI_Return = cci.ScSetLongValue((int)


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlLongValueTypeShowToolBars, 0x2);
C# Example: Check camera toolbar state:

int Toolbar_State = cci.ScGetLongValue((int)


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlLongValueTypeShowToolBars);

© 2022 SCAPS GmbH


Client Control Interface Manual - Global Settings 28

Table 26: Toolbar Settings

4.2 Optic
The following parameters can be found in SAMLight at Settings System Optic. It could be that not all
parameters or options are given here. This subchapter lists all available options for this dialog. Here you can
go deeper into detail at the following buttons, which contain further options:

· Min / Max
· Advanced

The following parameters can be set in optic:


· Correction File
· Field Size
· Field Size and Working Area
· Gain
· Home Position
· Offset
· Optic Axis State
· Optic Rotation
· Red Pointer Parameters

Correction File Set


Get
DLL Function int CCI_Return = ScSetStringValue(int Value_Type, string Path)
int CCI_Return = ScGetStringValue(int Value_Type, ref string Path)
ASCII Function int CCI_Return = ScCciSetStringValue(int Value_Type, string Path)
string Path = ScCciGetStringValue(int Value_Type)
Description Set or get the path of the required correction file.
Value_Type Type: int ID:
Location: ScComSAMLightClientCtrlValueTypes
scComSAMLightClientCtrlStringValueTypeCorrectionFile 13
Set a new correction file or get the path of the current correction file.
scComSAMLightClientCtrlStringValueTypeCorrectionFileHead2 23
Set a new correction file or get the path of the current correction file on Head 2.
scComSAMLightClientCtrlStringValueTypeCorrectionFileLcf 29
Using this constant a new correction file can be set or the current path of the
correction file can be get. If a *.lcf file exists with the same name and in the same
folder as the *.ucf file the lens parameters will be applied as well. If more than one
scanhead is to be operated, the head number has to be specified with ScSetHead
first. It is not possible to call this constant during marking.
scComSAMLightClientCtrlStringValueTypeCorrectionFileLcfLensInit 30
Using this constant a new correction file can be set or the current path of the
correction file can be get. If a *.lcf file exists with the same name and in the same
folder as the *.ucf file the lens parameters will be applied as well. If a *.sjf file exists
with the same name and in the same folder as the *.ucf file the Lens Init Job will be
executed as well. If more than one scanhead is to be operated, the head number
has to be specified with ScSetHead first. It is not possible to call this constant during
marking.
Path Type: string Unit: none
The directory path of the correction file.

© 2022 SCAPS GmbH


Client Control Interface Manual - Global Settings 29

Correction File Set


Get
CCI_Return Type: int
CCI error number, see error list.
Notes -
C# Example: Set correction file:

int CCI_Return = cci.ScSetStringValue((int)


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlStringValueTypeCorrectionFile, "C:\
\correctionfile.ucf");
C# Example: Get path of correction file:

string Corr_File = "";


int CCI_Return = cci.ScGetStringValue((int)
ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlStringValueTypeCorrectionFile, ref Corr_File);
Table 27: Correction File

Field Size Set


Get
DLL Function double Parameter = ScGetDoubleValue(int Value_Type)

ASCII Function double Parameter = ScGetDoubleValue(int Value_Type)

Description Get the field size in sc_setup.exe.


Value_Type Type: int ID:
Location: ScComSAMLightClientCtrlValueTypes
scComSAMLightClientCtrlDoubleValueTypeFieldMinX 119
Set Minimum fieldsize in x direction.
scComSAMLightClientCtrlDoubleValueTypeFieldMinY 120
Set Minimum fieldsize in y direction.
scComSAMLightClientCtrlDoubleValueTypeFieldMaxX 121
Set Maximum fieldsize in x direction.
scComSAMLightClientCtrlDoubleValueTypeFieldMaxY 122
Set Maximum fieldsize in y direction.
Parameter Type: int Unit: none
Set fieldsize parameter value.
CCI_Return Type: int
CCI return number, see error list.
Notes · The fieldsize can be set via ScSetFieldSizeAndWorkingArea.
C# Example: Get min Y field size:

double Field_Min_Y = cci.ScGetDoubleValue((int)


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlDoubleValueTypeFieldMinY);
Table 28: Field Size

© 2022 SCAPS GmbH


Client Control Interface Manual - Global Settings 30

Field Size and Working Area Set


Get
DLL Function int CCI_Return = ScSetFieldSizeAndWorkingArea(double Field_Size, double Field_Size_Center_X,
double Field_Size_Center_Y, double Working_Area_Min_X, double Working_Area_Min_Y, double
Working_Area_Max_X, double Working_Area_Max_Y)
ASCII Function int CCI_Return = ScSetFieldSizeAndWorkingArea(double Field_Size, double Field_Size_CenterX,
double Field_Size_CenterY, double Working_Area_MinX, double Working_Area_MinY, double
Working_Area_MaxX, double Working_Area_MaxY)
Description Set the fieldsize and working area.
Field_Size Type: double Unit: [mm]*
Set fieldsize diameter.
Field_Size_Center_X Type: double Unit: [mm]*
Set fieldsize center x coordinate.
Field_Size_Center_Y Type: double Unit: [mm]*
Set fieldsize center y coordinate.
Working_Area_Min_X Type: double Unit: [mm]*
Set working area minimum x coordinate.
Working_Area_Min_Y Type: double Unit: [mm]*
Set working area minimum y coordinate.
Working_Area_Max_X Type: double Unit: [mm]*
Set working area maximum x coordinate.
Working_Area_Max_Y Type: double Unit: [mm]*
Set working area maximum y coordinate.
CCI_Return Type: int
CCI return number, see error list.
Notes · The default unit is mm, but the user can select a different unit.
C# Example: Set fieldsize and working area:

int CCI_Return = cci.ScSetFieldSizeAndWorkingArea(200, 100, 100, 0, 0, 200, 200);


Table 29: Field Size and Working Area

© 2022 SCAPS GmbH


Client Control Interface Manual - Global Settings 31

Gain Set
Get
DLL Function int CCI_Return = ScSetDoubleValue(int Value_Type, double Gain)
double Gain = ScGetDoubleValue(int Value_Type)
ASCII Function int CCI_Return = ScCciSetDoubleValue(int Value_Type, double Gain)
double Gain = ScCciGetDoubleValue(int Value_Type)
Description Set or get the gain x/y correction factor of the optic.
Value_Type Type: int ID:
Location: ScComSAMLightClientCtrlValueTypes
scComSAMLightClientCtrlDoubleValueTypeGainX 46
Set or get the gain x correction factor of the optic.
scComSAMLightClientCtrlDoubleValueTypeGainY 47
Set or get the gain y correction factor of the optic.
Gain Type: double Unit: none
Set or get the gain factor for x or y.
CCI_Return Type: int
CCI return number, see error list.
Notes -
C# Example: Set gain X:

int CCI_Return = cci.ScSetDoubleValue((int)


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlDoubleValueTypeGainX, 0.95);
C# Example: Get gain Y:

double Gain = cci.ScGetDoubleValue((int)


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlDoubleValueTypeGainX);
Table 30: Gain

© 2022 SCAPS GmbH


Client Control Interface Manual - Global Settings 32

Home Position Set


Get
DLL Function int CCI_Return = ScSetDoubleValue(int Value_Type, double Home_Position)
double Home_Position = ScGetDoubleValue(int Value_Type)
ASCII Function int CCI_Return = ScCciSetDoubleValue(int Value_Type, double Home_Position)
double Home_Position = ScCciGetDoubleValue(int Value_Type)
Description Set or get the home position.
Value_Type Type: int ID:
Location: ScComSAMLightClientCtrlValueTypes
scComSAMLightClientCtrlDoubleValueTypeHomePosX 23
Set or get the home position x.
scComSAMLightClientCtrlDoubleValueTypeHomePosY 24
Set or get the home position y.
scComSAMLightClientCtrlDoubleValueTypeHomePosZ 25
Set or get the home position z.
Home_Position Type: double Unit: [mm]*
Set or get the home position coordinate x/y/z.
CCI_Return Type: int
CCI return number, see error list.
Notes · The default unit is mm, but the user can select a different unit.
C# Example: Set home Ppsition X:

int CCI_Return = cci.ScSetDoubleValue((int)


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlDoubleValueTypeHomePosX, 50.0);
C# Example: Get home position Z:

double Home_Postion = cci.ScGetDoubleValue((int)


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlDoubleValueTypeHomePosZ);
Table 31: Home Position

© 2022 SCAPS GmbH


Client Control Interface Manual - Global Settings 33

Offset Set
Get
DLL Function int CCI_Return = ScSetDoubleValue(int Value_Type, double Offset)
double Offset = ScGetDoubleValue(int Value_Type)
ASCII Function int CCI_Return = ScCciSetDoubleValue(int Value_Type, double Offset)
double Offset = ScCciGetDoubleValue(int Value_Type)
Description Set or get the Offset x/y correction factor of the optic.
Value_Type Type: int ID:
Location: ScComSAMLightClientCtrlValueTypes
scComSAMLightClientCtrlDoubleValueTypeOffsetX 58
Set or get the offset x correction factor of the optic.
scComSAMLightClientCtrlDoubleValueTypeOffsetY 59
Set or get the offset y correction factor of the optic.
scComSAMLightClientCtrlDoubleValueTypeOffsetZ 90
Only for RTC cards. Set or get the offset z correction factor of the optic in
sc_setup.exe. Requires Optic3D license.
Offset Type: double Unit: [mm]*
Set offset factor for x/y/z.
CCI_Return Type: int
CCI return number, see error list.
Notes · Z Offset can only be set in sc_setup.
· The default unit is mm, but the user can select a different unit.
C# Example: Set offset X:

int CCI_Return = cci.ScSetDoubleValue((int)


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlDoubleValueTypeOffsetX, 10.0);
C# Example: Get offset X:

double Offset_X = cci.ScGetDoubleValue((int)


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlDoubleValueTypeOffsetX);
Table 32: Offset

© 2022 SCAPS GmbH


Client Control Interface Manual - Global Settings 34

Optic Axis State Set


Get
DLL Function int CCI_Return = ScSetLongValue(int Value_Type, int Axis_State)
int Axis_State = ScGetLongValue(int Value_Type)
ASCII Function int CCI_Return = ScCciSetLongValue(int Value_Type, int Axis_State)
int Axis_State = ScCciGetLongValue(int Value_Type)
Description Set or get the current state of the optical axis, whether inverted or not.
Value_Type Type: int ID:
Location: ScComSAMLightClientCtrlValueTypes
scComSAMLightClientCtrlLongValueTypeOpticAxisState 110
Axis_State Type: int Index:
Location: None
All axes are normal & XY-axis also normal 0x0
X-axis inverted 0x1
Y-axis inverted 0x2
X- & Y-axes inverted 0x3
XY-axis flipped 0x4
X-axis inverted & XY-axis flipped 0x5
Y-axis inverted & XY-axis flipped 0x6
X- & Y-axis inverted & XY-axis flipped 0x7
Z-axis inverted 0x8
X- & Z-axes inverted 0x9
Y- & Z-axes inverted 0xa
X-, Y- & Z-axes inverted 0xb
Z-axis inverted & XY-axis flipped 0xc
X- & Z-axes inverted & XY-axis flipped 0xd
Y- & Z-axes inverted & XY-axis flipped 0xe
X-, Y- & Z-axes inverted & XY-axis flipped 0xf
CCI_Return Type: int
CCI return number, see error list.
Notes · Those index can not be combined.
C# Example: Invert X axis:

int CCI_Return = cci.ScSetLongValue((int)


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlLongValueTypeOpticAxisState, 0x1);
C# Example: Get optic axis state:

int Axis_State = cci.ScGetLongValue((int)


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlLongValueTypeOpticAxisState);
Table 33: Optic Axis State

© 2022 SCAPS GmbH


Client Control Interface Manual - Global Settings 35

Optic Rotation Set


Get
DLL Function int CCI_Return = ScSetDoubleValue(int Value_Type, double Rotation_Angle)
double Rotation_Angle = ScGetDoubleValue(int Value_Type)
ASCII Function int CCI_Return = ScCciSetDoubleValue(int Value_Type, double Rotation_Angle)
double Rotation_Angle = ScCciGetDoubleValue(int Value_Type)
Description Set or get the rotation value of the optic.
Value_Type Type: int ID:
Location: ScComSAMLightClientCtrlValueTypes
scComSAMLightClientCtrlDoubleValueTypeOpticRotation 111
Rotation_Angle Type: double Unit: [deg]
Set or get the rotation angle.
CCI_Return Type: int
CCI return number, see error list.
Notes -
C# Example: Set optic rotation to 45 deg:

int CCI_Return = cci.ScSetDoubleValue((int)


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlDoubleValueTypeOpticRotation, 45.0);
C# Example: Get optic rotation:

double Rotation_Angle = cci.ScGetDoubleValue((int)


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlDoubleValueTypeOpticRotation);
Table 34: Optic Rotation

© 2022 SCAPS GmbH


Client Control Interface Manual - Global Settings 36

Red Pointer Parameters Set


Get
DLL Function int CCI_Return = ScSetDoubleValue(int Value_Type, double Parameter)
double Parameter = ScGetDoubleValue(int Value_Type)
ASCII Function int CCI_Return = ScCciSetDoubleValue(int Value_Type, double Parameter)
double Parameter = ScCciGetDoubleValue(int Value_Type)
Description Set or get the Red Pointer Parameters Offset and Wavelength Factor.
Value_Type Type: int ID:
Location: ScComSAMLightClientCtrlValueTypes
scComSAMLightClientCtrlDoubleValueTypeRedPointerOffsetX 154
Red Pointer Offset in X direction. [mm]
scComSAMLightClientCtrlDoubleValueTypeRedPointerOffsetY 155
Red Pointer Offset in Y direction. [mm]
scComSAMLightClientCtrlDoubleValueTypeRedPointerFactorX 156
Wavelength factor in X direction.
scComSAMLightClientCtrlDoubleValueTypeRedPointerFactorY 157
Wavelength factor in Y direction.
Parameter Type: double Unit: Depends on constant
Set or get the desired parameter value.
CCI_Return Type: int
CCI return number, see error list.
Notes -
C# Example: Set Offset X:

int CCI_Return = cci.ScSetDoubleValue((int)


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlDoubleValueTypeRedPointerOffsetX, 1.10);
C# Example: Get Wavelength Factor Y:

double Factor = cci.ScGetDoubleValue((int)


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlDoubleValueTypeRedPointerFactorY);
Table 35: Red Pointer Parameters

4.2.1 Min / Max ...


The following parameters can be found in SAMLight at Settings System Optic Min/Max.

· Field Size and Working Area Optic


· Laser Frequency, Jump and Mark Speed Limits
· Working Area
· Working Area 2D

Laser Frequency, Jump and Mark Speed Limits Set


Get
DLL Function int CCI_Return = ScSetDoubleValue(int Value_Type, double Frequency)
double Frequency = ScGetDoubleValue(int Value_Type)
ASCII Function int CCI_Return = ScCciSetDoubleValue(int Value_Type, double Frequency)
double Frequency = ScCciGetDoubleValue(int Value_Type)
Description Set or get the laser frequency.
Value_Type Type: int ID:

© 2022 SCAPS GmbH


Client Control Interface Manual - Global Settings 37

Laser Frequency, Jump and Mark Speed Limits Set


Get
Location: ScComSAMLightClientCtrlValueTypes
scComSAMLightClientCtrlDoubleValueTypeMinFrequency 124
Minimum frequency of the laser. [kHz]
scComSAMLightClientCtrlDoubleValueTypeMaxFrequency 125
Maximum frequency of the laser. [kHz]
scComSAMLightClientCtrlDoubleValueTypeMinMarkSpeed 128
Minimum mark speed. [mm/s]
scComSAMLightClientCtrlDoubleValueTypeMaxMarkSpeed 129
Maximum mark speed. [mm/s]
scComSAMLightClientCtrlDoubleValueTypeMinJumpSpeed 130
Minimum jump speed. [mm/s]
scComSAMLightClientCtrlDoubleValueTypeMaxJumpSpeed 131
Maximum jump speed. [mm/s]
Frequency Type: double Unit: depends on constant
Minimum or maximum laser frequency.
CCI_Return Type: int
CCI return number, see error list.
Notes -
C# Example: Set minimum laser frequency:

int CCI_Return = cci.ScSetDoubleValue((int)


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlDoubleValueTypeMinFrequency, 5.0);
C# Example: Get maximum laser frequency:

double Max_Frequency = cci.ScGetDoubleValue((int)


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlDoubleValueTypeMaxFrequency);
Table 36: Laser Frequency

© 2022 SCAPS GmbH


Client Control Interface Manual - Global Settings 38

Working Area Set


Get
DLL Function double Working_Area = ScGetWorkingArea(int Index)

ASCII Function double Working_Area = ScCciGetWorkingArea(int Index)

Description Get the working area.


Working_Area Type: int Unit: [mm]*
Get the wanted parameter for the working area.
Index Type: int Index:
Location: None
SC_SAMLIGHT_OUTLINE_INDEX_MIN_X 0x0
SC_SAMLIGHT_OUTLINE_INDEX_MIN_Y 0x1
SC_SAMLIGHT_OUTLINE_INDEX_MIN_Z 0x2
SC_SAMLIGHT_OUTLINE_INDEX_MAX_X 0x3
SC_SAMLIGHT_OUTLINE_INDEX_MAX_Y 0x4
SC_SAMLIGHT_OUTLINE_INDEX_MAX_Z 0x5
Notes · These index can not be combined.
· The default unit is mm, but the user can select a different unit.
· 2D system: Z parameters return the x dimension.
C# Example: Get working area z_min:

double Z_Min = cci.ScGetWorkingArea(0x3);


Table 37: Working Area

© 2022 SCAPS GmbH


Client Control Interface Manual - Global Settings 39

Working Area 2D Set


Get
DLL Function int CCI_Return = ScSetDoubleValue(int Value_Type, double Working_Area)
double Working_Area = ScGetDoubleValue(int Value_Type)
ASCII Function int CCI_Return = (int Value_Type, double Working_Area)
double Working_Area = ScCciGetDoubleValue(int Value_Type)
Description Set or get the working area.
Value_Type Type: int ID:
Location: ScComSAMLightClientCtrlValueTypes
scComSAMLightClientCtrlDoubleValueTypeWorkingAreaMinX 68
Minimum x coordinate of the working area.
scComSAMLightClientCtrlDoubleValueTypeWorkingAreaMinY 69
Maximum x coordinate of the working area.
scComSAMLightClientCtrlDoubleValueTypeWorkingAreaMaxX 70
Minimum y coordinate of the working area.
scComSAMLightClientCtrlDoubleValueTypeWorkingAreaMaxY 71
Maximum y coordinate of the working area.
Working_Area Type: double Unit: [mm]*
Set home position coordinate x/y/z.
CCI_Return Type: int
CCI return number, see error list.
Notes · The default unit is mm, but the user can select a different unit.
C# Example: Set working area xmin:

int CCI_Return = cci.ScSetDoubleValue((int)


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlDoubleValueTypeWorkingAreaMinX, 500.0);
C# Example: Get working area ymax:

double Max_Y = cci.ScGetDoubleValue((int)


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlDoubleValueTypeWorkingAreaMaxY);
Table 38: Working Area 2D

4.2.2 Advanced
The following parameters can be found in SAMLight at Settings System Optic Advanced.
The CCI commands for inputs, outputs and output inversions are described here.

· Is Card Allowed
· Load from USC3
· Restore Transformation
· Store Flash Settings

Is Card Allowed Set


Get
DLL Function int Allowed = ScGetLongValue(int Value_Type)

ASCII Function int Allowed = ScCciGetLongValue(int Value_Type)

Description Check if the card can be accessed.


Allowed Type: int Unit: none

© 2022 SCAPS GmbH


Client Control Interface Manual - Global Settings 40

Is Card Allowed Set


Get
· 0: JobIO Select or running flash job.
· 1: OK.
Value_Type Type: int ID:
Location: ScComSAMLightClientCtrlValueTypes
scComSAMLightClientCtrlLongValueTypeIsCardAccesAllowed 112
Notes -
C# Example: Is Card Allowed:

int Allowed = cci.ScGetLongValue((int)


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlLongValueTypeIsCardAllowed);
Table 39: Is Card Allowed

Load from USC3 Set


Get
DLL Function int CCI_Return = ScExecCommand(int Cmd_ID)

ASCII Function int CCI_Return = ScCciExecCommand(int Cmd_ID)

Description Load the current stored settings from the USC3 in SAMLight.
Cmd_ID Type: int ID:
Location: ScComSAMLightClientCtrlExecCommandConstants
scComSAMLightClientCtrlExecCommandLoadHeadFromUSC3 64
CCI_Return Type: int
CCI return number, see error list.
Notes · Only for USC3
· Only head specific settings are loaded.
C# Example: Load current settings from USC3:

int CCI_Return = cci.ScExecCommand((int)


ScComSAMLightClientCtrlExecCommandConstants.scComSAMLightClientCtrlExecCommandLoadHeadFromUSC3);
Table 40: Load from USC3

Restore Transformation Set


Get
DLL Function int CCI_Return = ScSetLongValue(int Value_Type, int Index)

ASCII Function int CCI_Return = ScCciSetLongValue(int Value_Type, int Index)

Description Store the matrix of each entity, recover them and update if needed. Mark, then shift
and get later original positions back.
Value_Type Type: int ID:
Location: ScComSAMLightClientCtrlValueTypes
scComSAMLightClientCtrlLongValueTypeStoreRestoreTransformation 32
Index Type: int Index:
Location: None
RESTORE_TRANSFORMATION_STORE 0x0
RESTORE_TRANSFORMATION_RESTORE 0x1
RESTORE_TRANSFORMATION_RESTORE_WITH_UPDATE 0x2
CCI_Return Type: int
CCI return number, see error list.

© 2022 SCAPS GmbH


Client Control Interface Manual - Global Settings 41

Restore Transformation Set


Get
Notes -
C# Example: Store transformation:

int CCI_Return = cci.ScSetLongValue((int)


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlLongValueTypeStoreRestoreTransformation, 0x0);
Table 41: Restore Transformation

Store Flash Settings Set


Get
DLL Function int CCI_Return = ScExecCommand(int Cmd_ID)

ASCII Function int CCI_Return = ScCciExecCommand(int Cmd_ID)

Description Stores the settings to the USC-card EPCS (this is necessary for stand-alone
operation). Make sure that the settings fit to the laser and other machinery. The
settings will be loaded during powering on the card.
Cmd_ID Type: int ID:
Location: ScComSAMLightClientCtrlExecCommandConstants
scComSAMLightClientCtrlExecCommandStoreFlashSettings 58
CCI_Return Type: int
CCI return number, see error list.
Notes · Do not use for USC-1 since it has no Flash memory.
C# Example: Store flash settings:

int CCI_Return = cci.ScExecCommand((int)


ScComSAMLightClientCtrlExecCommandConstants.scComSAMLightClientCtrlExecCommandStoreFlashSettings);
Table 42: Store Flash Settings

4.2.2.1 Head Optic Settings


· Primary Head Parameter
· Secondary Head Entity Parameter
· Secondary Head Parameter

Primary Head Parameter Set


Get
DLL Function int CCI_Return = ScSetDoubleValue(int Value_Type, double Parameter)
double Parameter = ScGetDoubleValue(int Value_Type)
ASCII Function int CCI_Return = ScCciSetDoubleValue(int Value_Type, double Parameter)
double Parameter = ScCciGetDoubleValue(int Value_Type)
Description Set or get different primary head parameters.
Value_Type Type: int ID:
Location: ScComSAMLightClientCtrlValueTypes
scComSAMLightClientCtrlDoubleValueTypePrimaryHeadOffsetX 65546
The offset X correction factor of the primary head can be set or get. [mm]*
scComSAMLightClientCtrlDoubleValueTypePrimaryHeadOffsetY 65547
The offset Y correction factor of the primary head can be set or get. [mm]*
scComSAMLightClientCtrlDoubleValueTypePrimaryHeadGainX 65548
The gain X correction factor of the primary head can be edited. [mm]*

© 2022 SCAPS GmbH


Client Control Interface Manual - Global Settings 42

Primary Head Parameter Set


Get
scComSAMLightClientCtrlDoubleValueTypePrimaryHeadGainY 65549
The gain Y correction factor of the primary head can be edited. [mm]*
scComSAMLightClientCtrlDoubleValueTypePrimaryHeadRotate 65550
Using this constant the rotational angle of the primary head can be set or get. [deg]
scComSAMLightClientCtrlDoubleValueTypePrimaryHeadEnable 65551
Using this constant the primary head can be activated or deactivated.
Parameter Type: int Unit: depends on constant
Set or get the required parameter.
CCI_Return Type: int
CCI return number, see error list.
Notes · The default unit is mm, but the user can select a different unit.
C# Example: Set gain X for primary head:

int CCI_Return = cci.ScSetDoubleValue((int)


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlDoubleValueTypePrimaryHeadGainX, 0.8);
C# Example: Head offset X for primary head:

double Parameter = cci.ScGetDoubleValue((int)


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlDoubleValueTypePrimaryHeadOffsetX);
Table 43: Primary Head Parameters

Secondary Head Entity Parameter Set


Get
DLL Function int CCI_Return = ScSetEntityDoubleData(string Entity_Name, int Data_ID, double Parameter)
int CCI_Return = ScGetEntityDoubleData(string Entity_Name, int Data_ID, ref double Parameter)
ASCII Function int CCI_Return = ScCciSetEntityDoubleData(string Entity_Name, int Data_ID, double Parameter)
double Parameter = ScCciGetEntityDoubleData(string Entity_Name, int Data_ID)
Description Set or get different secondary head entity parameters.
Value_Type Type: int ID:
Location: ScComSAMLightClientCtrlFlags
ScComSAMLightClientCtrlDoubleDataIdSecondaryHeadTransformationOffsetX 88
The offset X correction factor for secondary head entities can be set or get. [mm]*
ScComSAMLightClientCtrlDoubleDataIdSecondaryHeadTransformationOffsetY 89
The offset Y correction factor for secondary head entities can be set or get. [mm]*
ScComSAMLightClientCtrlDoubleDataIdSecondaryHeadTransformationScaleX 90
The scale X correction factor for secondary head entities can be edited. [mm]*
ScComSAMLightClientCtrlDoubleDataIdSecondaryHeadTransformationScaleY 91
The scale Y correction factor for secondary head entities can be edited. [mm]*
ScComSAMLightClientCtrlDoubleDataIdSecondaryHeadTransformationRotation 92
The rotational angle of the secondary head can be set or get. [deg]
Parameter Type: int Unit: depends on constant
Set or get the required parameter.

© 2022 SCAPS GmbH


Client Control Interface Manual - Global Settings 43

Secondary Head Entity Parameter Set


Get
CCI_Return Type: int
CCI return number, see error list.
Notes · These secondary head transformation commands are only available for USC-2/3
with license for Head2 and activated Head2.
· The default unit is mm, but the user can select a different unit.
C# Example: Set offset X for secondary head:

int CCI_Return = cci.ScSetEntityDoubleData("Entity_1", (int)


ScComSAMLightClientCtrlFlags.ScComSAMLightClientCtrlDoubleDataIdSecondaryHeadTransformationOffsetX, 2.55);
C# Example: Get head offset X for secondary head:

double Offset_X = 0.0;


int CCI_Return = cci.ScGetEntityDoubleData("Entity_1", (int)
ScComSAMLightClientCtrlFlags.ScComSAMLightClientCtrlDoubleDataIdSecondaryHeadTransformationOffsetX, ref
Offset_X);
Table 44: Secondary Head Entity Parameters

Secondary Head Parameter Set


Get
DLL Function int CCI_Return = ScSetDoubleValue(int Value_Type, double Parameter)
double Parameter = ScGetDoubleValue(int Value_Type)
ASCII Function int CCI_Return = ScCciSetDoubleValue(int Value_Type, double Parameter)
double Parameter = ScCciGetDoubleValue(int Value_Type)
Description Set or get different secondary head parameters.
Value_Type Type: int ID:
Location: ScComSAMLightClientCtrlValueTypes
scComSAMLightClientCtrlDoubleValueTypeSecondaryHeadOffsetX 65552
The offset X correction factor of the secondary head can be set or get. [mm]*
scComSAMLightClientCtrlDoubleValueTypeSecondaryHeadOffsetY 65553
The offset Y correction factor of the secondary head can be set or get. [mm]*
scComSAMLightClientCtrlDoubleValueTypeSecondaryHeadGainX 65556
The gain X correction factor of the secondary head can be edited. [mm]*
scComSAMLightClientCtrlDoubleValueTypeSecondaryHeadGainY 65557
The gain Y correction factor of the secondary head can be edited. [mm]*
scComSAMLightClientCtrlDoubleValueTypeSecondaryHeadRotate 65558
The rotational angle of the secondary head can be set or get. [deg]
scComSAMLightClientCtrlDoubleValueTypeSecondaryHeadEnable 65559
Using this constant the secondary head can be activated or deactivated.
Parameter Type: int Unit: depends on constant
Set or get the required parameter.
CCI_Return Type: int
CCI return number, see error list.
Notes · These secondary head transformation commands are only available for USC-2/3
with license for Head2 and activated Head2.
· The default unit is mm, but the user can select a different unit.
C# Example: Set gain X for secondary head:

© 2022 SCAPS GmbH


Client Control Interface Manual - Global Settings 44

Secondary Head Parameter Set


Get
int CCI_Return = cci.ScSetDoubleValue((int)
ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlDoubleValueTypeSecondaryHeadGainX, 0.8);
C# Example: Head offset X for secondary head:

double Parameter = cci.ScGetDoubleValue((int)


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlDoubleValueTypeSecondaryHeadOffsetX);
Table 45: Secondary Head Parameters

4.2.2.2 MOTF hardware settings


· Enable MOTF
· MOTF Start Delay
· USC-1 MOTF
· USC-2/3 MOTF

Enable MOTF Set


Get
DLL Function int CCI_Return = ScSetLongValue(int Value_Type, int Enable)
int Enable = ScGetLongValue(int Value_Type)
ASCII Function int CCI_Return = ScCciSetLongValue(int Value_Type, int Enable)
int Enable = ScCciGetLongValue(int Value_Type)
Description Allows you to enable or disable the checkbox for marking on the fly settings in
Settings/Optic/Advanced.
Value_Type Type: int
Location: ScComSAMLightClientCtrlValueTypes
scComSAMLightClientCtrlLongValueTypeEnableMotf 91
Enable Type: int Unit: none
· 0: Disable.
· 1: Enable.
CCI_Return Type: int
CCI return number, see error list.
Notes -
C# Example: Enable MOTF:

int CCI_Return = cci.ScSetLongValue( ( int )


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlLongValueTypeEnableMotf, 1 );
C# Example: Check state of the flag:

int Enable = cci.ScGetLongValue( ( int )


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlLongValueTypeJobExecutionDelay);
Table 46: Enable MOTF

MOTF Start Delay Set


Get
DLL Function int CCI_Return = ScSetDoubleValue(int Value_Type, double Start_Delay)
double Start_Delay = ScGetDoubleValue(int Value_Type)
ASCII Function int CCI_Return = ScCciSetDoubleValue(int Value_Type, double Start_Delay)
double Start_Delay = ScCciGetDoubleValue(int Value_Type)
Description Set or get the MOTF trigger delay for RTC cards.

© 2022 SCAPS GmbH


Client Control Interface Manual - Global Settings 45

MOTF Start Delay Set


Get
Value_Type Type: int ID:
Location: ScComSAMLightClientCtrlValueTypes
scComSAMLightClientCtrlDoubleValueTypeMOFExtStartDelay 65
Start_Delay Type: int Unit: [µs]
Set or get the trigger delay for RTC cards.
CCI_Return Type: int
CCI return number, see error list.
Notes · Only useable for RTC cards.
C# Example: Set delay to 200µs:

int CCI_Return = cci.ScSetDoubleValue( (int)


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlDoubleValueTypeMOFExtStartDelay, 200.0 );
C# Example: Get delay:

double Start_Delay = cci.ScGetDoubleValue( (int)


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlDoubleValueTypeMOFExtStartDelay );
Table 47: MOTF Start Delay

USC-1 MOTF Set


Get
DLL Function int CCI_Return = ScSetDoubleValue(int Value_Type, double Parameter)
double Parameter = ScGetDoubleValue(int Value_Type)
ASCII Function int CCI_Return = ScCciSetDoubleValue(int Value_Type, double Parameter)
double Parameter = ScCciGetDoubleValue(int Value_Type)
Description Set or get different primary head parameters.
ValueType Type: int ID:
Location: ScComSAMLightClientCtrlValueTypes
scComSAMLightClientCtrlDoubleValueTypeUsc1MotfCh0Multiplier 65539
This constant is used to set or get the multiplier value for channel 0. [mm]*
scComSAMLightClientCtrlDoubleValueTypeUsc1MotfCh1Multiplier 65540
This constant is used to set or get the multiplier value for channel 1. [mm]*
scComSAMLightClientCtrlDoubleValueTypeUsc1MotfSimulate 65638
Set or get the flag simulation. 0 - Disable, 1 - Enable
scComSAMLightClientCtrlDoubleValueTypeUsc1MotfUseYChannel 65640
Set or get the flag Use Y Channel. 0 - Disable, 1 - Enable
scComSAMLightClientCtrlDoubleValueTypeUsc1MotfInvertOffset 65661
Set or get the flag invert offset. 0 - Disable, 1 - Enable
Parameter Type: int Unit: depends on constant
Set or get the required parameter.
CCI_Return Type: int
CCI return number, see error list.
Notes · The default unit is mm, but the user can select a different unit.
C# Example: Enable simulation mode:

int CCI_Return = cci.ScSetDoubleValue( (int)


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlDoubleValueTypeUsc2MotfCh0Enable, 1 );

© 2022 SCAPS GmbH


Client Control Interface Manual - Global Settings 46

USC-1 MOTF Set


Get
C# Example: Get flag simulation:

double Parameter = cci.ScGetDoubleValue( (int)


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlDoubleValueTypeUsc2MotfCh0Enable );
Table 48: USC-1 MOTF

USC-2/3 MOTF Set


Get
DLL Function int CCI_Return = ScSetDoubleValue(int Value_Type, double Parameter)
double Parameter = ScGetDoubleValue(int Value_Type)
ASCII Function int CCI_Return = ScCciSetDoubleValue(int Value_Type, double Parameter)
double Parameter = ScCciGetDoubleValue(int Value_Type)
Description Set or get different primary head parameters.
Value_Type Type: int ID:
Location: ScComSAMLightClientCtrlValueTypes
scComSAMLightClientCtrlDoubleValueTypeUsc2MotfCh0Enable 65662
Enable channel 0 MOTF.
scComSAMLightClientCtrlDoubleValueTypeUsc2MotfCh1Enable 65663
Enable channel 1 MOTF.
scComSAMLightClientCtrlDoubleValueTypeUsc2MotfCh0Simulate 65664
Enable simulation mode for channel 0.
scComSAMLightClientCtrlDoubleValueTypeUsc2MotfCh1Simulate 65665
Enable simulation mode for channel 1.
scComSAMLightClientCtrlDoubleValueTypeUsc2MotfCh0Multiplier 65670
This constant is used to set or get the multiplier value for channel 0. [mm]*
scComSAMLightClientCtrlDoubleValueTypeUsc2MotfCh1Multiplier 65671
This constant is used to set or get the multiplier value for channel 1. [mm]*
scComSAMLightClientCtrlDoubleValueTypeUsc2MotfCh0Counter 65718
Set the MOTF channel 0 counter.
scComSAMLightClientCtrlDoubleValueTypeUsc2MotfCh1Counter 65719
Set the MOTF channel 1 counter.
Parameter Type: int Unit: depends on Constant
Set or get the required parameter.
CCI_Return Type: int
CCI return number, see error list.
Notes -
C# Example: Enable simulation mode:

int CCI_Return = cci.ScSetDoubleValue( (int)


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlDoubleValueTypeUsc2MotfCh0Enable, 1 );
C# Example: Get flag simulation:

double Parameter = cci.ScGetDoubleValue( (int)


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlDoubleValueTypeUsc2MotfCh0Enable );
Table 49: USC-2/3 MOTF

© 2022 SCAPS GmbH


Client Control Interface Manual - Global Settings 47

4.3 General
The following parameters can be found in SAMLight at Settings System General.

· Mode Application
o Don't Update View
o DisableUndo
· Save Settings Now

Save Settings Now Set


Get
DLL Function int CCI_Return = ScExecCommand(int Cmd_ID)

ASCII Function int CCI_Return = ScCciExecCommand(int Cmd_ID)

Description Saves the current settings to the settings file.


Cmd_ID Type: int ID:
Location: ScComSAMLightClientCtrlExecCommandConstants
scComSAMLightClientCtrlExecCommandSaveSettingsNow 51
CCI_Return Type: int
CCI return number, see error list.
Notes -
C# Example: Save settings now:

int CCI_Return = cci.ScExecCommand((int)


ScComSAMLightClientCtrlExecCommandConstants.scComSAMLightClientCtrlExecCommandSaveSettingsNow);
Table 50: Save Settings Now

4.4 Remote
The following parameters can be found in SAMLight at Settings System Remote.

· Conntection Status
· Open TCP Connection

Connection Status Set


Get
DLL Function int Status = ScGetConnectionStatus()

ASCII Function -
Description Get the connection state for CCI via TCP.
Status Type: int Index:
Location: ScComConnectionToolCtrlResultValues
scComConnectionToolCtrlResultOK 0
If connected, the return value is 0.
scComConnectionToolCtrlResultOpenFailed 1
The connection could not be opened.
scComConnectionToolCtrlResultConnectRecipientFailed 2
The recipient could not connect.
scComConnectionToolCtrlResultSendFailed 3

© 2022 SCAPS GmbH


Client Control Interface Manual - Global Settings 48

Connection Status Set


Get
Sending failed.
scComConnectionToolCtrlResultTimeOut 4
In case of a timeout.
Notes -
C# Example: Get connection status:

int Status = cci.ScGetConnectionState();


Table 51: Connection Status

Open TCP Connection Set


Get
DLL Function int CCI_Return = ScOpenTCPConnection(string Recipient_Address, int Recipient_Port)

ASCII Function -
Description Opens an TCP connection to the scanner application through the network and
returns 1 if the connection could be established successfully. The RecipientAddr is
the IP and the RecipientPort is the Port of the application that has to be accessed
using the client control interface as described above. For the recipient IP in every
case the real IP of the host systems network interface card has to be entered where
the application that has to be remote controlled is running. If that application was
configured using 0.0.0.0 it is not allowed to enter that value here.
Recipient_Address Type: string Unit: none
Set an IP-Address.
Recipient_Port Type: int Unit: none
Set the recipient port.
CCI_Return Type: int
CCI return number, see error list.
Notes -
C# Example: Open a TCP connection:

int CCI_Return = cci.ScOpenTCPConnection("1.1.1.1", 111);


Table 52: Open TCP Connection

4.5 I/O
The following parameters can be found in SAMLight at Settings System I/O.

· Job Toolbar
· Job Execution Delay
· Last Message Input Hardware Status

Job Execution Delay Set


Get
DLL Function int CCI_Return = ScSetLongValue(int Value_Type, int Execution_Delay)
int Execution_Delay = ScGetLongValue(int Value_Type)
ASCII Function int CCI_Return = ScCciSetLongValue(int Value_Type, int Execution_Delay)
int Execution_Delay = ScCciGetLongValue(int Value_Type)
Description Set or get the global parameter job execution delay.

© 2022 SCAPS GmbH


Client Control Interface Manual - Global Settings 49

Job Execution Delay Set


Get
Value_Type Type: int ID:
Location: ScComSAMLightClientCtrlValueTypes
scComSAMLightClientCtrlLongValueTypeJobExecutionDelay 12
Execution_Delay Type: int Unit: [ms]
Enter the required value for the Job Execution Delay.
CCI_Return Type: int
CCI return number, see error list.
Notes -
C# Example: Set job execution delay to 200ms:

int CCI_Return = cci.ScSetLongValue((int)


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlLongValueTypeJobExecutionDelay, 200);
C# Example: Get job execution delay:

int Execution_Delay = cci.ScGetLongValue((int)


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlLongValueTypeJobExecutionDelay);
Table 53: Job Execution Delay

Job Toolbar Set


Get
DLL Function int CCI_Return = ScSetLongValue(int Value_Type, int Parameter)
int Parameter = ScGetLongValue(int Value_Type)
ASCII Function int CCI_Return = ScCciSetLongValue(int Value_Type, int Parameter)
int Parameter = ScCciGetLongValue(int Value_Type)
Description Set or get the status of the Jobs Toolbar.
Value_Type Type: int ID:
Location: ScComSAMLightClientCtrlValueTypes
scComSAMLightClientCtrlLongValueTypeEnableJobToolbar 88
Parameter Type: int Unit: none
· 0: Enable Job toolbar.
· 1: Disable Job toolbar.
CCI_Return Type: int
CCI return number, see error list.
Notes -
C# Example: Enable job toolbar:

int CCI_Return = cci.ScSetLongValue((int)


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlLongValueTypeEnableJobToolbar, 1);
C# Example: Get job toolbar state:

int CCI_Return = cci.ScGetLongValue((int)


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlLongValueTypeEnableJobToolbar);
Table 54: Job Toolbar

© 2022 SCAPS GmbH


Client Control Interface Manual - Global Settings 50

4.6 Extras
The following parameters for Improved Beam Compensation can be found and only be set in SAMLight at
Settings System Extras.

· Improved Beam Compensation

Improved Beam Compensation Set


Get
DLL Function int CCI_Return = ScSetLongValue(int Value_Type, int Improved_Beam_Compensation)
int Improved_Beam_Compensation = ScGetLongValue(int Value_Type)
ASCII Function -

Description Set or get the status of the SAMLight Improved Beam Compensation.
Value_Type Type: int ID:
Location: ScComSAMLightClientCtrlValueTypes
scComSAMLightClientCtrlLongValueTypeEnableImprovedBeamCompensation 137
Improved_Beam_ Type: int Unit: none
Compensation · 0: Disable Improved Beam Compensation
· 1: Enable Improved Beam Compensation
CCI_Return Type: int
CCI return number, see error list.
Notes -
C# Example: Enable Improved Beam Compensation:

int CCI_Return = cci.ScSetLongValue( ( int )


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlLongValueTypeEnableImprovedBeamCompensation, 0 );
C# Example: Check if Improved Beam Compensation is enabled:

int Mode = cci.ScGetLongValue( ( int )


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlLongValueTypeEnableImprovedBeamCompensation );
Table 55: Improved Beam Compensation

4.7 Splitting
The following parameters for Ring Splitting can be found and only be set in SAMLight at Settings System
Splitting. In addition there is a Ring Splitting dialog, see Splitting Ring Splitting.

· Ring Splitting Enable Z Tilt Compensation see Splitting Ring Splitting


· Tilt Compensation Parameters
· Z Motion Axis

Tilt Compensation Parameters Set


Get
DLL Function int CCI_Return = ScSetDoubleValue(int Value_Type, double Parameter)
double Parameter = ScGetDoubleValue(int Value_Type)
ASCII Function int CCI_Return = ScCciSetDoubleValue(int Value_Type, double Parameter)
double Parameter = ScCciGetDoubleValue(int Value_Type)
Description Set or get parameters for the Ring splitting tilt compensation.
Value_Type Type: int ID:
Location: ScComSAMLightClientCtrlValueTypes
scComSAMLightClientCtrlDoubleValueTypeRingSplittingZTiltAngle 115

© 2022 SCAPS GmbH


Client Control Interface Manual - Global Settings 51

Tilt Compensation Parameters Set


Get
Set or get the Z tilt angle for ring splitting. [deg]
scComSAMLightClientCtrlDoubleValueTypeRingSplittingZSpindleCenterHeight 116
Set the Z spindle center height. [mm]*
scComSAMLightClientCtrlDoubleValueTypeRingSplittingSpindleRadius 117
Set the spindle radius. [mm]*
scComSAMLightClientCtrlDoubleValueTypeRingSplittingZRingCenterHeight 118
Set the Z ring center height at 90°. [mm]*
Parameter Type: int Unit: depends on constant
Set the required value.
CCI_Return Type: int
CCI return number, see error list.
Notes · Further commands can be found in the ring splitting chapter.
· The default unit is mm, but the user can select a different unit.
C# Example: Set the ring splitting spindle radius:

int CCI_Return = cci.ScSetDoubleValue((int)


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlDoubleValueTypeRingSplittingSpindleRadius, 5);
C# Example: Get the ring splitting spindle radius:

double Parameter = cci.ScGetDoubleValue((int)


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlDoubleValueTypeRingSplittingSpindleRadius);
Table 56: Tilt Compensation Parameters

Z Motion Axis Set


Get
DLL Function int CCI_Return = ScSetLongValue(int Value_Type, int Z_Motion_Axis)
int Z_Motion_Axis = ScGetLongValue(int Value_Type)
ASCII Function int CCI_Return = ScCciSetLongValue(int Value_Type, int Z_Motion_Axis)
int Z_Motion_Axis = ScCciGetLongValue(int Value_Type)
Description Set or get the wanted axis for the z motion.
Value_Type Type: int ID:
Location: ScComSAMLightClientCtrlValueTypes
scComSAMLightClientCtrlLongValueTypeRingSplittingZMotionAxis 97
Z_Motion_Axis Type: int Unit: none
Select the wanted axis for z motion. The numbering of the possible motion axis
begins with 0 for the first axis with Position mode, followed by other Position mode
axes. Axes with Angle mode are ignored, as shown in the Z motion axis combobox.
CCI_Return Type: int
CCI return number, see error list.
Notes · Further commands can be found in the ring splitting chapter.
C# Example: Set the Z Motion Axis:

int CCI_Return = cci.ScSetLongValue((int)


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlLongValueTypeRingSplittingZMotionAxis, 1);
C# Example: Get the Z Motion Axis:

int Z_Motion_Axis = cci.ScGetLongValue((int)


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlLongValueTypeRingSplittingZMotionAxis);

© 2022 SCAPS GmbH


Client Control Interface Manual - Global Settings 52

Table 57: Z Motion Axis

4.8 User level


The following parameters can be found in SAMLight at Settings System User Level.

· User Account
· User Logout

User Accout Set


Get
DLL Function int CCI_Return = ScSetStringValue(int Value_Type, string Parameter)
int CCI_Return = ScGetStringValue(int Value_Type, ref string Parameter)
ASCII Function int CCI_Return = ScCciSetStringValue(int Value_Type, string Parameter)
string Parameter = ScCciGetStringValue(int Value_Type)
Description Get and set the current user.
Value_Type Type: int ID:
Location: ScComSAMLightClientCtrlValueTypes
scComSAMLightClientCtrlStringValueTypeCurrentUserName 33
Get the current logged in user name.
scComSAMLightClientCtrlStringValueTypeLoginUserAndPassword 38
Set the user name and password. They have to be defined with a vertical tab in
between.
Parameter Type: string Unit: none
The name of the current logged in user/ user name + password.
CCI_Return Type: int
CCI return number, see error list.
Notes · User level has to activated before, otherwise the returned string is empty.
C# Example: Set user name + password:

string user = "User";


string password = "Password";
int CCI_Return = cci.ScSetStringValue((int)
ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlStringValueTypeLoginUserAndPassword,
user+"\t"+password);
C# Example: Get the name of the current user:

string str = "";


int CCI_Return = cci.ScGetStringValue((int)
ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlStringValueTypeCurrentUserName, ref str);
Table 58: User Account

© 2022 SCAPS GmbH


Client Control Interface Manual - Global Settings 53

User Logout Set


Get
DLL Function int CCI_Return = ScExecCommand(int Cmd_ID)

ASCII Function int CCI_Return = ScCciExecCommand(int Cmd_ID)

Description Log out the current user in SAMLight.


Cmd_ID Type: int
Location: ScComSAMLightClientCtrlExecCommandConstants
scComSAMLightClientCtrlExecCommandLogout 47
CCI_Return Type: int
CCI return number, see error list.
Notes -
C# Example: Log out the current user:

int CCI_Return = cci.ScExecCommand( ( int )


ScComSAMLightClientCtrlExecCommandConstants.scComSAMLightClientCtrlExecCommandLogout );
Table 59: User Logout

4.9 sc_setup
The following commands can not be set in the global settings of SAMLight. Here it is required to open the
sc_setup. Since this are global parameters, these commands are also listed in the global settings.

· DA1/DA2
· Language
· Laser Type
· Z Offset Optic

© 2022 SCAPS GmbH


Client Control Interface Manual - Global Settings 54

DAC A/B Set


Get
DLL Function int CCI_Return = ScSetLongValue(int Value_Type, int DAC)

ASCII Function int CCI_Return = ScCciSetLongValue(int Value_Type, int DAC)

Description Set the analog output 1 or 2 of the scanner controller card (DAC_A/DA1 or
DAC_B/DA2).
Value_Type Type: int ID:
Location: ScComSAMLightClientCtrlValueTypes
scComSAMLightClientCtrlLongValueTypeDA1 6
Set the analog output 1 of the scanner controller card (DAC_A).
scComSAMLightClientCtrlLongValueTypeDA2 7
Set the analog output 2 of the scanner controller card (DAC_B).
DAC Type: int Unit: none
The values that can be set in principle range from 0 to 65535 (2^16-1). But
depending on USC card and preselected DAC_A/DAC_B voltage signal range of 2.5,
5 and 10V only the 8 to 12 most significant of 16 bits can be actual used to set the
DAC_A/DAC_B value, see Notes below.
CCI_Return Type: int
CCI return number, see error list.
Notes · The commands will just set the output and will not change the pen power.
· For USC-2/-3 card values 2^6-1 correspond to a voltage of 0V of the preselected
DAC_A/DAC_B voltage signal range of 0 to 2.5V, values 2^5-1 correspond to a
voltage of 0V of the preselected DAC_A/DAC_B voltage signal range of 0 to 5V
and values 2^4-1 correspond to a voltage of 0V of the preselected
DAC_A/DAC_B voltage signal range of 0 to 10V. So for USC-2/-3 only the 10,11
or 12 most significant of 16 bits from 2^4-1=15, 2^5-1=31 and 2^6-1=63 to 2^16-
1=65535 can be actual used to set the DAC_A/DAC_B value, which corresponds
to a resolution range between 0 to 1023, 2047 and 4095. For USC-2/-3 the set
value can checked at InfoView of sc_usc_server.exe for Member AnalogOutA and
AnalogOutB.
· For USC-1 card values 2^8-1 = 255 correspond to a voltage of 0V, independent
of the preselected DAC_A/DAC_B voltage signal range of 0 to 2.5, 5 or 10V. So
for USC-1 only the 8 most significant of 16 bits from 2^8-1=255 to 2^16-1=65535
can be actual used to set the DAC_A/DAC_B value, which corresponds to a
resolution range between 0 and 255.
C# Example: Set DAC_A to maximum value value of USC-1/-2/-3 of 2^16-1=65535:

int CCI_Return = cci.ScSetLongValue((int)


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlLongValueTypeDA1, (int)Math.Pow(2, 16)-1);
C# Example:Set DAC_B to minimum value of 2^4-1=15 for USC-2/-3 for the preselected DAC_A/DAC_B
voltage signal range between 0 and 10V:

int CCI_Return = cci.ScSetLongValue((int)


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlLongValueTypeDA2, (int)Math.Pow(2, 4)-1);
Table 60: DAC A/DAC B

© 2022 SCAPS GmbH


Client Control Interface Manual - Global Settings 55

Language Set
Get
DLL Function int CCI_Return = ScGetStringValue(int Value_Type, ref string Language)

ASCII Function string Language = ScCciGetStringValue(int Value_Type)

Description Get the set language in sc_setup.exe.


Value_Type Type: int
Location: ScComSAMLightClientCtrlValueTypes
scComSAMLightClientCtrlStringValueTypeLanguage 34
Language Type: string Unit: none
The desired language.
CCI_Return Type: int
CCI return number, see error list.
Notes · If unicode is chosen "_uc" will be added at the end of the return string.
C# Example: Get the set language:

string Language = "";


int CCI_Return = cci.ScGetStringValue(34, ref Language);
Table 61: Language

Laser Type Set


Get
DLL Function double Laser = ScGetDoubleValue(int Value_Type)

ASCII Function double Parameter = ScCciGetDoubleValue(int Value_Type)

Description Get the required Laser Type and Version.


Value_Type Type: int ID:
Location: ScComSAMLightClientCtrlValueTypes
scComSAMLightClientCtrlDoubleValueTypeLaserType 65597
Get Laser type.
scComSAMLightClientCtrlDoubleValueTypeLaserTypeVersion 65598
Get Laser type version.
Laser Type: int Unit: none
Get laser type and version.
Notes -
C# Example: Get laser type version:

int Laser_Version = cci.ScGetDoubleValue((int)


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlDoubleValueTypeLaserType);
Table 62: Laser Type

© 2022 SCAPS GmbH


Client Control Interface Manual - Pen Settings 56

5 Pen Settings
The following chapter explains all commands, which can be used to edit the Pen Settings. There are
subchapters for each tab in the SAMLight Pen Settings:

· Advanced Settings
· Main
· Laser-Specials
· Scanner
· Misc
· Drill
· Ramping
· Path
· Bitmap

The following commands are described in this chapter:

· Entity Pen Assignment


· Group Flags
· Override Parameter
· Override Pen
· Pen Enable Flags
· Pen Name
· Pen Number
· Protected Pen
· Special Pen parameters

© 2022 SCAPS GmbH


Client Control Interface Manual - Pen Settings 57

Entity Pen Assignment Set


Get
DLL Function int CCI_Return = ScSetEntityLongData(string Entity_Name, int Data_ID, int Pen_Number)
int Pen_Number = ScGetEntityLongData(string Entity_Name, int Data_ID)
ASCII Function int CCI_Return = ScCciSetEntityLongData(string Entity_Name, int Data_ID, int Pen_Number)
int Pen_Number = ScCciGetEntityLongData(string Entity_Name, int Data_ID)
Description Set or get the corresponding pen assigned to the entity.
Entity_Name Type: string Unit: none
Specify the entity based on the name.
Data_ID Type: int ID:
Location: ScComSAMLightClientCtrlFlags
scComSAMLightClientCtrlLongDataIdEntitySetPen 60
Set pen number.
scComSAMLightClientCtrlLongDataIdEntityGetPen 74
Get pen number.
Pen_Number Type: int Unit: none
Pen number [1, 255]
CCI_Return Type: int
CCI return number, see error list.
Notes -
C# Example: Set pen number 3 to "Entity1":

int CCI_Return = cci.ScSetEntityLongData( "Entity1", ( int )


ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlLongDataIdEntitySetPen, 3 );
C# Example: Get the pen number of "Entity1":

int Pen_Number = cci.ScGetEntityLongData( "Entity1", ( int )


ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlLongDataIdEntityGetPen );
Table 63: Entity Pen Assignment

Group Flags Set


Get
DLL Function int CCI_Return = ScSetLongValue(int Value_Type, int Index)
int Index = ScGetLongValue(int Value_Type)

ASCII Function int CCI_Return = ScCciSetLongValue(int Value_Type, int Index)


int Index = ScCciGetLongValue(int Value_Type)
Description Related flag for the currently selected pen.
Value_Type Type: int ID:
Location: ScComSAMLightClientCtrlValueTypes
scComSAMLightClientCtrlLongValueTypeDeviceEnableFlagsSet 8
Index Type: int Index:
Location: ScComSAMLightClientCtrlValueTypes
scComStandardDeviceEnableFlagGroupStyle 0x0
Set the flags values manually.
scComStandardDeviceEnableFlagGroupOptoOut 0x1
The flag values correspond to the OptoOut bits of the scanner control card.
CCI_Return Type: int
CCI return number, see error list.

© 2022 SCAPS GmbH


Client Control Interface Manual - Pen Settings 58

Group Flags Set


Get
Notes · This function is used to choose the input regime for the DeviceEnableFlagsValue.
· Default Value: 0
C# Example: Set flags manually:

int CCI_Return = cci.ScSetLongValue((int)


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlLongValueTypeDeviceEnableFlagsSet,0);
Table 64: Group Flags

Override Parameter Set


Get
DLL Function int CCI_Return = ScSetDoubleValue(int Value_Type, double Parameter)
double Parameter = ScGetDoubleValue(int Value_Type)
ASCII Function int CCI_Return = ScCciSetDoubleValue(int Value_Type, double Parameter)
double Parameter = ScCciGetDoubleValue(int Value_Type)
Description Set or get global (for all pens) SAMLight override parameter.
Value_Type Type: int ID:
Location: ScComSAMLightClientCtrlValueTypes
scComSAMLightClientCtrlDoubleValueTypeOverrideSpeed 1
Global SAMLight override speed.
scComSAMLightClientCtrlDoubleValueTypeOverridePower 2
Global SAMLight override power.
scComSAMLightClientCtrlDoubleValueTypeOverrideFrequency 3
Global SAMLight override frequency.
scComSAMLightClientCtrlDoubleValueTypeOverridePower2 22
Global SAMLight override power2.
Parameter Type: double Unit: [%]
The corresponding override value.
CCI_Return Type: int
CCI return number, see error list.
Notes -
C# Example: Set override power to 95.0%:

int CCI_Return = cci.ScSetDoubleValue( (int)


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlDoubleValueTypeOverridePower, 95.0 );
C# Example: Get current override power:

double Override_Frequency = cci.ScGetDoubleValue( ( int )


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlDoubleValueTypeOverridePower );
Table 65: Override Parameter

© 2022 SCAPS GmbH


Client Control Interface Manual - Pen Settings 59

Override Pen Set


Get
DLL Function int CCI_Return = ScSetLongValue(int Value_Type, int Override_Pen)
int Override_Pen = ScGetLongValue(int Value_Type)
ASCII Function int CCI_Return = ScCciSetLongValue(int Value_Type, int Pen_Number)
int Override_Pen = ScCciGetLongValue(int Value_Type)
Description Set or get the pen number used to mark all entities in the job. The pen numbers that
are assigned to these entities in SAMLight will be ignored.
Value_Type Type: int ID:
Location: ScComSAMLightClientCtrlValueTypes
scComSAMLightClientCtrlLongValueTypeOverridePen 16
Override_Pen Type: int Unit: none
· 0: Disable pen override feature
· 1-255: Pen number
CCI_Return Type: int
CCI return number, see error list.
Notes -
C# Example: Use pen number 3 for all entities:

int CCI_Return = cci.ScSetLongValue( ( int )


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlLongValueTypeOverridePen, 3 );
C# Example: Get override pen number:

int Override_Pen = cci.ScGetLongValue( ( int )


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlLongValueTypeOverridePen );
Table 66: Override Pen

Pen Enable Flags Set


Get
DLL Function int CCI_Return = ScSetLongValue(int Value_Type, int Pen_Enable_Flags)
int Pen_Enable_Flags = ScGetLongValue(int Flag_Value)
ASCII Function int CCI_Return = ScCciSetLongValue(int Value_Type, int Pen_Enable_Flags)
int Pen_Enable_Flags = ScCciGetLongValue(int Flag)
Description Set or get various pen enable flags of the current selected pen.
Value_Type Type: int ID:
Location: ScComSAMLightClientCtrlValueTypes
ScComSAMLightClientCtrlLongValueTypeDeviceEnableFlagsValue 9
Pen_Enable_Flags Type: int Flag:
Location: None
Pen Main LongDelay Enable 0x1
Pen Main Power Control Enable 0x2
Pen Scanner Wobble Enable 0x8
Pen Main Pen Standby Enable (RTC YAG only) 0x20
Pen Bitmap Pixel Hardware Mode Enable 0x40
Pen Misc SkyWriting Enable 0x2000
Pen Drill Drill Enable 0x4000
Pen Misc Defocus Enable 0x10000
Pen Drill CO2Power Enable 0x20000

© 2022 SCAPS GmbH


Client Control Interface Manual - Pen Settings 60

Pen Enable Flags Set


Get
Pen Bitmap Pen PixelMap Enable 0x80000
Pen Drill Use Geometry Enable 0x100000
Pen Misc Apply power changes after jump Enable 0x200000
Pen Drill Point Power Map Enable 0x400000
Pen Bitmap Pen Power as Max Power Enable 0x800000
Pen Bitmap Use Vector Delays Enable 0x1000000
Pen Misc RTC5/6 SkyWriting Enable 0x2000000
Pen Misc RTC5/6 SkyWriting Mode 0x1 0x4000000
Pen Misc RTC5/6 SkyWriting Mode 0x2 0x8000000
CCI_Return Type: int
CCI return number, see error list.
Notes · DeviceEnableFlagsSet must be set to 0.
· The pen number has to be set by ScSetPen.
· To prevent incorrect operation please read chapter How to work with flags.
· This list is incomplete. There are further flags for internal use.
C# Example: Enable long delay and don't change all other flags:

int Pen_Enable_Flags = cci.ScGetLongValue( ( int )


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlLongValueTypeDeviceEnableFlagsValue );
Pen_Enable_Flags = Pen_Enable_Flags | 0x1;
int CCI_Return = cci.ScSetLongValue( ( int )
ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlLongValueTypeDeviceEnableFlagsValue,
Pen_Enable_Flags );
C# Example: Disable long delay and don't change all other flags:

int Pen_Enable_Flags = cci.ScGetLongValue( ( int )


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlLongValueTypeDeviceEnableFlagsValue );
Pen_Enable_Flags = Pen_Enable_Flags & ~0x1;
int CCI_Return = cci.ScSetLongValue( ( int )
ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlLongValueTypeDeviceEnableFlagsValue,
Pen_Enable_Flags );
Table 67: Pen Enable Flags

© 2022 SCAPS GmbH


Client Control Interface Manual - Pen Settings 61

Pen Name Set


Get
DLL Function int CCI_Return = ScSetStringValue(int Value_Type, string Pen_Name)
int CCI_Return = ScGetStringValue(int Value_Type, ref string Pen_Name)
ASCII Function int CCI_Return = ScCciSetStringValue(int Value_Type, string Pen_Name)
string Pen_Name = ScCciGetStringValue(int ValueType)
Description Set or get the name of the current pen.
Value_Type Type: int ID:
Location: ScComSAMLightClientCtrlValueTypes
scComSAMLightClientCtrlStringValueTypeCurrentPenName 22
Pen_Name Type: string Unit: none
Name of the pen.
CCI_Return Type: int
· CCI return number, see error list.
Notes · The pen number has to be set by ScSetPen.
C# Example: Change the name of the pen:

int CCI_Return = cci.ScSetStringValue( ( int )


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlStringValueTypeCurrentPenName, "Welding" );
C# Example: Get the name of the current pen:

string Pen_Name = "";


int CCI_Return2 = cci.ScGetStringValue( ( int )
ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlStringValueTypeCurrentPenName, ref Pen_Name );
Table 68: CCI Pen Name

Pen Number Set


Get
DLL Function int CCI_Return = ScSetPen(int Pen_Number)
int CCI_Return = ScGetPen(ref int Pen_Number)
ASCII Function int CCI_Return = ScCciSetPen(int Pen_Number)
int Pen_Number = ScCciGetPen()
Description Set or get the pen number.
Pen_Number Type: int Unit: none
The pen number.
CCI_Return Type: int
CCI return number, see error list.
Notes · Pen counting starts with 1.
C# Example: Set the current pen to the pen #3:

int CCI_Return = cci.ScSetPen( 3 );


C# Example: Get the current applied pen:

int PenNumber = 0;
int CCI_Return = cci.ScGetPen( ref PenNumber );
Table 69: Pen Number

© 2022 SCAPS GmbH


Client Control Interface Manual - Pen Settings 62

Protected Pen Set


Get
DLL Function int CCI_Return = ScSetLongValue(int Value_Type, int Protected)
int Protected = ScGetLongValue(int Value_Type)
ASCII Function int CCI_Return = ScCciSetLongValue(int Value_Type, int Protected)
int Protected = ScCciGetLongValue(int Value_Type)
Description Set or get the protected pen option.
Value_Type Type: int ID:
Location: ScComSAMLightClientCtrlValueTypes
scComSAMLightClientCtrlLongValueTypeProtectedPen 102
Protected Type: int Unit: none
· 0: Disable pen protection.
· 1: Enable pen protection.
CCI_Return Type: int
· CCI return number, see error list.
Notes · The pen number has to be set by ScSetPen.
C# Example: Protect current selected pen:

int CCI_Return = cci.ScSetLongValue( ( int )


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlLongValueTypeProtectedPen, 1 );
C# Example: Check if current selected pen is protected:

int Protected = cci.ScGetLongValue( ( int )


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlLongValueTypeProtectedPen );
Table 70: Protected Pen

© 2022 SCAPS GmbH


Client Control Interface Manual - Pen Settings 63

Special Pen parameters Set


Get
DLL Function int CCI_Return = ScGetEntityStringData(string Pen_Number, int Data_ID, ref string Parameter)

ASCII Function string Parameter = ScCciGetEntityStringData(string Pen_Number, int Data_ID)

Description Returns a set of 7 pen parameters for the defined entity. The return parameters are
described below. It is possible to get the values for multiple entities.
Pen_Number Type: string Unit: none
This string can contain multiple pen numbers separated by semicolon.
Data_ID Type: int ID:
Location: ScComSAMLightClientCtrlFlags
scComSAMLightClientCtrlStringDataIdSpecialPenAndMore 34
Pen_Special Type: string Unit: depends on parameter
The separator for multiple pens is a vertical tab (\v). For each requested pen the
following seven double values with 6 decimal places separated by semicolon are
returned:
· Mark Speed [mm/s*]
· Power [Watt]
· Frequency [Hz]
· CO2_Power1 [%]
· CO2_Power2 [%]
· Pulse_Length [µ s]
· First_Pulse [µ s]
CCI_Return Type: int
CCI return number, see error list.
Notes · If the return string is send via Ethernet, it's maximum length is 512 characters.
· If you enter multiple pen numbers, this function will return sets of values for each
pen. Each set is separated by a vertical tab '\v'.
C# Example: Get the parameters for pen 1:

string Pen_Special = "";


int CCI_Return = cci.ScGetEntityStringData( "1", ( int )
ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlStringDataIdSpecialPenAndMore, ref Pen_Special );

Example for Pen_Special string:


"5000.000000;8.500000;100000.000000;50.000000;50.000000;5.000000;0.000000"
Table 71: Special Pen Parameters

5.1 Advanced Settings


The following functions can be used when pressing the Advanced ... button on the Mark property page.

· Power Map Settings


· System Pixel Map

© 2022 SCAPS GmbH


Client Control Interface Manual - Pen Settings 64

Power Map Settings Set


Get
DLL Function int CCI_Return = ScSetDoubleValue(int Value_Type, double Parameter)
double Parameter = ScGetDoubleValue(int Value_Type)
ASCII Function int CCI_Return = ScCciSetDoubleValue(int Value_Type, double Parameter)
double Parameter = ScCciGetDoubleValue(int Value_Type)
Description Set or get the relevant power map values.
Value_Type Type: int ID:
Location: ScComSAMLightClientCtrlValueTypes
scComSAMLightClientCtrlDoubleValueTypeSizePowerMap 18
Length of the power map. The value should be 16. (get only)
scComSAMLightClientCtrlDoubleValueTypePowerMapStartId 19
Returns the start value of the power map. The value should be 10000. (get only)
scComSAMLightClientCtrlDoubleValueTypeMaxPower 20
Maximum Power [Watt]. This is not used for CO2.
Parameter Type: double Unit: none
The corresponding value.
CCI_Return Type: int
CCI return number, see error list.
Notes · PowerMap lookup table ranges and units:
o for DAC_A, DAC_B and 8-bit LP: [0.0, 255.0] bit
o for CO2 duty cycle: [0.0, 100.0] %
C# Example: Set up linear PowerMap for a 10W YAG laser:

int CCI_Return_01 = cci.ScSetDoubleValue( ( int )


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlDoubleValueTypeMaxPower, 10.0 );
double Length = cci.ScGetDoubleValue( ( int )
ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlDoubleValueTypeSizePowerMap );
double Start_ID = cci.ScGetDoubleValue( ( int )
ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlDoubleValueTypePowerMapStartId );
for( int i = 0; i < (int)Length; i++ )
{
int CCI_Return_02 = cci.ScSetDoubleValue( ( int )Start_ID + i, 255.0 / ( Length - 1.0 ) * i );
}
Table 72: Power Map Settings

System Pixel Map Set


Get
DLL Function int CCI_Return = ScSetPixelMapForPen(int Pen, int Grayscale_0, int Grayscale_1, int Grayscale_2,
int Grayscale_3, int Grayscale_4, int Grayscale_5)
ASCII Function int CCI_Return = ScCciSetPixelMapForPen(int Pen, int Grayscale_0, int Grayscale_1, int
Grayscale_2, int Grayscale_3, int Grayscale_4, int Grayscale_5)
Description Set the % of grayscale values for the System Pixel Map or Pen Pixel Map.
Pen Type: int Unit: none
· [0, 255]: Pen Pixel Map of 0-based pen number
· 1111: System Pixel Map
Grayscale_0 Type: int Unit: [%]
Grayscale value of the first slider
Grayscale_1 Type: int Unit: [%]
Grayscale value of the second slider
Grayscale_2 Type: int Unit: [%]

© 2022 SCAPS GmbH


Client Control Interface Manual - Pen Settings 65

System Pixel Map Set


Get
Grayscale value of the third slider
Grayscale_3 Type: int Unit: [%]
Grayscale value of the fourth slider
Grayscale_4 Type: int Unit: [%]
Grayscale value of the fifth slider
Grayscale_5 Type: int Unit: [%]
Grayscale value of the sixth slider
CCI_Return Type: int
CCI return number, see error list.
Notes · 6 lookup control points are used.
· Range of % of grayscale values: [0.0, 100.0].
· Does not work, when Settings > System > Extras > Dynamic Grayscale Map is
enabled.
· The Pen Pixel Map can be set or get with Pen Pixel Map as well.
C# Example: Set up a linear system pixel map:

int CCI_Return = cci.ScSetPixelMapForPen( 1111, 0, 20, 40, 60, 80, 100 );


Table 73: System Pixel Map

5.2 Main
The following settings can be made under Mark Edit... Main.

· CO2 Power
· Pen Main Parameters
· Pen Enable Flags, see PenSettings
o LongDelay
o Pen Standby (RTC YAG only)
o Power Control

CO2 Power Set


Get
DLL Function int CCI_Return = ScSetDoubleValue(int Value_Type, double CO2_Power)
double CO2_Power = ScGetDoubleValue(int Value_Type)
ASCII Function int CCI_Return = ScCciSetDoubleValue(int Value_Type, double CO2_Power)
double CO2_Power = ScCciGetDoubleValue(int Value_Type)
Description Set or get the CO2 power.
ValueType Type: int ID:
Location: ScComSAMLightClientCtrlValueTypes
scComSAMLightClientCtrlDoubleValueTypeLaserCo2Power1 48
The CO2 Power1 [%]
scComSAMLightClientCtrlDoubleValueTypeLaserCo2Power2 49
The CO2 Power2 [%]
CO2_Power Type: int Unit: [%]
CO2 power value.

© 2022 SCAPS GmbH


Client Control Interface Manual - Pen Settings 66

CO2 Power Set


Get
CCI_Return Type: int
CCI return number, see error list.
Notes · The pen number has to be set by ScSetPen.
C# Example: Set the CO2 power 1 to 45.5 %:

int CCI_Return = cci.ScSetDoubleValue( ( int )


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlDoubleValueTypeLaserCo2Power1, 45.5 );
C# Example: Get the current CO2 power 1 value:

double CO2_Power1 = cci.ScGetDoubleValue( ( int )


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlDoubleValueTypeLaserCo2Power1 );
Table 74: CO2 Power

© 2022 SCAPS GmbH


Client Control Interface Manual - Pen Settings 67

Pen Main Parameters Set


Get
DLL Function int CCI_Return = ScSetDoubleValue(int Value_Type, double Parameter)
double Parameter = ScGetDoubleValue(int Value_Type)
ASCII Function int CCI_Return = ScCciSetDoubleValue(int Value_Type, double Parameter)
double Parameter = ScCciGetDoubleValue(int Value_Type)
Description Set or get various pen main parameters.
Value_Type Type: int ID:
Location: ScComSAMLightClientCtrlValueTypes
scComSAMLightClientCtrlDoubleValueTypeMarkSpeed 4
Mark speed. [mm/s]
scComSAMLightClientCtrlDoubleValueTypeFrequency 6
Frequency. [Hz]
scComSAMLightClientCtrlDoubleValueTypePulseLength 15
Pulse length. [µ s]
scComSAMLightClientCtrlDoubleValueTypeFirstPulseLength 16
First pulse length. [µ s]
scComSAMLightClientCtrlDoubleValueTypeLaserPower 17
Power [Watt]. This is not used for CO2.
scComSAMLightClientCtrlDoubleValueTypeHalfPeriod 43
Half period for standby mode. Only available for RTC and YAG. [µ s]
scComSAMLightClientCtrlDoubleValueTypeLongDelay 89
Long delay. [µ s]
Parameter Type: double Unit: depends on constant
The corresponding value.
CCI_Return Type: int
CCI return number, see error list.
Notes · The pen number has to be set by ScSetPen.
· The frequency is given in Hz here, the frequency in SAMLight is given in kHz. If the
value to be set by CCI is smaller than the given frequency limit in the Min/Max
dialog in SAMLight, the minimum will be set.
C# Example: Set the frequency to 45.0 Hz:

int CCI_Return = cci.ScSetDoubleValue( ( int )


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlDoubleValueTypeFrequency, 45.0 );
C# Example: Get the current frequency

double Frequency = cci.ScGetDoubleValue( ( int )


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlDoubleValueTypeFrequency );
Table 75: Pen Main Parameters

© 2022 SCAPS GmbH


Client Control Interface Manual - Pen Settings 68

5.3 Laser-Specials
The existence of this tab depends on the set laser type. It is named after the laser type like given in the
subchapters. There may be not a command for all laser types, but all available commands are given in the
following subchapters for the following types:

· IPG
· SPI

5.3.1 IPG
The following tab is available, if an IPG laser is configured. It can be found via Mark Edit... IPG. The
following commands can be set via CCI:

· IPG Pulse Length

IPG Pulse Length Set


Get
DLL Function int CCI_Return = ScSetDoubleValue(int Value_Type, double Pulse_Length)
double Pulse_Length = ScGetDoubleValue(int Value_Type)
ASCII Function int CCI_Return = ScCciSetDoubleValue(int Value_Type, double Pulse_Length)
double Pulse_Length = ScCciGetDoubleValue(int Value_Type)
Description Set or get the optical pulse length.
Value_Type Type: int ID:
Location: ScComSAMLightClientCtrlValueTypes
scComSAMLightClientCtrlDoubleValueTypeIPGPulseLength 123
Pulse_Length Type: double Unit: [ns]
IPG pulse length value.
CCI_Return Type: int
CCI return number, see error list.
Notes · The pen number has to be set by ScSetPen.
C# Example: Set the optical pulse length to 8.0 ns:

int CCI_Return = cci.ScSetDoubleValue( ( int )


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlDoubleValueTypeIPGPulseLength, 8.0 );
C# Example: Get the current optical pulse length:

double IPG_Pulse_Length = cci.ScGetDoubleValue( ( int )


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlDoubleValueTypeIPGPulseLength );
Table 76: IPG Pulse Length

5.3.2 SPI
The following tab is available, if an SPI laser is configured. It can be found via Mark Edit... SPI. The
following commands can be set via CCI:

· SPI CW Mode
· SPI Waveform
· SPI Simmer Value

© 2022 SCAPS GmbH


Client Control Interface Manual - Pen Settings 69

SPI CW Mode Set


Get
DLL Function int CCI_Return = ScSetLongValue(int Value_Type, int CW_Mode)
int CW_Mode = ScGetLongValue(int Value_Type)
ASCII Function int CCI_Return = ScCciSetLongValue(int Value_Type, int CW_Mode)
int CW_Mode = ScCciGetLongValue(int Value_Type)
Description Set or get the status of the CW mode.
Value_Type Type: int ID:
Location: ScComSAMLightClientCtrlValueTypes
scComSAMLightClientCtrlLongValueTypeSpiCw 21
CW_Mode Type: int Unit: none
· 0: Disable
· 1: Enable
CCI_Return Type: int
CCI return number, see error list.
Notes · The pen number has to be set by ScSetPen.
C# Example: Switch on the CW mode:

int CCI_Return = cci.ScSetLongValue( ( int )


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlLongValueTypeSpiCw, 1 );
C# Example: Get the current state of the CW mode:

int CW_Mode = cci.ScGetLongValue( ( int )


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlLongValueTypeSpiCw );
Table 77: SPI G3 CW mode

SPI Waveform Set


Get
DLL Function int CCI_Return = ScSetLongValue(int Value_Type, int Waveform)
int Waveform = ScGetLongValue(int Value_Type)
ASCII Function int CCI_Return = ScCciSetLongValue(int Value_Type, int Waveform)
int Waveform = ScCciGetLongValue(int Value_Type)
Description Set or get the waveform.
Value_Type Type: int ID:
Location: ScComSAMLightClientCtrlValueTypes
scComSAMLightClientCtrlLongValueTypeSpiWaveform 20
Waveform Type: int Unit: none
Waveform value.
CCI_Return Type: int
CCI return number, see error list.
Notes · The pen number has to be set by ScSetPen.
C# Example: Set the waveform value to 57:

int CCI_Return = cci.ScSetLongValue( ( int )


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlLongValueTypeSpiWaveform, 57 );
C# Example: Get the current waveform value:

int Wave_Form = cci.ScGetLongValue( ( int )


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlLongValueTypeSpiWaveform );
Table 78: SPI Waveform

© 2022 SCAPS GmbH


Client Control Interface Manual - Pen Settings 70

SPI Simmer Set


Get
DLL Function int CCI_Return = ScSetDoubleValue(int Value_Type, double Simmer)
double Simmer = ScGetDoubleValue(int Value_Type)
ASCII Function int CCI_Return = ScCciSetDoubleValue(int Value_Type, double Simmer)
double Simmer = ScCciGetDoubleValue(int Value_Type)
Description Set or get the simmer value for Spi Laser.
Value_Type Type: int ID:
Location: ScComSAMLightClientCtrlValueTypes
scComSAMLightClientCtrlDoubleValueTypeSpiLaserSimmer 45
Simmer Type: int Unit: [%]
Simmer value.
CCI_Return Type: int
CCI return number, see error list.
Notes · The pen number has to be set by ScSetPen.
C# Example: Set the simmer value to 100%:

int CCI_Return = cci.ScSetDoubleValue( ( int )


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlDoubleValueTypeSpiLaserSimmer, 100.0 );
C# Example: Get the current simmer value:

double Simmer = cci.ScGetDoubleValue( ( int )


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlDoubleValueTypeSpiLaserSimmer );
Table 79: SPI Simmer

5.4 Scanner
The following functions can be found under Mark Edit... Scanner:

· Pen Enable Flags, see Pen Settings


o Wobble
· Pen Scanner Parameters
· Wobble Parameters: Frequency and Amplitude

Pen Scanner Parameters Set


Get
DLL Function int CCI_Return = ScSetDoubleValue(int Value_Type, double Parameter)
double Parameter = ScGetDoubleValue(int Value_Type)
ASCII Function int CCI_Return = ScCciSetDoubleValue(int Value_Type, double Parameter)
double Parameter = ScCciGetDoubleValue(int Value_Type)
Description Set or get various pen scanner parameters.
Value_Type Type: int ID:
Location: ScComSAMLightClientCtrlValueTypes
scComSAMLightClientCtrlDoubleValueTypeJumpSpeed 5
Jump speed. [mm/s*]
scComSAMLightClientCtrlDoubleValueTypeJumpDelay 7
Jump Delay. [µ s]
scComSAMLightClientCtrlDoubleValueTypeMarkDelay 8
Mark Delay. [µ s]

© 2022 SCAPS GmbH


Client Control Interface Manual - Pen Settings 71

Pen Scanner Parameters Set


Get
scComSAMLightClientCtrlDoubleValueTypePolyDelay 9
Poly Delay. [µ s]
scComSAMLightClientCtrlDoubleValueTypeLaserOnDelay 10
Laser On Delay. [µ s]
scComSAMLightClientCtrlDoubleValueTypeLaserOffDelay 11
Laser Off Delay. [µ s]
Parameter Type: double Unit: depends on constant
The corresponding value.
CCI_Return Type: int
CCI return number, see error list.
Notes · The pen number has to be set by ScSetPen.
C# Example: Set the jump speed to 5000.0 mm/s:

int CCI_Return = cci.ScSetDoubleValue( ( int )


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlDoubleValueTypeJumpSpeed, 5000.0 );
C# Example: Get the current jump speed:

double Jump_Speed = cci.ScGetDoubleValue( ( int )


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlDoubleValueTypeJumpSpeed );
Table 80: Pen Scanner Parameters

Wobble Parameters Set


Get
DLL Function int CCI_Return = ScSetDoubleValue(int Value_Type, double Parameter)
double Parameter = ScGetDoubleValue(int Value_Type)
ASCII Function int CCI_Return = ScCciSetDoubleValue(int Value_Type, double Parameter)
double Parameter = ScCciGetDoubleValue(int Value_Type)
Description Set or get the wobble parameters.
Value_Type Type: int ID:
Location: ScComSAMLightClientCtrlValueTypes
scComSAMLightClientCtrlDoubleValueTypeWobbleFrequency 54
Wobble Frequency. [Hz]
scComSAMLightClientCtrlDoubleValueTypeWobbleAmplitude 55
Wobble Amplitude. [mm]
Parameter Type: double Unit: depends on constant
The corresponding value.
CCI_Return Type: int
CCI return number, see error list.
Notes · For wobble to work, you need to enable it first.
· The pen number has to be set by ScSetPen.
C# Example: Set the wobble amplitude to 0.5 mm:

int CCI_Return = cci.ScSetDoubleValue( ( int )


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlDoubleValueTypeWobbleAmplitude, 0.5 );
C# Example: Get the current wobble amplitude:

double Wobble_Amplitude = cci.ScGetDoubleValue( ( int )


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlDoubleValueTypeWobbleAmplitude );

© 2022 SCAPS GmbH


Client Control Interface Manual - Pen Settings 72

Table 81: Wobble Parameters

5.5 Misc
The following functions can be found under Mark Edit... Misc:

· Defocus
· Pen Enable Flags, see Pen Settings
o SkyWriting
o Defocus
o Apply power changes after jump
o RTC5/6 SkyWriting Enable
o RTC5/6 SkyWriting Mode 0x1
o RTC5/6 SkyWriting Mode 0x2
· SkyWriting parameters
· Pen MarkFlags

Defocus Set
Get
DLL Function int CCI_Return = ScSetDoubleValue(int Value_Type, double Defocus)
double Defocus = ScGetDoubleValue(int Value_Type)
ASCII Function int CCI_Return = ScCciSetDoubleValue(int Value_Type, double Defocus)
double Defocus = ScCciGetDoubleValue(int Value_Type)
Description Set or get the Defocus Value.
Value_Type Type: int ID:
Location: ScComSAMLightClientCtrlValueTypes
scComSAMLightClientCtrlDoubleValueTypeDefocus 62
Defocus Type: double Unit: [mm]*
Defocus value.
CCI_Return Type: int
CCI return number, see error list.
Notes · The pen number has to be set by ScSetPen.
· The default unit is mm, but the user can select a different unit.
C# Example: Set the defocus to 1.0 mm:

int CCI_Return = cci.ScSetDoubleValue( ( int )


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlDoubleValueTypeDefocus, 1.0 );
C# Example: Get the current defocus:

double Defocus = cci.ScGetDoubleValue( ( int )


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlDoubleValueTypeDefocus );
Table 82: Defocus

SkyWriting Parameters Set


Get
DLL Function int CCI_Return = ScSetDoubleValue(int Value_Type, double Parameter)
double Parameter = ScGetDoubleValue(int Value_Type)
ASCII Function int CCI_Return = ScCciSetDoubleValue(int Value_Type, double Parameter)
double Parameter = ScCciGetDoubleValue(int Value_Type)
Description Set or get the Skywriting parameters: Start Length, End Length and Break Angle.
Value_Type Type: int ID:

© 2022 SCAPS GmbH


Client Control Interface Manual - Pen Settings 73

SkyWriting Parameters Set


Get
Location: ScComSAMLightClientCtrlValueTypes
scComSAMLightClientCtrlDoubleValueTypeSkyWritingStartLength 5
Skywriting start length. [µ s]
scComSAMLightClientCtrlDoubleValueTypeSkyWritingEndLength 7
Skywriting end length. [µ s]
scComSAMLightClientCtrlDoubleValueTypeSkyWritingBreakAngle 8
Skywriting break angle. [deg]
Parameter Type: double Unit: depends on constant
The corresponding value.
CCI_Return Type: int
CCI return number, see error list.
Notes · The pen number has to be set by ScSetPen.
C# Example: Set the SkyWriting start length to 200.0 µs:

int CCI_Return = cci.ScSetDoubleValue( ( int )


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlDoubleValueTypeSkyWritingStartLength, 200.0 );
C# Example: Get the current SkyWriting start length:

double SkyWriting_Start_Length = cci.ScGetDoubleValue( ( int )


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlDoubleValueTypeSkyWritingStartLength );
Table 83: SkyWriting Parameters

Pen Mark Flags Set


Get
DLL Function int CCI_Return = ScSetLongValue(int Value_Type, int Pen_Mark_Flags)
int Pen_Mark_Flags = ScGetLongValue(int Value_Type)
ASCII Function int CCI_Return = ScCciSetLongValue(int Value_Type, int Pen_Mark_Flags)
int Pen_Mark_Flags = ScCciGetLongValue(int Value_Type)
Description Set or get the pen mark flags.
Value_Type Type: int ID:
Location: ScComSAMLightClientCtrlValueTypes
scComSAMLightClientCtrlLongValueTypeMarkMode 107
Pen_Mark_Flags Type: int Flag:
Location: None
scComStandardDeviceMiscPenPathsAndMarkModeFlagSkipContour 0x10000
Contour Disable.
scComStandardDeviceMiscPenPathsAndMarkModeFlagSkipHatch1 0x20000
Hatch1 Disable.
scComStandardDeviceMiscPenPathsAndMarkModeFlagSkipHatch2 0x30000
Hatch2 Disable.
CCI_Return Type: int
CCI return number, see error list.
Notes · The flags are skip flags and inverse to the checkboxes in SAMLight.
· The pen number has to be set by ScSetPen.
· To prevent incorrect operation please read chapter How to work with flags.

© 2022 SCAPS GmbH


Client Control Interface Manual - Pen Settings 74

Pen Mark Flags Set


Get
C# Example: Enable contour and don't change all other flags:

int Pen_Mark_Flags = cci.ScGetLongValue( ( int )


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlLongValueTypeMarkMode );
Pen_Mark_Flags = Pen_Mark_Flags & ~0x10000;
int CCI_Return = cci.ScSetLongValue( ( int )
ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlLongValueTypeMarkMode, Pen_Mark_Flags );
C# Example: Disable contour and don't change all other flags:

int Pen_Mark_Flags = cci.ScGetLongValue( ( int )


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlLongValueTypeMarkMode );
Pen_Mark_Flags = Pen_Mark_Flags | 0x10000;
int CCI_Return = cci.ScSetLongValue( ( int )
ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlLongValueTypeMarkMode, Pen_Mark_Flags );
Table 84: Pen Mark Flags

5.6 Drill
The following commands can be found under Mark Edit... Drill:

· Drill Double Values


· Drill Long Values
· Pen Enable Flags, see Pen Settings
o CO2Power
o Drill
o Point Power Map
o Use Geometry

Drill Double Values Set


Get
DLL Function int CCI_Return = ScSetDoubleValue(int Value_Type, double Parameter)
double Parameter = ScGetDoubleValue(int Value_Type)
ASCII Function int CCI_Return = ScCciSetDoubleValue(int Value_Type, double Parameter)
double Parameter = ScCciGetDoubleValue(int Value_Type)
Description Set or get the various pen drill parameters.
Value_Type Type: int ID:
Location: ScComSAMLightClientCtrlValueTypes
scComSAMLightClientCtrlDoubleValueTypeDrillPeriod 72
Drill Period (1/Frequency). For CO2 Laser: Laser1. [µ s]
scComSAMLightClientCtrlDoubleValueTypeDrillDuration 73
Drill Duration in [µs]. The unit displayed in SAMLight is different: [ms].
scComSAMLightClientCtrlDoubleValueTypeDrillLength 74
Pulse width. For CO2 laser: Laser2. [µ s]
scComSAMLightClientCtrlDoubleValueTypeDrillJumpSpeed 75
Jump speed. [mm/s]
scComSAMLightClientCtrlDoubleValueTypeDrillJumpDelay 76
Jump delay. [µ s]
scComSAMLightClientCtrlDoubleValueTypeDrillCo2HalfPeriod 79
For CO2 laser: HalfPeriod in [µs] to manipulate the Frequency.

© 2022 SCAPS GmbH


Client Control Interface Manual - Pen Settings 75

Drill Double Values Set


Get
Frequency = 1 / ( 2 * HalfPeriod )
scComSAMLightClientCtrlDoubleValueTypeDrillMarkLineAsDotsGridX 126
X grid size of Mark Lines as Dots. [mm]*
scComSAMLightClientCtrlDoubleValueTypeDrillMarkLineAsDotsGridY 127
Y grid size of Mark Lines as Dots. [mm]*
Parameter Type: int Unit: depends on constant
The corresponding value.
CCI_Return Type: int
CCI return number, see error list.
Notes · The pen number has to be set by ScSetPen.
· The function drill must be enabled first
C# Example: Set drill duration to 250.0 µs:

int CCI_Return = cci.ScSetDoubleValue( ( int )


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlDoubleValueTypeDrillDuration, 250.0 );
C# Example: Get drill duration:

double Drill_Duration = cci.ScGetDoubleValue( ( int )


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlDoubleValueTypeDrillDuration );
Table 85: Drill Double Values

Drill Long Values Set


Get
DLL Function int CCI_Return = ScSetLongValue(int Value_Type, int Parameter)
int Parameter = ScGetLongValue(int Value_Type)
ASCII Function int CCI_Return = ScCciSetLongValue(int Value_Type, int Parameter)
int Parameter = ScCciGetLongValue(int Value_Type)
Description Set or get the various pen drill parameters.
Value_Type Type: int ID:
Location: ScComSAMLightClientCtrlValueTypes
scComSAMLightClientCtrlLongValueTypeDrillEnableCo2Power 56
CO2 Power Enable.
scComSAMLightClientCtrlLongValueTypeDrillMarkLineAsDotsActive 101
Mark line as dots enable.
Parameter Type: int Unit: none
· 0: Disable.
· 1: Enable.
CCI_Return Type: int
CCI return number, see error list.
Notes · The pen number has to be set by ScSetPen.
C# Example: Enable the mark line as dots:

int CCI_Return = cci.ScSetLongValue( ( int )


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlLongValueTypeDrillMarkLineAsDotsActive, 1 );
C# Example: Get the mark line as dots enable state:

© 2022 SCAPS GmbH


Client Control Interface Manual - Pen Settings 76

Drill Long Values Set


Get
int Mark_Line_As_Dots_Enable = cci.ScGetLongValue( ( int )
ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlLongValueTypeDrillMarkLineAsDotsActive );
Table 86: Drill Long Values

5.7 Ramping
The following commands can be found under Mark Edit... Ramping:

· Ramping Checkboxes
· Ramping Double Parameters

Ramping Checkboxes Set


Get
DLL Function int CCI_Return = ScSetLongValue(int Value_Type, int Ramp_Active)
int Ramp_Active = ScGetLongValue(int Value_Type)
ASCII Function int CCI_Return = ScCciSetLongValue(int Value_Type, int Ramp_Active)
int Ramp_Active = ScCciGetLongValue(int Value_Type)
Description Enable/disable the Ramping regimes.
Value_Type Type: int ID:
Location: ScComSAMLightClientCtrlValueTypes
scComSAMLightClientCtrlLongValueTypeLineRampingPowerStartRampActive 22
Power ramping start enable.
scComSAMLightClientCtrlLongValueTypeLineRampingPowerEndRampActive 23
Power ramping end enable.
scComSAMLightClientCtrlLongValueTypeLineRampingSpeedStartRampActive 24
Speed ramping start enable.
scComSAMLightClientCtrlLongValueTypeLineRampingSpeedEndRampActive 25
Speed ramping end enable.
scComSAMLightClientCtrlLongValueTypeLineRampingLengthenStartActive 26
Enable length start active.
scComSAMLightClientCtrlLongValueTypeLineRampingLengthenEndActive 27
Enable length end active.
Ramp_Active Type: int Unit: none
· 0: Disable Ramping.
· 1: Enable Ramping.
CCI_Return Type: int
CCI return number, see error list.
Notes · The pen number has to be set by ScSetPen.
C# Example: Enable power ramping start:

int CCI_Return = cci.ScSetLongValue( ( int )


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlLongValueTypeLineRampingPowerStartRampActive,
1 );
C# Example: Check power ramping start enable state:

© 2022 SCAPS GmbH


Client Control Interface Manual - Pen Settings 77

Ramping Checkboxes Set


Get
int Power_Ramping_Start_Enable = cci.ScGetLongValue( ( int )
ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlLongValueTypeLineRampingPowerStartRampActive );
Table 87: Ramping Checkboxes

Ramping Double Parameters Set


Get
DLL Function int CCI_Return = ScSetDoubleValue(int Value_Type, double Power_Ramp)
double Power_Ramp = ScGetDoubleValue(int Value_Type)
ASCII Function int CCI_Return = ScCciSetDoubleValue(int Value_Type, double Power_Ramp)
double Power_Ramp = ScCciGetDoubleValue(int Value_Type)
Description Set or get the Power Ramping parameters.
Value_Type Type: int ID:
Location: ScComSAMLightClientCtrlValueTypes
scComSAMLightClientCtrlDoubleValueTypeLineRampingPowerStartRampValue 26
Power Ramping Start Power. [%]
scComSAMLightClientCtrlDoubleValueTypeLineRampingPowerStartRampLength 27
Power Ramping Start Length. [mm]*
scComSAMLightClientCtrlDoubleValueTypeLineRampingPowerEndRampValue 28
Power Ramping End Power. [%]
scComSAMLightClientCtrlDoubleValueTypeLineRampingPowerEndRampLength 29
Power Ramping End Length. [mm]*
scComSAMLightClientCtrlDoubleValueTypeLineRampingSpeedStartRampValue 30
Speed Ramping Start Power. [%]
scComSAMLightClientCtrlDoubleValueTypeLineRampingSpeedStartRampLength 31
Speed Ramping Start Speed. [mm]*
scComSAMLightClientCtrlDoubleValueTypeLineRampingSpeedEndRampValue 32
Speed Ramping End Power. [%]
scComSAMLightClientCtrlDoubleValueTypeLineRampingSpeedEndRampLength 33
Speed Ramping End Speed. [mm]*
scComSAMLightClientCtrlDoubleValueTypeLineRampingLengthenStart 60
Auto Lengthen Start Ramp. [mm]*
scComSAMLightClientCtrlDoubleValueTypeLineRampingLengthenEnd 61
Auto Lengthen End Ramp. [mm]*
Power_Ramp Type: double Unit: depends on constant
Insert the corresponding value.
CCI_Return Type: int
CCI return number, see error list.
Notes · The pen number has to be set by ScSetPen.
· Ramping must be enabled before.
C# Example: Set the power ramping start power start to 60.0%:

int CCI_Return = cci.ScSetDoubleValue( ( int )


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlDoubleValueTypeLineRampingPowerStartRampValue,
60.0 );
C# Example: Get the power ramping start power:

© 2022 SCAPS GmbH


Client Control Interface Manual - Pen Settings 78

Ramping Double Parameters Set


Get
double Power_Ramping_Start_Power = cci.ScGetDoubleValue( ( int )
ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlDoubleValueTypeLineRampingPowerStartRampValue );
Table 88: Ramping Double Parameters

5.8 Path
The following command can be found under Mark Edit... Path

· Pen Path

Pen Path Set


Get
Function int CCI_Return = ScSetPenPathForPen(ref short Master_Pen, ref short Enable, ref short Pen_1, ref
int Loop_Pen_1, ref short Pen_2, ref int Loop_Pen_2, ref short Pen_3, ref int Loop_Pen_4, ref
short Pen_4, ref int Loop_Pen_1, ref short Pen_5, ref int Loop_Pen_5)
int CCI_Return = ScGetPenPathForPen(ref short Master_Pen, ref short Enable, ref short Pen_1,
ref int Loop_Pen_1, ref short Pen_2, ref int Loop_Pen_2, ref short Pen_3, ref int Loop_Pen_4, ref
short Pen_4, ref int Loop_Pen_1, ref short Pen_5, int Loop_Pen_5)
ASCII -
Description Get or set the pen path settings.
Master_Pen Type: short Unit: none
Pen number for which the pen path settings are set or get.
Enable Type: short Unit: none
· 0: Enable
· 1: Disable
Pen_1 Type: short Unit: none
Pen number for the first pen path loops.
Loop_Pen_1 Type: int Unit: none
Number of loops with Pen_1.
Pen_2 Type: short Unit: none
Pen number for the second pen path loops.
Loop_Pen_2 Type: int Unit: none
Number of loops with Pen_2.
Pen_3 Type: short Unit: none
Pen number for the third pen path loops.
Loop_Pen_3 Type: int Unit: none
Number of loops with Pen_3.
Pen_4 Type: short Unit: none
Pen number for the fourth pen path loops.
Loop_Pen_4 Type: int Unit: none
Number of loops with Pen_4.
Pen_5 Type: short Unit: none
Pen number for the fifth pen path loops.
Loop_Pen_5 Type: int Unit: none
Number of loops with Pen_5.

© 2022 SCAPS GmbH


Client Control Interface Manual - Pen Settings 79

Pen Path Set


Get
CCI_Return Type: int
CCI return number, see error list.
Notes -
C# Example: Set the following pen path paramters for master pen 1: enable pen path, 15 loops with pen 9,
11 loops with pen 11, 15 loops with pen 9, 11 loops with pen 11, 15 loops with pen 9:

sc_com_pen_path Pen_Path = new sc_com_pen_path();


Pen_Path.penToUse = new short[ 5 ];
Pen_Path.loopOfPenToUse = new int[ 5 ];
Pen_Path.pen = 1;
Pen_Path.enable = 1;
Pen_Path.penToUse[ 0 ] = 9;
Pen_Path.loopOfPenToUse[ 0 ] = 15;
Pen_Path.penToUse[ 1 ] = 11;
Pen_Path.loopOfPenToUse[ 1 ] = 11;
Pen_Path.penToUse[ 2 ] = 9;
Pen_Path.loopOfPenToUse[ 2 ] = 15;
Pen_Path.penToUse[ 3 ] = 11;
Pen_Path.loopOfPenToUse[ 3 ] = 11;
Pen_Path.penToUse[ 4 ] = 9;
Pen_Path.loopOfPenToUse[ 4 ] = 15;
int CCI_Return = cci.ScSetPenPathForPen( ref Pen_Path.pen, ref Pen_Path.enable, ref
Pen_Path.penToUse[ 0 ], ref Pen_Path.loopOfPenToUse[ 0 ], ref Pen_Path.penToUse[ 1 ], ref
Pen_Path.loopOfPenToUse[ 1 ], ref Pen_Path.penToUse[ 2 ], ref Pen_Path.loopOfPenToUse[ 2 ], ref
Pen_Path.penToUse[ 3 ], ref Pen_Path.loopOfPenToUse[ 3 ], ref Pen_Path.penToUse[ 4 ], ref
Pen_Path.loopOfPenToUse[ 4 ] );
C# Example: Get pen path parameters for master pen 1:

sc_com_pen_path penPath = new sc_com_pen_path();


penPath.penToUse = new short[ 5 ];
penPath.loopOfPenToUse = new int[ 5 ];
penPath.pen = 1;
int CCI_Return = cci.ScGetPenPathForPen( ref penPath.pen, ref penPath.enable, ref penPath.penToUse[ 0 ],
ref penPath.loopOfPenToUse[ 0 ], ref penPath.penToUse[ 1 ], ref penPath.loopOfPenToUse[ 1 ], ref
penPath.penToUse[ 2 ], ref penPath.loopOfPenToUse[ 2 ], ref penPath.penToUse[ 3 ], ref
penPath.loopOfPenToUse[ 3 ], ref penPath.penToUse[ 4 ], ref penPath.loopOfPenToUse[ 4 ] );
Table 89: Pen Path

5.9 Bitmap
The following command can be found under Mark Edit... Bitmap:

· Bitmap Settings
· Pen Enable Flags, see Pen Settings
o Pixel Hardware Mode
o Pen PixelMap
o Pen Power as Max Power
o Use Vector Delays
· Pen Pixel Map

Bitmap Settings Set


Get
DLL Function int CCI_Return = ScSetLongValue(int Value_Type, int Parameter)
int Parameter = ScGetLongValue(int Value_Type)
ASCII Function int CCI_Return = ScCciSetLongValue(int Value_Type, int Parameter)
int Parameter = ScCciGetLongValue(int Value_Type)

© 2022 SCAPS GmbH


Client Control Interface Manual - Pen Settings 80

Bitmap Settings Set


Get
Description Set or get bitmap related checkboxes from Bitmap Properties page in pen settings.
Value_Type Type: int ID:
Location: ScComSAMLightClientCtrlValueTypes
scComSAMLightClientCtrlLongValueTypeBitmapPixelHardwareMode 89
Pixel Hardware Mode Enable.
scComSAMLightClientCtrlLongValueTypeBitmapPenPowerAsMaxPower 90
Pen Power as Max Power Enable.
Parameter Type: int Unit: none
· 0: Disable
· 1: Enable
CCI_Return Type: int
CCI return number, see error list.
Notes · The pen number has to be set by ScSetPen.
· Both checkboxes can be set and get with Pen Enable Flags as well.
C# Example: Enable the pixel hardware mode:

int CCI_Return = cci.ScSetLongValue( ( int )


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlLongValueTypeBitmapPixelHardwareMode, 0 );
C# Example: Get the pixel hardware mode enable state:

int Pixel_Hardware_Mode = cci.ScGetLongValue( ( int )


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlLongValueTypeBitmapPixelHardwareMode );
Table 90: Bitmap Settings

Pen Pixel Map Set


Get
DLL Function int CCI_Return = ScSetDoubleValue(int Value_Type, double Grayscale)
double Grayscale = ScGetDoubleValue(int Value_Type)
ASCII Function int CCI_Return = ScCciSetDoubleValue(int Value_Type, double Grayscale)
double Grayscale = ScCciGetDoubleValue(int Value_Type)
Description Set or get the grayscale values for the Pen Pixel Map.
Value_Type Type: int ID:
Location: ScComSAMLightClientCtrlValueTypes
scComSAMLightClientCtrlDoubleValueTypeStyleIDPixelMapZone 4096
Range of StyleIDPixelMapZone IDs: [4096, 4101].
Grayscale Type: double Unit: [%]
Grayscale value in the range [0.0, 100.0].
CCI_Return Type: int
CCI return number, see error list.
Notes · 6 lookup control points are used.
· Does not work, when Settings > System > Extras > Dynamic Grayscale Map is
enabled.
· The pen number has to be set by ScSetPen.
· It is also possible to set the Pen Pixel Map with System Pixel Map as well.
C# Example: Set up a linear pen pixel map:

double[] Pen_Pixel_Map = { 0.0, 20.0, 40.0, 60.0, 80.0, 100.0 };

© 2022 SCAPS GmbH


Client Control Interface Manual - Pen Settings 81

Pen Pixel Map Set


Get
for( int i = 0; i < 6; i++ )
{
int CCI_Return = cci.ScSetDoubleValue( ( int )
ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlDoubleValueTypeStyleIDPixelMapZone + i,
Pen_Pixel_Map[ i ] );
}
Table 91: Pen Pixel Map

6 Job
The following chapter gos through the main functions to create and edit jobfiles. This chapter is divided into
different subchapters:

· Entity Objects
· Entities Properties
· Data Wizard

The following main commands are described in this sub chapter:

· Create New Job


· Execute Flash Command
· Export File
· Flash Job Access
· Import File
· Job Path
· Job is in field
· Job Preview
· Load Job
· Lock Dongle
· Save Job
· Sort Entities
· UNDO

Create New Job Set


Get
DLL Function int CCI_Return = ScExecCommand(int Cmd_ID)

ASCII Function int CCI_Return = ScCciExecCommand(int Cmd_ID)

Description Remove the current job and creates a new one with empty working area.
Cmd_ID Type: int ID:
Location:ScComSAMLightClientCtrlExecCommandConstants
scComSAMLightClientCtrlExecCommandNewJob 3
CCI_Return Type: int
CCI return number, see error list.
Notes · ScCciNewJob() is deprecated, please use this ExecCommand.
· The removed jobfile exists on last saving state.
C# Example: Create new job:

int CCI_Return = cci.ScExecCommand((int)


ScComSAMLightClientCtrlExecCommandConstants.scComSAMLightClientCtrlExecCommandNewJob);
Table 92: Create New Job

© 2022 SCAPS GmbH


Client Control Interface Manual - Job 82

Execute Flash Command Set


Get
DLL Function int CCI_Return = ScFlashCommand(string Command, int Flag, ref string Return)

ASCII Function -
Description Executes a command in the flash mode. Return is an empty string variable that you
have to declare in advance.
Command Type: string Unit: none
The string Command is the flash command as you would type it in inside the flash
dialog window and it has to be terminated by the ASCII characters 13 and 10 (Return
and LineFeed). For the flash commands see the corresponding hardware manual.
Flag Type: int Unit: none
Flags can be 0 or -2147483648. If 0, the client control waits until a carriage return
from the Flash. If -2147483648 is set the client control will wait a certain time and
then end the command.
Return Type: string Unit: none
Standard Flash error codes.
CCI_Return Type: int
CCI return number, see error list.
Notes · Some of the commands require the flash license. Further information is given in
the Flash command interface documentation.
C# Example: Start marking:

string Return = "";


int CCI_Return = cci.ScFlashCommand("M 1\r\n", 0, ref Return);
Table 93: Execute Flash Commands

Export File Set


Get
DLL Function int CCI_Return = ScExport(string Entity_Name, string File_Name, string File_Type, double
Resolution, int Flag)
ASCII Function -
Description Exports the job file or the specified entity to FileName.
Entity_Name Type: string Unit: none
If Entity_Name is "" then the whole job is exported.
File_Name Type: string Unit: none
The full path where the exported job should be saved to.
File_Type Type: string Unit: none
Can be "saf", "plt" or "cnc".
Resolution Type: double Unit: none
Resolution should be set to 0.001 to keep the original size of the job.
Flag Type: int Flag:
Location: None
scComLayerFile2DStyleExportPolyLines 0x10
The poly lines will be exported.
scComLayerFile2DStyleExportLineArrays 0x20
The line arrays will be exported.
scComLayerFile2DStyleCheckOrientation 0x40
-- has no function, can be ignored --

© 2022 SCAPS GmbH


Client Control Interface Manual - Job 83

Export File Set


Get
scComLayerFile2DStyleWritePens 0x100
The pens will be exported.
scComLayerFile2DStyleExportOnlySelected 0x400
Only the entities selected in the View will be exported.
scComLayerFile2DStyleWritePreview 0x2000
The job preview will be exported.
CCI_Return Type: int
CCI return number, see error list.
Notes · This Flags value is usually a combination of multiple flags. Be sure not to
accidentally overwrite the previous flags. See the chapter How to work with flags to
learn more about combining multiple flags.
· When using this command in SAM3D, the last two arguments (Resolution and
Flags) have to be 0. Exports the layer styles table of the ScLayerSolid entity
specified with Entity_Name to the *.txt file FileName. Please use 'style' as Type.
Exports the slices with Entity type ScLayerSolid to a specified path with
fileName.cli and format *cli. Only one ScLayerSolid can be exported at a time.
C# Example: Export the whole job with including the pen settings and poly lines:

string FileName = "C:/Users/Support/Desktop/ExportJob.plt";


int flags = 0X10;
flags |= 0x100;
int CCI_Return = cci.ScExport("", FileName, "plt", 0.001, flags);
Table 94: Export File

Flash Job Access Set


Get
DLL Function int CCI_Return = ScProcessFlashJob(string File_Name, int Job_Num, int Mode, int Flag)

ASCII Function int CCI_Return = ScCciProcessFlashJob(string File_Name, int Job_Num, int Mode, int Flag)

Description This command allows you to access the flash jobs, see Flash Jobs and Settings. Flag
must be 0.
File_Name Type: string Unit: none
Defines the complete path to the UNF file.
Job_Number Type: int Unit: none
Defines the Flash Job Number.
Mode Type: int Index:
Location: ScComSAMLightClientCtrlFlags
scComSAMLightClientCtrlProcessFlashJobModeStoreCurrentToFlash 0x1
For standalone mode, the Flash job (UNF) is created from the SAMLight job (SJF)
together with a subset of the SAMLight settings and is saved on the USC card and in
<SCAPS>\jobfiles. This means, the creation of the identical UNF from the SJF always
requires identical SAMLight settings. Furthermore, a copy of the SJF is also stored on
the USC card. This mode of ScProcessFlashJob is only possible if the SJF already
exists.
· JobNum defines the flash job number. FileName and Flags are not used.
scComSAMLightClientCtrlProcessFlashJobModeLoadFromFlash 0x2
Loads the copy of the SJF job (which is stored on the USC) to SAMLight. JobNum
defines the flash job number. However, the USC settings and the UNF cannot be
loaded to SAMLight.

© 2022 SCAPS GmbH


Client Control Interface Manual - Job 84

Flash Job Access Set


Get
· Please note: Different SAMLight settings in combination with the same SJF will
lead to different UNFs.
· FileName and Flags are not used.
scComSAMLightClientCtrlProcessFlashJobModeStoreFromDiskToFlash 0x3
Saves a job (*.unf or *.cnc) from hard disc (PC) to the USC flash.
· JobNum defines the flash job number.
· FileName defines the complete path to the UNF file.
· Flags are not used.
scComSAMLightClientCtrlProcessFlashJobModeLoadFromFlashToDisk 0x5
Saves a job (*.unf) from the USC flash to hard disc (PC).
· JobNum defines the flash job number.
· FileName defines the complete path to the UNF file.
· Flags are not used.
Flag Type: int Unit: none
Has to be 0.
CCI_Return Type: int
CCI return number, see error list.
Notes · An Index can not be combined.
C# Example: Save the job to the USC flash memory:

int Filename = "C:/Users/Support/Desktop/job2.unf";


int CCI_Return = cci.ScProcessFlashJob(FileName, 2, (int)
ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlProcessFlashJobModeStoreFromDiskToFlash, 0);
Table 95: Flash Job Access

Import File Set


Get
DLL Function int CCI_Return = ScImport(string Entity_Name, string File_Name, string File_Type, double
Resolution, int Flag)
ASCII Function int CCI_Return = ScCciImport(string Entity_Name, string File_Name, string File_Type, double
Resolution, int Flag)
Description Imports a file from the path FileName.
Entity_Name Type: string Unit: none
The name of the new entity.
File_Name Type: string Unit: none
The full path to the file to import.
File_Type Type: string Unit: none
· File_Type can be "ai", "bmp", "cli" "cmx", "cnc", "dxf", "dxf2", "emf", "gif", "jpg",
"mcl", "pcx", "plt", "png", "saf", "slc", "stl", "style", "svg", "tga", "tif", "twain" or "txt".
· With "style" a layer styles table can be imported. In this case Entity_Name
specifies which ScLayerSolid entity you want to assign to this style table and
File_Name has to be a file path to a *.txt file.
Resolution Type: double Unit: mm
Resolution only has an impact if the File_Type is "plt". It should be set to 0.001 to
keep the original size.
Flag Type: int Flag:
Location: ScComSAMLightClientCtrlFlags
scComSAMLightClientCtrlImportFlagKeepOrder 0x8

© 2022 SCAPS GmbH


Client Control Interface Manual - Job 85

Import File Set


Get
Keep the order of the entities.
scComSAMLightClientCtrlImportFlagReadPenInfo 0x80
Read pen information.
scComSAMLightClientCtrlImportFlagGcodeLoadPenParameters 0x2000
ScSetHead before. See Import Advanced for CNC.
scComSAMLightClientCtrlImportFlagGcodeLoadOpticParameters 0x4000
Load optic parameters of a CNC file to the head specified with ScSetHead before.
See Import Advanced for CNC.
scComSAMLightClientCtrlImportFlagPointCloud 0x4000
Import of points into PointClouds.
scComSAMLightClientCtrlImportFlagNotTryToClose 0x20000
Do not try to close polygons. This option applies to HPGL type files only.
scComSAMLightClientCtrlImportFlagOptimized 0x80000
Only for HPGL files: Will do the same as the checkbox in the import dialog: Closing
Polylines which end close to each other and delete double ones or ones that are very
short.
scComSAMLightClientCtrlImportFlagBitmapReimport 0x100000
Reimports a Bitmap with Entity_Name. If the position should be kept, the Bitmap has
to be a scanner bitmap and the position has to be enabled and set in the bitmap
extended dialogue. In this case the center coordinates can be defined.
scComSAMLightClientCtrlImportFlagDontUpdateView 0x200000
Do not update view when importing. This can be used to import several files quickly
and update the view manually after the last import has been done.
scComSAMLightClientCtrlImportFlagVectorReimport 0x800000
Reimports Vector Graphics like DXF and PLT with Entity_Name. EntityLevel and
assigned pen are preserved, position and sizes must be reset.
scComSAMLightClientCtrlImportFlagToplevelOnly 0x100000
0
Reimports only entities in the first level of the job.
scComSAMLightClientCtrlImportFlagFillWithDefaultHatchStyle 0x200000
0
Only for SVG files. Will do the same as the checkbox in the import dialog: Hatch
filled objects with the default hatch.
scComSAMLightClientCtrlImportFlagNoErrorMsg 0x400000
0
Suppresses Error Messages.
scComSAMLightClientCtrlImportFlagCreateOneGroup 0x800000
0
Automatically do Data Wizard --> Create One Group.
scComSAMLightClientCtrlImportFlagCenterToField 0x10000000

Center the import in the View2D.


scComSAMLightClientCtrlImportFlagImportToPenGroups 0x20000000

Will do the same as the checkbox in the import dialog.


scComSAMLightClientCtrlImportFlagUsePenColors 0x40000000

Will do the same as the checkbox in the import dialog. This should be used with
command 128.

© 2022 SCAPS GmbH


Client Control Interface Manual - Job 86

Import File Set


Get
scComSAMLightClientCtrlImportFlagProtected 0x80000000

Polyline and LineArray entites imported with this flag will not be shown in the View2D
and will not be splitted. Vectors of entities imported with this flag will not be stored in
a *.sjf file. However, it is possible to remember the last position of the protected
entities within the *.sjf file. If you re-import an entity with the same name, the old
position will be adjusted automatically. Protected entities can be rotated and
translated but not scaled. The redpointer pre-view will only show the outline of
protected entities. Pen and hatch properties of protected entities cannot be changed.
If at least one protected entity is present within the entity list the mark preview is not
possible anymore. They cannot be copied, duplicated or grouped.
CCI_Return Type: int
CCI return number, see error list.
Notes · This Flags value is usually a combination of multiple flags. Be sure not to
accidentally overwrite the previous flags. See the chapter How to work with flags to
learn more about combining multiple flags.
· When using this command in SAM3D, the last two arguments (Resolution and
Flags) have to be 0.>
C# Example: Reimport a bitmap file:

int CCI_Return = cci.ScImport("BackgroundImage", "C:\\TestBitmap.bmp", "bmp", 1, (int)


ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlImportFlagBitmapReimport);
Table 96: Import File

Job Path Set


Get
DLL Function int CCI_Return = ScGetStringValue(int Value_Type, ref string Job_Path)

ASCII Function string Job_Path = ScCciGetStringValue(int Value_Type)

Description Get the name of the current job file with its complete path.
Value_Type Type: int ID:
Location: ScComSAMLightClientCtrlValueTypes
scComSAMLightClientCtrlStringValueTypeJobFileName 4
Job_Path Type: string
Returns the name of the current job file with its complete path.
CCI_Return Type: int
CCI return number, see error list.
Notes -
C# Example: Get job file name and path:

string JobPath = "";


int CCI_Return = cci.ScGetStringValue((int)
ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlStringValueTypeJobFileName, ref JobPath);
Table 97: Job Path

Job Preview Set


Get
DLL Function int CCI_Return = ScGetPreviewImage(string Job_File_Name, string Bitmap_File_Name)

ASCII Function int CCI_Return = ScCciGetPreviewImage(string Job_File_Name, string Bitmap_File_Name)

Description Get a preview bitmap image of a *.sjf job file to the local hard disc. JobFileName and
BmpFileName includes the complete paths. The size of the resulting bitmap is 100 x
100 pixel.

© 2022 SCAPS GmbH


Client Control Interface Manual - Job 87

Job Preview Set


Get
Job_File_Name Type: string Unit: none
Enter the complete job path here
Bitmap_File_Name Type: string Unit: none
Enter the complete path, where you want to store the bitmap preview image
CCI_Return Type: int
CCI return number, see error list.
Notes · The job will not be load into SAMLight during the generation of the bmp.
C# Example: Save a preview of the job on the desktop:

string JobFileName = "C:/Users/Support/Desktop/CircleJob.sjf";


string BmpFileName = "C:/Users/Support/Desktop/PreviewCircleJob.bmp";
int CCI_Return = cci.ScGetPreviewImage(JobFileName, BmpFileName);
Table 98: Job Preview

Job In Field Set


Get
DLL Function int Is_In_Field = ScExecCommand(int Cmd_ID)

ASCII Function int Is_In_Field = ScCciExecCommand(int Cmd_ID)

Description Check, if the job is inside the Working Field.


Cmd_ID Type: int ID:
Location:ScComSAMLightClientCtrlExecCommandConstants
scComSAMLightClientCtrlExecCommandCheckIfJobIsInField 40
Is_In_Field Type: int
· 0: Job is not inside the field.
· 1: Job is inside the field.
Notes -
C# Example: Check if job in field:

int is_In_Field = cci.ScExecCommand( ( int )


ScComSAMLightClientCtrlExecCommandConstants.scComSAMLightClientCtrlExecCommandCheckIfJobIsInField );
Table 99: Job In Field

Load Job Set


Get
DLL Function int CCI_Return = ScLoadJob(string File_Name, int Load_Entitie, int Overwrite_Entity, int
Load_Material)
ASCII Function int CCI_Return = ScCciLoadJob(string File_Name, int Load_Entitie, int Overwrite_Entity, int
Load_Material)
Description Loads the SJF or S3D job file specified by FileName into the controlled scanner
application. A SJF job file can contain graphical data (entities) and / or scanner and
laser parameters (materials).
File_Name Type: string Unit: none
Enter the full path of the job file
Load_Entity Type: int Unit: none
If the parameter Load_Entity is set to 1, the entities contained in the job will be
loaded.
Overwrite_Entity Type: int Unit: none

© 2022 SCAPS GmbH


Client Control Interface Manual - Job 88

Load Job Set


Get
If the parameter Overwrite_Entity is set to 1, the current job will be cleared before
the new one is loaded. If Overwrite_Entities is set to 0, it is possible to merge the
graphical information of different jobs. For S3D job files only the Overwrite_Entity
parameter is valid to control if the jobs have to be merged 0 or not 1. The
parameters Load_Entity and Load_Materials are ignored.
Load_Material Type: int Unit: none
If the parameter Load_Material is set to 1, the scanner parameters will be loaded
with the job.
CCI_Return Type: int
CCI return number, see error list.
Notes · All three parameters have to be defined, when executing this command.
· With the additional parameters it is possible to load only the graphical data
(LoadEntities=1, LoadMaterials=0) or to load only the scanner parameters
(LoadEntities=0, LoadMaterials=1) or load both (LoadEntities=1, LoadMaterials=1).
· If you want to load a*.s3d file set all int parameters equal to 1.
C# Example: Load the job, overwriting existing entities and loading all the materials:

string FileName = "C:/Users/Support/Desktop/CircleJob.sjf";


int CCI_Return = cci.ScLoadJob(FileName, 1, 1, 1);
Table 100: Load Job

Lock Dongle Set


Get
DLL Function int CCI_Return = ScSetLongValue(int Value_Type, int Flag)
int Flag = ScGetLongValue(int Value_Type)
ASCII Function int CCI_Return = ScCciSetLongValue(int Value_Type, int Flag)
int Flag = ScCciGetLongValue(int Value_Type)
Description Set or get the flags, allowing to lock a SJF job file to specific dongles.
Value_Type Type: int ID:
Location: ScComSAMLightClientCtrlValueTypes
scComSAMLightClientCtrlLongValueTypeSetLockSjfToDongleFlag 66
s
Flag Type: int Flag:
Location: None
scComSAMLightClientCtrlLockToDongleFlagLockLoadToSystemId 0x1
Locks the SJF job file to the Dongle ID (System ID, Card ID).
scComSAMLightClientCtrlLockToDongleFlagLockLoadToUserId 0x2
Locks the SJF job file to the Customer ID (User ID).
scComSAMLightClientCtrlLockToDongleFlagLockExport 0x4
Locks the export function of the SJF job file.
CCI_Return Type: int
CCI return number, see error list.
Notes -
C# Example: Lock the jobfile to the customer ID:

int CCI_Return = cci.ScSetLongValue((int)


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlLongValueTypeSetLockSjfToDongleFlags, 2);

© 2022 SCAPS GmbH


Client Control Interface Manual - Job 89

Lock Dongle Set


Get
C# Example: Get set flags:

int Flag = cci.ScGetLongValue((int)


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlLongValueTypeSetLockSjfToDongleFlags);
Table 101: Lock Dongle

Save Job Set


Get
DLL Function int CCI_Return = ScSaveJob(string File_Name, int Flag)

ASCII Function int CCI_Return = ScCciSaveJob(string File_Name, int Flag)

Description Save the current job file.


File_Name Type: string Unit: none
The full path where the job file should be stored.
Flag Type: int Flag:
Location: None
scComSAMLightSaveFlagEntities 0x1
Saves the entities to the job file.
scComSAMLightSaveFlagMaterials 0x2
Saves the pens to the job file.
scComSAMLightSaveFlagUseCurrentJobName 0x4
Uses the current job file name of the scanner application. The parameter FileName
will be ignored in this case.
CCI_Return Type: int
CCI return number, see error list.
Notes · This Flags value is usually a combination of multiple flags. Be sure not to
accidentally overwrite the previous flags. See the chapter How to work with flags to
learn more about combining multiple flags.
C# Example: Save the job with the Entities and keeping the current job name:

int flags = 0X1;


flags |= 0X4;
int CCI_Return = cci.ScSaveJob("",flags);
Table 102: Save Job

Sort Entities Set


Get
DLL Function int CCI_Return = ScExecCommand(int Cmd_ID)

ASCII Function int CCI_Return = ScCciExecCommand(int Cmd_ID)

Description Sorts objects inside a group by their name if the name of the group is specified with
Top Level. If no group name is specified this sorts the top level entities of the job.
Cmd_ID Type: int ID:
Location:ScComSAMLightClientCtrlExecCommandConstants
scComSAMLightClientCtrlExecCommandSortJobByName 52
CCI_Return Type: int
CCI return number, see error list.
Notes · A entity can be set as top level with the following command SetToTopLevelEntity.

© 2022 SCAPS GmbH


Client Control Interface Manual - Job 90

Sort Entities Set


Get
C# Example: Sort entity by name:

int CCI_Return = cci.ScExecCommand((int)


ScComSAMLightClientCtrlExecCommandConstants.scComSAMLightClientCtrlExecCommandSortJobByName);

Table 103: Sort Entities

UNDO Set
Get
DLL Function int CCI_Return = ScExecCommand(int Cmd_ID)

ASCII Function int CCI_Return = ScCciExecCommand(int Cmd_ID)

Description Executes the UNDO command.


Value_Type Type: int ID:
Location:ScComSAMLightClientCtrlExecCommandConstants
scComSAMLightClientCtrlExecCommandUndo 54
CCI_Return Type: int
CCI return number, see error list.
Notes -
C# Example: Execute UNDO:

int CCI_Return = cci.ScExecCommand((int)


ScComSAMLightClientCtrlExecCommandConstants.scComSAMLightClientCtrlExecCommandUndo);

Table 104: UNDO

6.1 Entity Objects


· Connect Serial Numbers
· Create Entity
· Delete Entity
· Duplicate Entity
· Entity Type

Connect Serial Numbers Set


Get
DLL Function int CCI_Return = ScSetEntityLongData(string Entity_Name, int Data_ID, int Flag)

ASCII Function int CCI_Return = ScCciSetEntityLongData(string Entity_Name, int Data_ID, int Flag)

Description This command is developed for "connected" serial number/ barcode and Text2D
(share the same name in EntityInfo) -- when the text is changed, the barcode would
be changed in the same way. This command has the same functionality as the
button apply in the barcode page after changing the text in SAMLight.
Entity_Name Type: string Unit: none
Specify the entity to be changed.
Data_ID Type: int ID:
Location: ScComSAMLightClientCtrlFlags
scComSAMLightClientCtrlLongDataIdEntityGenerate 125
Flag Type: int Unit: none
Flag = 1 is required for this command.

© 2022 SCAPS GmbH


Client Control Interface Manual - Job 91

Connect Serial Numbers Set


Get
CCI_Return Type: int
CCI return number, see error list.
Notes -
C# Example: Connect serial numbers:

int CCI_Return = cci.ScSetEntityLongData("Entity1",(int)


ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlLongDataIdEntityGenerat, 1);
Table 105: Connect Serial Numbers

Create Entity Set


Get
DLL Function int CCI_Return = ScCreateEntity(string Entity_Name, string Father_Entity, int Pen, double
Center_X, double Center_Y, double Center_Z, double Dim_X, double Dim_Y, int Flag, string
Option)
ASCII Function int CCI Return = ScCciCreateEntity(string Entity_Name, string Father_Entity, int Pen, double
Center_X, double Center_Y, double Center_Z, double Dim_X, double Dim_Y, int Flag, string
Option)
Description Entities of the type ScBarCode12Chars2D, ScWinTextChars2D, ScSerialNumber,
ScEllipse2D, ScRectangle2D or ScPolyLine2D can be created by using this CCI
command.
Entity_Name Type: string Unit: none
Specify the name of the entity as it should appear in the entity list with Entity_Name.
Father_Entity Type: string Unit: none
Specify the Group name.
· If father is the empty string "", the new entity will be put at the end of the entity list.
· If father is not empty, but the name of any "ScEntities2D" entity in the entity list
(created by grouping of an entity), the new entity will be created inside this
ScEntities2D father entity at the end of all existing entities.
· If there are several entities with identical name, the first one will be taken as father
entity.
· If the father string does not exist in the entity list, no entity will be created and the
function returns 0.
Pen Type: int Unit: none
The pen number, which should be applied to the new entity.
Center_X Type: double Unit: [mm]*
The desired center coordinates (X).
Center_Y Type: double Unit: [mm]*
The desired center coordinates (Y).
Center_Z Type: double Unit: [mm]*
The desired center coordinates (Z).
Dim_X Type: double Unit: none
The desired X dimensions.
Dim_Y Type: double Unit: none
The desired Y dimensions.
Flag Type: int Unit: none
Has to be 0.
Option Type: string Unit: none
Has to be empty: "".

© 2022 SCAPS GmbH


Client Control Interface Manual - Job 92

Create Entity Set


Get
CCI_Return Type: int
CCI return number, see error list.
Notes · The type of entity has to be specified before with Set Entity Type.
· As first the type of the desired entity have to be defined with CreateEntity
command.
· Then set the content of the entity and finally create the entity with ScCreateEntity.
· The default unit is mm, but the user can select a different unit.
· In case of ScPolyLine2D use double.Positive Infinity as parameter for one of
Center_X/Y/Z to disable centering.
C# Example: for usage examples, please refer to Programming Examples: Create Entity chapter.
Table 106: Create Entity

Delete Entity Set


Get
DLL Function int CCI_Return = ScDeleteEntity(string Entity_Name)

ASCII Function int CCI_Return = ScCciDeleteEntity(string Entity_Name)

Description Deletes the entity with the name Entity_Name.


Entity_Name Type: string Unit: none
The name of the entity to be deleted.
CCI _Return Type: int
CCI return number, see error list.
Notes -
C# Example: Delete entity1:

string Entity_Name = "Entity1";


int CCI_Return = cci.ScDeleteEntity(Entity_Name);
Table 107: Delete Entity

Duplicate Entity Set


Get
DLL Function int CCI_Return = ScDuplicateEntity(string Entity_Name, string Duplicated_Name)

ASCII Function int CCI_Return = ScCciDuplicateEntity(string Entity_Name)

Description Duplicates the entity with the name Entity_Name.


Entity_Name Type: string Unit: none
The name of the entity to be duplicated.
Duplicated_name Type: string Unit: none
The name of the duplicated entity.
CCI_Return Type: int
CCI return number, see error list.
Notes -
C# Example: Duplicate entity1:

string Entity_Name = "Entity1";


string Duplicated_Name = "Entity2";
int CCI_Return = cci.ScDuplicateEntity(Entity_Name, Duplicated_Name);
Table 108: Duplicate Entity

© 2022 SCAPS GmbH


Client Control Interface Manual - Job 93

Entity Type Set


Get
DLL Function int CCI_Return = ScSetStringValue(int Value_Type, string Entity_Type)

ASCII Function int CCI_Return = ScCciSetStringValue(int Value_Type, string Entity_Type)

Description Specify the type of the entity to be created. For further information on the creation of
an entity, see ScCreateEntity.
Value_Type Type: int ID:
Location: ScComSAMLightClientCtrlValueTypes
scComSAMLightClientCtrlStringValueTypeCreateEntity 36
Entity_Type Type: string Unit: none
Can take following values:
· ScBarCode12Chars2D
· ScWinTextChars2D
· ScSerialNumber
· ScEllipse2D
· ScRectangle2D
· ScPolyline2D
CCI_Return Type: int
CCI return number, see error list.
Notes -
C# Example: for usage examples, please refer to Programming Examples: Create Entity chapter.
Table 109: Entity Type

6.1.1 Geometry Objects


This chapter deals with two special objects, where further commands are implemented.
· Spiral
· Ellipse
· PolyLine

6.1.1.1 Spiral
· Spiral Entity Properties
· Spiral Radius Value
· Spiral Rotation and Segment Settings

Spiral Entity Properties Set


Get
DLL Function int CCI_Return = ScSetEntityLongData(string Entity_Name, int Data_ID, int Flag)
int Flag = ScGetEntityLongData(string Entity_Name, int Data_ID)
ASCII Function int CCI_Return = ScCciSetEntityLongData(string Entity_Name, int Data_ID, int Flag)
int Flag = ScCciGetEntityLongData(string Entity_Name, int Data_ID)
Description Enable/disable the checkboxes in the Spiral Entity Settings.
Entity_Name Type: string Unit: none
Enter the name of the entity to be changed.
Data_ID Type: int ID:
Location: ScComSAMLightClientCtrlFlags
scComSAMLightClientCtrlLongDataIdSpiralFlags 116

© 2022 SCAPS GmbH


Client Control Interface Manual - Job 94

Spiral Entity Properties Set


Get
Flag Type: int Flag:
Location: None
Clockwise 0x1
Start from outer 0x2
Set return path 0x4
CCI_Return Type: int
CCI return number, see error list.
Notes -
C# Example: Check the checkbox Clockwise and Set Return Path:

string Entity_Name = "SpiralEntity";


int Flags = 0X1 |= 0X4;
int CCI_Return = cci.ScSetEntityLongData(Entity_Name, (int)
ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlLongDataIdSpiralFlags, Flags);
Table 110: Spiral Entity Properties

Spiral Radius Value Set


Get
DLL Function int CCI_Return = ScSetEntityDoubleData(string Entity_Name, int Data_ID, double Parameter)
int CCI_Return = ScGetEntityDoubleData(string Entity_Name, int Data_ID, ref double Parameter)
ASCII Function int CCI_Return = ScCciSetEntityDoubleData(string Entity_Name, int Data_ID, double Parameter)
double Parameter = ScCciGetEntityDoubleData(string Entity_Name, int Data_ID)
Description Set or get the inner and outer Radius as well a the Rise Parameter of the Spiral.
Entity_Name Type: string Unit: none
Enter the name of the entity to be changed.
Data_ID Type: int ID:
Location: ScComSAMLightClientCtrlFlags
scComSAMLightClientCtrlDoubleDataIdSpiral2DInnerRadius 74
The inner radius of the spiral.
scComSAMLightClientCtrlDoubleDataIdSpiral2DOuterRadius 75
The outer radius of the spiral.
scComSAMLightClientCtrlDoubleDataIdSpiral2DRise 76
The Rise Radius value of the spiral.
Parameter Type: double Unit: [mm]*
The corresponding value.
CCI_Return Type: int
CCI return number, see error list.
Notes · The default unit is mm, but the user can select a different unit.
C# Example: Set the outer radius value to 15.5:

string Entity_Name = "SpiralEntity";


int CCI_Return = cci.ScSetEntityDoubleData(Entity_Name, (int)
ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlDoubleDataIdSpiral2DInnerRadius, 15.5);
C# Example: Get the outer radius value:

string Entity_Name = "";


int CCI_Return = cci.ScGetEntityDoubleData(Entity_Name, (int)
ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlDoubleDataIdSpiral2DInnerRadius, ref Entity_Name);

© 2022 SCAPS GmbH


Client Control Interface Manual - Job 95

Table 111: Spiral Rise Radius

Spiral Rotation and Segment Settings Set


Get
DLL Function int CCI_Return = ScSetEntityLongData(string Entity_Name, int Data_ID, int Spiral_Num)
int Spiral_Num = ScGetEntityLongData(string Entity_Name, int Data_ID)
ASCII Function int CCI_Return = ScCciSetEntityLongData(string Entity_Name, int Data_ID, int Spiral_Num)
int Spiral_Num = ScCciGetEntityLongData(string Entity_Name, int Data_ID)
Description Set or get inner, outer rotations and segments of the spiral object.
Entity_Name Type: string Unit: none
Enter the name of the entity to be changed.
Data_ID Type: int ID:
Location: ScComSAMLightClientCtrlFlags
scComSAMLightClientCtrlLongDataIdSpiralNumInnerRotations 113
The number of inner rotations.
scComSAMLightClientCtrlLongDataIdSpiralNumOuterRotations 114
The number of outer rotations.
scComSAMLightClientCtrlLongDataIdSpiralNumOuterSegments 115
The number of outer segments.
Spiral_Num Type: int Unit: none
The corresponding value.
CCI_Return Type: int
CCI return number, see error list.
Notes -
C# Example: Change the number of inner and outer rotations:

string Entity_Name = "SpiralEntity";


int CCI_Return_01 = cci.ScSetEntityLongData(Entity_Name,(int)
ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlLongDataIdSpiralNumInnerRotations, 10);
int CCI_Return_02 = cci.ScSetEntityLongData(Entity_Name, (int)
ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlLongDataIdSpiralNumOuterRotations, 20);

Table 112: Spiral Rotation and Segment settings

6.1.1.2 Ellipse
· Ellipse Parameters
· Segment Number

Ellipse Parameters Set


Get
DLL Function int CCI_Return = ScSetEntityDoubleData(string Entity_Name, int Data_ID, double Ellipse_2D)
int CCI_Return = ScGetEntityDoubleData(string Entity_Name, int Data_ID, ref double Ellipse_2D)
ASCII Function int CCI_Return = ScCciSetEntityDoubleData(string Entity_Name, int Data_ID, double Ellipse_2D)
int Ellipse_2D = ScCciGetEntityDoubleData(string Entity_Name, int Data_ID)
Description Adjust inner and outer radius as well a the rise parameter of the spiral.
Entity_Name Type: string Unit: none
Enter the name of the entity to be changed.
Data_ID Type: int ID:
Location: ScComSAMLightClientCtrlFlags

© 2022 SCAPS GmbH


Client Control Interface Manual - Job 96

Ellipse Parameters Set


Get
scComSAMLightClientCtrlDoubleDataIdEllipse2DRadiusX 77
The ellipse radius value in x direction.
scComSAMLightClientCtrlDoubleDataIdEllipse2DRadiusY 78
The ellipse radius value in y direction.
scComSAMLightClientCtrlDoubleDataIdEllipse2DCenterX 79
The ellipse center on the x axis.
scComSAMLightClientCtrlDoubleDataIdEllipse2DCenterY 80
The ellipse center on the y axis.
Ellipse_2D Type: double Unit: [mm]*
The corresponding value.
CCI_Return Type: int
CCI return number, see error list.
Notes · The default unit is mm, but the user can select a different unit.
C# Example: Set the center point to (0,0):

string Entity_Name = "Ellipse";


double center_X = 0;
double center_Y = 0;
cci.ScSetEntityDoubleData(Entity_Name, (int)
ScComSAMLightClientCtrlFlags.scComSAMLIghtClientCtrlDoubleDataIdEllipse2DCenterX, center_X);
cci.ScSetEntityDoubleData(Entity_Name, (int)
ScComSAMLightClientCtrlFlags.scComSAMLIghtClientCtrlDoubleDataIdEllipse2DCenterY, center_Y);
C# Example: Get the value of the center point:

string Entity_Name = "Ellipse";


double center_X = 0;
double center_Y = 0;
cci.ScGetEntityDoubleData(Entity_Name, (int)
ScComSAMLightClientCtrlFlags.scComSAMLIghtClientCtrlDoubleDataIdEllipse2DCenterX, ref center_X);
cci.ScGetEntityDoubleData(Entity_Name, (int)
ScComSAMLightClientCtrlFlags.scComSAMLIghtClientCtrlDoubleDataIdEllipse2DCenterX, ref center_Y);
Table 113: Ellipse Parameters

Segment Number Set


Get
DLL Function int CCI_Return = ScSetEntityDoubleData(string Entity_Name, int Data_ID, double Segment_Num)
int CCI_Return = ScGetEntityDoubleData(string Entity_Name, int Data_ID, ref double
Segment_Num)
ASCII Function int CCI_Return = ScCciSetEntityDoubleData(string Entity_Name, int Data_ID, double
Segment_Num)
int Segment_Num = ScCciGetEntityDoubleData(string Entity_Name, int Data_ID)
Description Adjust the amount of segments of the ellipse.
Entity_Name Type: string Unit: none
Enter the name of the entity to be changed.
Data_ID Type: int ID:
Location: ScComSAMLightClientCtrlFlags
ScComSAMLIghtClientCtrlDoubleDataIdEllipse2DSegmentCount 98
Segment_Num Type: double Unit: [mm]*
The corresponding value.

© 2022 SCAPS GmbH


Client Control Interface Manual - Job 97

Segment Number Set


Get
CCI_Return Type: int
CCI return number, see error list.
Notes · The default unit is mm, but the user can select a different unit.
C# Example: Set the amount of segments to 100:

string Entity_Name = "Ellipse";


double segments = 100;
int CCI_Return = cci.ScSetEntityDoubleData(Entity_Name, (int)
ScComSAMLightClientCtrlFlags.scComSAMLIghtClientCtrlDoubleDataIdEllipse2DSegmentCount, segments);
C# Example: Get the amount of segments of an ellipse entity:

string Entity_Name = "Ellipse";


double segments = 0;
int CCI_Return = cci.ScGetEntityDoubleData(Entity_Name, (int)
ScComSAMLightClientCtrlFlags.scComSAMLIghtClientCtrlDoubleDataIdEllipse2DSegmentCount, ref segments);
Table 114: Segment Number

6.1.1.3 PolyLine
· Add point to PolyLine
· Add PolyLine

Add point to PolyLine Set


Get
DLL Function int CCI_Return = ScExecCommand(int Cmd_ID)

ASCII Function int CCI_Return = ScCciExecCommand(int Cmd_ID)

Description Add point to the current PolyLine Array.


Cmd_ID Type: int ID:
Location: ScComSAMLightClientCtrlExecCommandConstants
scComSAMLightClientCtrlExecCommandAddPointToCreateEntityPolyline 65
CCI_Return Type: int
CCI return number, see error list.
Notes -
C# Example: Add point to PolyLine:

int CCI_Return = cci.ScExecCommand((int)


ScComSAMLightClientCtrlExecCommandConstants.scComSAMLightClientCtrlExecCommandAddPointToCreateEntityPolyli
ne);
Table 115: Add point to PolyLine

© 2022 SCAPS GmbH


Client Control Interface Manual - Job 98

Add PolyLine Set


Get
DLL Function int CCI_Return = ScExecCommand(int Cmd_ID)

ASCII Function int CCI_Return = ScCciExecCommand(int Cmd_ID)

Description Add additional PolyLine in the same Layer. All created points after sending this
command will be used in the new PolyLine.
Cmd_ID Type: int ID:
Location: ScComSAMLightClientCtrlExecCommandConstants
scComSAMLightClientCtrlExecCommandAddPolylineToCreateEntityPolyline 66
CCI_Return Type: int
CCI return number, see error list.
Notes -
C# Example: Add PolyLine:

int CCI_Return = cci.ScExecCommand((int)


ScComSAMLightClientCtrlExecCommandConstants.scComSAMLightClientCtrlExecCommandAddPolylineToCreateEntityPol
yline);
Table 116: Add PolyLine

6.1.2 Barcode
· Barcode Format
· Barcode Level and Mode
· Barcode Limits Flags
· Barcode Line Reduction
· Barcode Parameter
· Barcode Type
· Human Readable Text
· Human Readable Text Settings

Barcode Format Set


Get
DLL Function int CCI_Return = ScSetEntityStringData(string Entity_Name, int Data_ID, string Format_String)
int CCI_Return = ScGetEntityStringData(string Entity_Name, int Data_ID, ref string Format_String)
ASCII Function int CCI_Return = ScCciSetEntityStringData(string Entity_Name, int Data_ID, string Format_String)
string Format_String = ScCciGetEntityStringData(string Entity_Name, int Data_ID)
Description Set or get the format of a Barcode (if supported).
Entity_Name Type: string Unit: none
Enter the name of the entity to be changed.
Data_ID Type: int ID:
Location: ScComSAMLightClientCtrlFlags
scComSAMLightClientCtrlStringDataIdBarCodeFormatString 32
Format_String Type: string Unit: none
The barcode format string.
CCI_Return Type: int
CCI return number, see error list.
Notes -
C# Example: For the entity "Barcode1" set the barcode fromat string to DataMatrix:

© 2022 SCAPS GmbH


Client Control Interface Manual - Job 99

Barcode Format Set


Get

int CCI_Return = cci.ScSetEntityStringData( "Barcode1", ( int )


ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlStringDataIdBarCodeFormatString, "DataMatrix" );
C# Example: Get the barcode format string of the entity "Barcode1":

string Format_String = "";


int CCI_Return = cci.ScGetEntityStringData( "Barcode1", ( int )
ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlStringDataIdBarCodeFormatString, ref Format_String );
Table 117: Barcode Format

Barcode Level and Mode Set


Get
DLL Function int CCI_Return = ScSetEntityLongData(string Entity_Name, int Data_ID, int Parameter)
int Parameter = ScGetEntityLongData(string Entity_Name, int Data_ID)
ASCII Function int CCI_Return = ScCciSetEntityLongData(string Entity_Name, int Data_ID, int Parameter)
int Parameter = ScCciGetEntityLongData(string Entity_Name, int Data_ID)
Description Specify the barcode level and the barcode mode.
Entity_Name Type: string Unit: none
Specify the entity name to be changed.
Data_ID Type: int ID:
Location: ScComSAMLightClientCtrlFlags
scComSAMLightClientCtrlLongDataIdDataBarcodeLevel 108
Specify the barcode level as in the barcode extended settings.
scComSAMLightClientCtrlLongDataIdDataBarcodeMode 109
Specify the barcode mode as in the barcode extended settings.
Parameter Type: int Unit: none
Value from 0 to n.
CCI_Return Type: int
CCI return number, see error list.
Notes -
C# Example: Set the barcode level for the entity "Barcode1" to 1:

int CCI_Return = cci.ScSetEntityLongData("Barcode1", (int)


ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlLongDataIdDataBarcodeLevel, 1);
Table 118: Barcode Level and Mode

Barcode Limits Flags Set


Get
DLL Function int CCI_Return = ScSetEntityLongData(string Entity_Name, int Data_ID, int Flag)
int Flag = ScGetEntityLongData(string Entity_Name, int Data_ID)
ASCII Function int CCI_Return = ScCciSetEntityLongData(string Entity_Name, int Data_ID, int Flag)
int Flag = ScCciGetEntityLongData(string Entity_Name, int Data_ID)
Description Set or get the state of the checkboxes int the Barcode->Limits Dialogue.
Entity_Name Type: string Unit: none
Specify the entity to be changed.
Data_ID Type: int ID:
Location: ScComSAMLightClientCtrlFlags
scComSAMLightClientCtrlLongDataIdBarcodeFlagsHigh 138

© 2022 SCAPS GmbH


Client Control Interface Manual - Job 100

Barcode Limits Flags Set


Get
Flag Type: int Flag:
Location: ScComSAMLightClientCtrlFlags
scComSAMLightClientCtrlLongDataIdBarcodeFlagsHighLimitLength 0x1
Set flag force for length limit.
scComSAMLightClientCtrlLongDataIdBarcodeFlagsHighLimitHeight 0x2
Set flag force for height.
scComSAMLightClientCtrlLongDataIdBarcodeFlagsHighKeepAspect 0x4
Set checkbox keep aspect.
CCI_Return Type: int
CCI return number, see error list.
Notes · The values for length and height are described in Various Text Parameters.
C# Example: Set force for length limit:

int CCI_Return = cci.ScSetEntityLongData("Test",(int)


ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlLongDataIdBarcodeFlagsHigh, 0x1);
C# Example: Get current set flag:

int Flag = cci.ScGetEntityLongData("Test",(int)


ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlLongDataIdBarcodeFlagsHigh);
Table 119: Barcode Limits Flags

Barcode Line Reduction Set


Get
DLL Function int CCI_Return = ScSetEntityDoubleData(string Entity_Name, int Data_ID, double Line_Reduction)
int CCI_Return = ScGetEntityDoubleData(string Entity_Name, int Data_ID, ref double
Line_Reduction)
ASCII Function int CCI_Return = ScCciSetEntityDoubleData(string Entity_Name, int Data_ID, double
Line_Reduction)
double Line_Reduction = ScCciGetEntityDoubleData(string Entity_Name, int Data_ID)
Description The line reduction of the barcode in percent for reducing the size of a barcode line.
Entity_Name Type: string Unit: none
Specify the entity name to be changed.
Data_ID Type: int ID:
Location: ScComSAMLightClientCtrlFlags
scComSAMLightClientCtrlDoubleDataIdBarcodeLinereduction 69
Specify the barcode level as in the Barcode Extended settings.
Line_Reduction Type: double Unit: none
The corresponding percent value.
CCI_Return Type: int
CCI return number, see error list.
Notes -
C# Example: Reduce the barcode entity "Barcode1" to 10.5%:

int CCI_Return = cci.ScSetEntityDoubleData( "Barcode1", ( int )


ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlDoubleDataIdBarcodeLinereduction, 10.5 );
Table 120: Barcode Line Reduction

© 2022 SCAPS GmbH


Client Control Interface Manual - Job 101

Barcode Parameter Set


Get
DLL Function int CCI_Return = ScSetEntityLongData(string Entity_Name, int Data_ID, int Flag)
int Flag = ScGetEntityLongData(string Entity_Name, int Data_ID)
ASCII Function int CCI_Return = ScCciSetEntityLongData(string Entity_Name, int Data_ID, int Flag)
int Flag = ScCciGetEntityLongData(string Entity_Name, int Data_ID)
Description Set or get the barcode entities parameters from the barcode properties page.
Data_ID Type: int ID:
Location: ScComSAMLightClientCtrlFlags
scComSAMLightClientCtrlLongDataIdBarcodeSetFlags 101
Use this command to set the flags described below.
scComSAMLightClientCtrlLongDataIdBarcodeClearFlags 102
Use this command to uncheck certain flags.
Flag Type: int Flag:
Location: ScComSAMLightClientCtrlFlags
scComSAMLightClientCtrlLongDataIdBarcodeFlagVariableLength 0x1
VariableLength checkbox.
scComSAMLightClientCtrlLongDataIdBarcodeFlagInvert 0x2
Invert checkbox from Barcode Extended...menu.
scComSAMLightClientCtrlLongDataIdBarcodeFlagDisableAutoQuietZ 0x4
Auto Quiet Zone checkbox from Barcode Extended...menu.
scComSAMLightClientCtrlLongDataIdBarcodeFlagQuietZoneAbsolute 0x8
QuiteZone Absolute checkbox from Barcode Extended...menu.
scComSAMLightClientCtrlLongDataIdBarcodeFlagGenerateCheckCode 0x20
Generate Check Code checkbox from Barcode Extended...menu.
scComSAMLightClientCtrlLongDataIdBarcodeFlagInvertCellMode 0x40
Inverted Cellmode checkbox from Barcode Extended...menu.
CCI_Return Type: int
CCI return number, see error list.
Notes -
C# Example: Activate the variable length and the invert checkbox:

int flags = (int)ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlLongDataIdBarcodeFlagVariableLength;


flags |= (int)ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlLongDataIdBarcodeFlagInvert;
int CCI_Return = cci.ScSetEntityLongData("EntityTest", (int)
ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlLongDataIdBarcodeSetFlags,flags);
C# Example: Remove the invert checkbox:

int to_Delete = (int)ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlLongDataIdBarcodeFlagInvert;


int CCI_Return = cci.ScSetEntityLongData("EntityTest", (int)
ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlLongDataIdBarcodeClearFlags,toDelete);
Table 121: Barcode Parameters

Barcode Type Set


Get
DLL Function int CCI_Return = ScSetEntityStringData(string Entity_Name, int Data_ID, string Barcode_Type)
int CCI_Return = ScGetEntityStringData(string Entity_Name, int Data_ID, ref string Barcode_Type)
ASCII Function int CCI_Return = ScCciSetEntityStringData(string Entity_Name, int Data_ID, string Barcode_Type)
string Barcode_Type = ScCciGetEntityStringData(string Entity_Name, int Data_ID)

© 2022 SCAPS GmbH


Client Control Interface Manual - Job 102

Barcode Type Set


Get
Description Using this value a barcode object of type ScBarCode12Chars2D can be modified.
Together with a call to ScSetEntityStringData()) a new barcode type can be specified
and set for that object. The string parameter the function expects is the name of the
barcode type. There for an example EAN or I-2/5 can be used. This value can be
combined with the flags for the upper 16 bit like described above.
Entity_Name Type: string Unit: none
Specify the entity to be changed.
Data_ID Type: int ID:
Location: ScComSAMLightClientCtrlFlags
scComSAMLightClientCtrlStringDataIdSetBarcodeType 19
Barcode_Type Type: string Unit: none
Specify the barcode type.
CCI_Return Type: int
CCI return number, see error list.
Notes -
C# Example: Create an entity "Barcode1" with the "QR Code" type
Table 122: Barcode Type

Human Readable Text Set


Get
DLL Function int CCI_Return = ScSetEntityLongData(string Entity_Name, int Data_ID, int Enable_HRT)
int Enable_HRT = ScGetEntityLongData(string Entity_Name, int Data_ID)
ASCII Function int CCI_Return = ScCciSetEntityLongData(string Entity_Name, int Data_ID, int Enable_HRT)
int Enable_HRT = ScCciGetEntityLongData(string Entity_Name, int Data_ID)
Description Set or get the human readable text property for a barcode entity.
Entity_Name Type: string Unit: none
Specify the entity name to be changed.
Data_ID Type: int ID:
Location: ScComSAMLightClientCtrlFlags
scComSAMLightClientCtrlLongDataIdDataBarcodeTextEnable 107
Enable_HRT Type: int Unit: none
· 0: Disable human readable text.
· 1: Enable human readable text.
CCI_Return Type: int
CCI return number, see error list.
Notes -
C# Example: Activate the human readable text for the barcode entity "Barcode1":

int CCI_Return = cci.ScSetEntityLongData("Barcode1", (int)


ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlLongDataIdDataBarcodeTextEnable, 1);
Table 123: Human Readable Text

Human Readable Text Settings Set


Get
DLL Function int CCI_Return = ScSetEntityDoubleData(string Entity_Name, int Data_ID, double Parameter)
int CCI_Return = ScGetEntityDoubleData(string Entity_Name, int Data_ID, ref double Parameter)
ASCII Function int CCI_Return = ScCciSetEntityDoubleData(string Entity_Name, int Data_ID, double Parameter)

© 2022 SCAPS GmbH


Client Control Interface Manual - Job 103

Human Readable Text Settings Set


Get
double Parameter = ScCciGetEntityDoubleData(string Entity_Name, int Data_ID)
Description Set or get the current applied settings for human readable text for a barcode entity.
Entity_Name Type: string Unit: none
Specify the entity name.
Data_ID Type: int ID:
Location: ScComSAMLightClientCtrlFlags
scComSAMLightClientCtrlDoubleDataIdTextPointResolution 7
Change the resolution of the lines in percent. Not available for Simple Fonts. [%]
scComSAMLightClientCtrlDoubleDataIdTextBaseline 8
Change the distance between the baseline of the barcode and the baseline of the
text. [mm]
Parameter Type: double Unit: depends on constant
The desired value.
CCI_Return Type: int
CCI return number, see error list.
Notes · You can also edit the Text Font, Text Size and the Char Spacing.
C# Example: Set point resolution to 50%:

int CCI_Return = cci.ScSetEntityLongData("Barcode1", (int)


ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlLongDataIdDataTextPointResolution, 50);
Table 124: Human Readable Text Settings

6.1.2.1 Data Matrix


· Data Matrix Cell Size
· Data Matrix Checkboxes
· Data Matrix Distance Between Dots
· Data Matrix Encoding
· Data Matrix Quiet Zone
· Data Matrix Points per Cell
· Data Matrix Symbol Size

Data Matrix Cell Size Set


Get
DLL Function int CCI_Return = ScSetEntityDoubleData(string Entity_Name, int Data_ID, double Cell_Size)
int CCI_Return = ScGetEntityDoubleData(string Entity_Name, int Data_ID, ref double Cell_Size)
ASCII Function int CCI_Return = ScCciSetEntityDoubleData(string Entity_Name, int Data_ID, double Cell_Size)
double Cell_Size = ScCciGetEntityDoubleData(string Entity_Name, int Data_ID)
Description Set or get the cell size. Available only if cellmode is enabled.
Entity_Name Type: string Unit: none
Specify the entity to be changed.
Data_ID Type: int ID:
Location: ScComSAMLightClientCtrlFlags
scComSAMLightClientCtrlDoubleDataIdDataMatrixCellSizeX 72
The size in x direction.
scComSAMLightClientCtrlDoubleDataIdDataMatrixCellSizeY 73

© 2022 SCAPS GmbH


Client Control Interface Manual - Job 104

Data Matrix Cell Size Set


Get
The size in y direction.
Cell_Size Type: double Unit: none
Value between 0 and 1.
CCI_Return Type: int
CCI return number, see error list.
Notes · The size is specified in percents.
C# Example: Set the cell size in X to 80% for the entity "DataMatrix1":

int CCI_Return = cci.ScSetEntityDoubleData("DataMatrix1", (int)


ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlDoubleDataIdDataMatrixCellSizeX, 80.0);
C# Example: Get the value of the current cell size in x direction for the entity "DataMatrix1":

double Cell_Size_X = 0.0;


int CCI_Return = cci.ScGetEntityDoubleData("DataMatrix1", (int)
ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlDoubleDataIdDataMatrixCellSizeX, ref Cell_Size_X);
Table 125: Data Matrix Cell Size

Data Matrix Checkboxes Set


Get
DLL Function int CCI_Return = ScSetEntityLongData(string Entity_Name, int Data_ID, int Flag)
int Flag = ScGetEntityLongData(string Entity_Name, int Data_ID)
ASCII Function int CCI_Return = ScCciSetEntityLongData(string Entity_Name, int Data_ID, int Flag)
int Flag = ScCciGetEntityLongData(string Entity_Name, int Data_ID)
Description Set or get the checkboxes state at barcode extended settings (availiable only for the
data matrix ex barcode type).
Entity_Name Type: string Unit: none
Specify the entity to be changed.
Data_ID Type: int ID:
Location: ScComSAMLightClientCtrlFlags
scComSAMLightClientCtrlLongDataIdDataMatrixSetSymbolMode 103
Enable checkboxes.
scComSAMLightClientCtrlLongDataIdDataMatrixClearSymbolMode 104
Disable checkboxes.
Flag Type: int Flag:
Location: ScComSAMLightClientCtrlFlags
scComSAMLightClientCtrlLongDataIdDataMatrixExSymbolModeRectangle 0x1
scComSAMLightClientCtrlLongDataIdDataMatrixExSymbolModeAutoSize 0x10000
scComSAMLightClientCtrlLongDataIdDataMatrixExSymbolModeAutoEncodation 0x20000
scComSAMLightClientCtrlLongDataIdDataMatrixExSymbolModeDots 0x40000
scComSAMLightClientCtrlLongDataIdDataMatrixExSymbolModeTilde 0x80000
scComSAMLightClientCtrlLongDataIdDataMatrixExSymbolModeCells 0x100000
scComSAMLightClientCtrlLongDataIdDataMatrixExSymbolModeNoFinderCells 0x200000
scComSAMLightClientCtrlLongDataIdDataMatrixExSymbolModeEllipse 0x400000
scComSAMLightClientCtrlLongDataIdDataMatrixExSymbolModeTextFreelyEditable 0x800000
CCI_Return Type: int
CCI return number, see error list.

© 2022 SCAPS GmbH


Client Control Interface Manual - Job 105

Data Matrix Checkboxes Set


Get
Notes · This Flags value is usually a combination of multiple flags. See the chapter How to
work with flags to learn more about combining multiple flags
· Not all flags are compatible with each other. Refer to SAMLight application to learn
more about flag compatibility
C# Example: Enable the rectangle and the autosize checkboxes and disable the text freely editable mode:

//Combine the two flags we want to activate and enable them


int flags = (int)
ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlLongDataIdDataMatrixExSymbolModeRectangle;
flags |= (int)
ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlLongDataIdDataMatrixExSymbolModeAutoSize;
int CCI_Return_01 = cci.ScSetEntityLongData("DataMatrix1", (int)
ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlLongDataIdDataMatrixSetSymbolMode, flags);

//Define the flag to be disabled


int disable_Flags = (int)
ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlLongDataIdDataMatrixExSymbolModeTextFreelyEditable;
int CCI_Return_02 = cci.ScSetEntityLongData("DataMatrix1", (int)
ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlLongDataIdDataMatrixClearSymbolMode, disableFlags);
C# Example: Get the current flags status:

int flags = cci.ScGetEntityLongData("DataMatrix1", (int)


ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlLongDataIdDataMatrixSetSymbolMode);
Table 126: Data Matrix Checkboxes

Data Matrix Distance Between Dots Set


Get
DLL Function int CCI_Return = ScGetEntityDoubleData(string Entity_Name, int Data_ID, ref double Distance)

ASCII Function double Distance = ScCciGetEntityDoubleData(string Entity_Name, int Data_ID)

Description Get the distance between two points of DataMatrixEx.


Entity_Name Type: string Unit: none
Specify the entity to be changed.
Data_ID Type: int ID:
Location: ScComSAMLightClientCtrlFlags
ScComSAMLightClientCtrlDoubleDataIdDataMatrixDistanceBetweenDots 87
Distance Type: double Unit: [mm]
Value between 0.0 and 1.0.
CCI_Return Type: int
CCI return number, see error list.
Notes -
C# Example: Get the distance between dots for the "DataMatrix1" entity:

double Distance_Between_Dots = 0.0;


int CCI_Return = cci.ScGetEntityDoubleData("DataMatrix1", (int)
ScComSAMLightClientCtrlFlags.ScComSAMLightClientCtrlDoubleDataIdDataMatrixDistanceBetweenDots, ref
Distance_Between_Dots);
Table 127: Data Matrix Distance Between Dots

Data Matrix Encoding Set


Get
DLL Function int CCI_Return = ScSetEntityLongData(string Entity_Name, int Data_ID, int Flag)
int Flag = ScGetEntityLongData(string Entity_Name, int Data_ID)

© 2022 SCAPS GmbH


Client Control Interface Manual - Job 106

Data Matrix Encoding Set


Get
ASCII Function int CCI_Return = ScCciSetEntityLongData(string Entity_Name, int Data_ID, int Flag)
int Flag = ScCciGetEntityLongData(string Entity_Name, int Data_ID)
Description Set or get the encoding type of the DataMatrix object.
Entity_Name Type: string Unit: none
Set or get the Encoding of the Data Matrix.
Data_ID Type: int ID:
Location: ScComSAMLightClientCtrlFlags
scComSAMLightClientCtrlLongDataIdDataMatrixEncoding 106
Flag Type: int Index:
Location: ScComSAMLightClientCtrlFlags
scComSAMLightClientCtrlLongDataIdDataMatrixExEncodationAscii 0x1
scComSAMLightClientCtrlLongDataIdDataMatrixExEncodationBase256 0x2
scComSAMLightClientCtrlLongDataIdDataMatrixExEncodationC40 0x3
scComSAMLightClientCtrlLongDataIdDataMatrixExEncodationText 0x4
scComSAMLightClientCtrlLongDataIdDataMatrixExEncodationAnsiX12 0x5
scComSAMLightClientCtrlLongDataIdDataMatrixExEncodationEdifact 0x6
CCI_Return Type: int
CCI return number, see error list.
Notes · You can set only one encodation type simultaneously.
C# Example: Change the data matrix encoding of the entity "DataMatrix1" to C40:

int encoding:Mode = (int)


ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlLongDataIdDataMatrixExEncodationC40;
int CCI_Return = cci.ScSetEntityLongData("DataMatrix1", (int)
ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlLongDataIdDataMatrixEncoding, encodingMode);
C# Example: Get the current value of the Data Matrix Encoding of the "DataMatrix1" entity:

int current:Encoding = cci.ScGetEntityLongData("DataMatrix1", (int)


ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlLongDataIdDataMatrixEncoding);
Table 128: Data Matrix Encoding

Data Matrix Quiet Zone Set


Get
DLL Function int CCI_Return = ScSetEntityDoubleData(string Entity_Name, int Data_ID, double Quiet_Zone)
int CCI_Return = ScGetEntityDoubleData(string Entity_Name, int Data_ID, ref double Quiet_Zone)
ASCII Function int CCI_Return = ScCciSetEntityDoubleData(string Entity_Name, int Data_ID, double Quiet_Zone)
double Quiet_Zone = ScCciGetEntityDoubleData(string Entity_Name, int Data_ID)
Description Set or get the quiet zone of a DataMatrixEx. If the checkbox Absolute is activated the
quiet zone is given in mm. If you need to set different paramters for X and Y you
have to clear the flag scComBarFlagDisableAutoQuietZone with BarcodeClearFlags.
If not, the quiet zone is given as a scale factor.
Entity_Name Type: string Unit: none
Specify the entity to be changed.
Data_ID Type: int ID:
Location: ScComSAMLightClientCtrlFlags
scComSAMLightClientCtrlDoubleDataIdDataMatrixQuietZoneX 81
The quiet zone in x direction.

© 2022 SCAPS GmbH


Client Control Interface Manual - Job 107

Data Matrix Quiet Zone Set


Get
scComSAMLightClientCtrlDoubleDataIdDataMatrixQuietZoneY 82
The quiet zone in y direction.
Quiet_Zone Type: double Unit: none
Value between 0 and 1.
CCI_Return Type: int
CCI return number, see error list.
Notes -
C# Example: Set the quiet zone size in X to 20% for the entity "DataMatrix1":

int CCI_Return = cci.ScSetEntityDoubleData( "DataMatrix1", ( int )


ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlDoubleDataIdDataMatrixQuietZoneX, 20.0 );
C# Example: Get the value of the current quiet zone in X for the entity "DataMatrix1":

double Quiet_Zone_X = 0.0;


int CCI_Return = cci.ScGetEntityDoubleData( "DataMatrix1", ( int )
ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlDoubleDataIdDataMatrixQuietZoneX, ref Quiet_Zone_X );
Table 129: Data Matrix Quiet Zone

Data Matrix Points per Cell Set


Get
DLL Function int CCI_Return = ScSetEntityLongData(string Entity_Name, int Data_ID, int Points_Per_Cell)
int Points_Per_Cell = ScGetEntityLongData(string Entity_Name, int Data_ID)
ASCII Function int CCI_Return = ScCciSetEntityLongData(string Entity_Name, int Data_ID, int Points_Per_Cell)
int Points_Per_Cell = ScCciGetEntityLongData(string Entity_Name, int Data_ID)
Description Set or get the number of points per cell for DataMatrixEx.
Entity_Name Type: string Unit: none
Specify the entity to be changed.
Data_ID Type: int ID:
Location: ScComSAMLightClientCtrlFlags
scComSAMLightClientCtrlLongDataIdDataMatrixNumberOfDots 124
Points_Per_Cell Type: int Unit: none
Valid values to set are 1, 4, 9, 16, otherwise returns error.
CCI_Return Type: int
CCI return number, see error list.
Notes -
C# Example: Set the number of dots for the entity "DataMatrix1" to 4:

int CCI_Return = cci.ScSetEntityLongData("DataMatrix1", (int)


ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlLongDataIdDataMatrixNumberOfDots, 4);
C# Example: Get the current number of dots for the entity "DataMatrix":

int points_Per_Cell = cci.ScGetEntityLongData("DataMatrix1", (int)


ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlLongDataIdDataMatrixNumberOfDots);
Table 130: Data Matrix Points per Cell

Data Matrix Symbol Size Set


Get
DLL Function int CCI_Return = ScSetEntityLongData(string Entity_Name, int Data_ID, int Symbol_Size)
int Symbol_Size = ScGetEntityLongData(string Entity_Name, int Data_ID)

© 2022 SCAPS GmbH


Client Control Interface Manual - Job 108

Data Matrix Symbol Size Set


Get
ASCII Function int CCI_Return = ScCciSetEntityLongData(string Entity_Name, int Data_ID, int Symbol_Size)
int Symbol_Size = ScCciGetEntityLongData(string Entity_Name, int Data_ID)
Description Set or get the symbols size in the data matrix.
Entity_Name Type: string Unit: none
Specify the entity to be changed.
Data_ID Type: int ID:
Location: ScComSAMLightClientCtrlFlags
scComSAMLightClientCtrlLongDataIdDataMatrixSymbolSize 105
Symbol_Size Type: int Unit: none
Parameter corresponds to the sizes in combo box, starting with 1.
CCI_Return Type: int
CCI return number, see error list.
Notes -
C# Example: Set the symbol size of the "DataMatrix1" entity to 8:

int CCI_Return = cci.ScSetEntityLongData("DataMatrix1", (int)


ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlLongDataIdDataMatrixSymbolSize, 8);
C# Example: Get the value of the symbol size of the entity "DataMatrix1":

int symbolSize = cci.ScGetEntityLongData("DataMatrix1", (int)


ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlLongDataIdDataMatrixSymbolSize);
Table 131: Data Matrix Symbols Size

6.1.2.2 QR-Code
· QR Code Settings

QR Code Settings Set


Get
DLL Function int CCI_Return = ScSetEntityLongData(string Entity_Name, int Data_ID, int Flag)
int Flag = ScGetEntityLongData(string Entity_Name, int Data_ID)
ASCII Function int CCI_Return = ScCciSetEntityLongData(string Entity_Name, int Data_ID, int Flag)
int Flag = ScCciGetEntityLongData(string Entity_Name, int Data_ID)
Description Set or get the state of the checkboxes from Barcode Extended settings (availiable
only for the QR Code Ex barcode type).
Entity_Name Type: string Unit: none
Specify the entity to be changed.
Data_ID Type: int ID:
Location: ScComSAMLightClientCtrlFlags
scComSAMLightClientCtrlLongDataIdQrCodeExSetMode 127
Enable checkboxes.
scComSAMLightClientCtrlLongDataIdQrCodeExClearMode 128
Disable checkboxes.
Flag Type: int Flag:
Location: ScComSAMLightClientCtrlFlags
scComSAMLightClientCtrlLongDataIdQrCodeExModeDots 0x1

© 2022 SCAPS GmbH


Client Control Interface Manual - Job 109

QR Code Settings Set


Get
scComSAMLightClientCtrlLongDataIdQrCodeExModeCells 0x10000
scComSAMLightClientCtrlLongDataIdQrCodeExModeTextFreelyEditabl 0x80000
e
CCI_Return Type: int
CCI return number, see error list.
Notes · This Flags value is usually a combination of multiple flags. See the chapter How to
work with flags to learn more about combining multiple flags
C# Example: Enable the generate dots checkbox and disable the FreelyEditable checkbox:

int checkbox_Enable = (int)ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlLongDataIdQrCodeExModeDots;


int CCI_Return_01 = cci.ScSetEntityLongData("QRCode1", (int)
ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlLongDataIdQrCodeExSetMode, checkboxEnable);

int checkbox_Disable = (int)


ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlLongDataIdQrCodeExModeTextFreelyEditable;
int CCI_Return_02 = cci.ScSetEntityLongData("QRCode1", (int)
ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlLongDataIdQrCodeExClearMode, checkboxDisable);
Table 132: QR Code Settings

6.1.3 Bitmap
· Bitmap Blank Threshold
· Bitmap Line Index Step
· Entity Specific Bitmap Settings
· Export Scanner Bitmap
· Pixel Map Size

Bitmap Blank Threshold Set


Get
DLL Function int CCI_Return = ScSetEntityLongData(string Entity_Name, int Data_ID, int Blank_Threshold)
int Blank_Threshold = ScGetEntityLongData(string Entity_Name, int Data_ID)
ASCII Function int CCI_Return = ScCciSetEntityLongData(string Entity_Name, int Data_ID, int Blank_Threshold)
int Blank_Threshold = ScCciGetEntityLongData(string Entity_Name, int Data_ID)
Description Set or get the state of the bitmap blank threshold flag.
Entity_Name Type: string Unit: none
Specify the entity to be changed.
Data_ID Type: int ID:
Location: ScComSAMLightClientCtrlFlags
scComSAMLightClientCtrlLongDataIdBitmapBlankThreshold 122
Blank_Threshold Type: int Unit: none
· 0: Disable.
· 1: Enable.
CCI_Return Type: int
CCI return number, see error list.
Notes · Make sure the flag for mode grayscale, show bitmap and show scanner are set so
that the checkbox is to activate.
C# Example: Activate the bitmap blank threshold flag:

© 2022 SCAPS GmbH


Client Control Interface Manual - Job 110

Bitmap Blank Threshold Set


Get
int CCI_Return = cci.ScSetEntityLongData("bmp1",(int)
ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlLongDataIdBitmapBlankThreshold, 1);
Table 133: Bitmap Blank Threshold

Bitmap Line Index Step Set


Get
DLL Function int CCI_Return = ScSetEntityLongData(string Entity_Name, int Data_ID, int Index_Step)
int Index_Step = ScGetEntityLongData(string Entity_Name, int Data_ID)
ASCII Function int CCI_Return = ScCciSetEntityLongData(string Entity_Name, int Data_ID, int Index_Step)
int Index_Step = ScCciGetEntityLongData(string Entity_Name, int Data_ID)
Description This feature can be used to reduce local heating of the target material at marking
gray scale bitmaps. If ‘Line Index Step' = x > 1 the bitmap will not be marked line by
line in one run but in x runs where in each run every xth line will be marked.
Entity_Name Type: string Unit: none
Specify the entity to be changed.
Data_ID Type: int ID:
Location: ScComSAMLightClientCtrlFlags
scComSAMLightClientCtrlLongDataIdBitmapLineIndexStep 123
Index_Step Type: int Unit: none
For example a Line Index Step of '3' results in this marking order: 1, 4, 7, 10, .., 2, 5,
8, 11, .., 3, 6, 9, 12, ..
CCI_Return Type: int
CCI return number, see error list.
Notes -
C# Example: Set the line index step to 3:

int CCI_Return = cci.ScSetEntityLongData("bmp1",(int)


ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlLongDataIdBitmapLineIndexStep, 3);
C# Example: Get the line index step:

int Index_Step = cci.ScGetEntityLongData("bmp1",(int)


ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlLongDataIdBitmapLineIndexStep);
Table 134: Bitmap Blank Threshold

Entity Specific Bitmap Settings Set


Get
DLL Function int CCI_Return = ScSetEntityDoubleData(string Entity_Name, int Data_ID, double Parameter)
int CCI_Return = ScGetEntityDoubleData(string Entity_Name, int Data_ID, ref double Parameter)
ASCII Function int CCI_Return = ScCciSetEntityDoubleData(string Entity_Name, int Data_ID, double Parameter)
double Parameter = ScCciGetEntityDoubleData(string Entity_Name, int Data_ID)
Description Various entity specific parameters can be changed with the commands below.
Entity_Name Type: string Unit: none
Specify the entity to be changed.
Data_ID Type: int ID:
Location: ScComSAMLightClientCtrlFlags
scComSAMLightClientCtrlDoubleDataIdBitmapIntensity 33
Changes the intensity of the related bitmap. Range: [0,2]
scComSAMLightClientCtrlDoubleDataIdBitmapBrightness 34

© 2022 SCAPS GmbH


Client Control Interface Manual - Job 111

Entity Specific Bitmap Settings Set


Get
Changes the brightness of the related bitmap. Range: [-1,1]
scComSAMLightClientCtrlDoubleDataIdBitmapDitherstep 35
Changes the rasterization size of the scanner bitmap. Units: [mm/pixel]
Parameter Type: int Unit: none
Enter the corresponding parameter.
CCI_Return Type: int
CCI return number, see error list.
Notes · After changing the above parameters it is necessary to recreate the entity by
resetting the bitmap flags. Please refer to the example below.
C# Example: Set the dither step value to 0.2 for the entity "bmp1":

int CCI_Return = cci.ScSetEntityDoubleData("bmp1", (int)


ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlDoubleDataIdBitmapDitherstep, 0.2);
C# Example: Get the intensity value for the entity "bmp1":

double Intensity = 0;
int CCI_Return = cci.ScGetEntityDoubleData("bmp1", (int)
ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlDoubleDataIdBitmapIntensity,ref Intensity);
Table 135: Entity Specific Bitmap Settings

Export Scanner Bitmap Set


Get
DLL Function int CCI_Return = ScSetEntityStringData(string Entity_Name, int Data_ID, string Path)
int CCI_Return = ScGetEntityStringData(string Entity_Name, int Data_ID, ref string Path)
ASCII Function int CCI_Return = ScCciSetEntityStringData(string Entity_Name, int Data_ID, string Path)
string Path = ScCciGetEntityStringData(string Entity_Name, int Data_ID)
Description Export a scanner bitmap.
Entity_Name Type: string Unit: none
Specify the entity based on the name.
Data_ID Type: int
Location: ScComSAMLightClientCtrlFlags
scComSAMLightClientCtrlStringDataIdExportScannerBmp 36
Path Type: string Unit: none
Specify the path.
CCI_Return Type: int
CCI return number, see error list.
Notes · A scanner bitmap must exists in SAMLight.
C# Example: Export a scanner bitmap:

int CCI_Return = cci.ScSetEntityStringData("", (int)


ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlStringDataIdExportScannerBmp, @"C:");
Table 136: Export Scanner Bitmap

Pixel Map Size Set


Get
DLL Function int Pixel_Map_Size = ScGetLongValue(int Value_Type)

ASCII Function int Pixel_Map_Size = ScCciGetLongValue(int Value_Type)

© 2022 SCAPS GmbH


Client Control Interface Manual - Job 112

Pixel Map Size Set


Get
Description Return the size of the Pixel Map, means the number of the available Grey value
partitions.
Value_Type Type: int ID:
Location: ScComSAMLightClientCtrlValueTypes
scComSAMLightClientCtrlLongValueTypeSizePixelMap 42
Pixel_Map_Size Type: int Unit: none
The size of the Pixel Map.
Notes -
C# Example: Get the size of the pixel map:

int Pixel_Map_Size = cci.ScGetLongValue((int)


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlLongValueTypeSizePixelMap);
Table 137: Pixel Map Size

6.1.4 Serial Number


· All Serial Numbers In Job
· Change Serial Number File
· Decrement Serial Number
· Increment Serial Number
· Reset Serial Number
· Serial Number Global Settings
· Serial Number Modes
· Serial Number Specifications

All Serial Numbers In Job Set


Get
DLL Function int CCI_Return = ScSetLongValue(int Value_Type, int SN_In_Job)
int SN_In_Job = ScGetLongValue(int Value_Type)
ASCII Function int CCI_Return = ScCciSetLongValue(int Value_Type, int SN_In_Job)
int SN_In_Job = ScCciGetLongValue(int Value_Type)
Description Set or get the state of the "enable" checkbox under "All Serial Numbers in Job" on
entity property page.
Value_Type Type: int ID:
Location: ScComSAMLightClientCtrlValueTypes
scComSAMLightClientCtrlLongValueTypeEnableAllSerialNumbersInJob 95
SN_In_Job Type: int Unit: none
· 0: Disable.
· 1: Enable.
CCI_Return Type: int
CCI return number, see error list.
Notes -
C# Example: Enable all serial numbers in the job:

© 2022 SCAPS GmbH


Client Control Interface Manual - Job 113

All Serial Numbers In Job Set


Get
int CCI_Return = cci.ScSetLongValue((int)
ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlLongValueTypeEnableAllSerialNumbersInJob, 1);
C# Example: Check the status of the checkbox:

int checkbox = cci.ScGetLongValue((int)


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlLongValueTypeEnableAllSerialNumbersInJob);
Table 138: All Serial Numbers In Job

Change Serial Number File Set


Get
DLL Function int CCI_Return = ScSetEntityStringData(string Entity_Name, int Data_ID, string Name)

ASCII Function int CCI_Return = ScCciSetEntityStringData(string Entity_Name, int Data_ID, string Name)

Description This is used to change the file name of a serial number list in txt/xlsx format. This is
recommended to use with ResetSerialNumber together.
Entity_Name Type: string Unit: none
Specify the entity to be changed.
Data_ID Type: int ID:
Location: ScComSAMLightClientCtrlFlags
scComSAMLightClientCtrlStringDataIdEntitySerialASCIIFileName or 24
scComSAMLightClientCtrlStringDataIdEntitySerialExcelFileName
Name Type: string Unit: none
Enter the new path.
CCI_Return Type: int
CCI return number, see error list.
Notes · The "from File" checkbox has to be activated before.
· You can insert an existing path. No new files will be created with this command.
C# Example: Change the serial numbers file path to the file "serial2.txt" (for the entity "SerialEntity1"):

string new_Name = "C:/Users/Support/serial2.txt";


int CCI_Return = cci.ScSetEntityStringData("SerialEntity1", (int)
ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlStringDataIdEntitySerialASCIIFileName, newName);
Table 139: Change Serial Number File

Decrement Serial Number Set


Get
DLL Function -

ASCII Function int CCI_Return = ScCciDecSerialNumbers

Description This call decrement all serial number entities.


CCI_Return Type: int
CCI return number, see Error list.
Notes -
C# Example: -
Table 140: Decrement Serial Numbers

© 2022 SCAPS GmbH


Client Control Interface Manual - Job 114

Increment Serial Number Set


Get
DLL Function -

ASCII Function int CCI_Return = ScCciIncSerialNumbers

Description This call increments all serial number entities.


CCI_Return Type: int
CCI return number, see Error list.
Notes -
C# Example: -
Table 141: Increment Serial Numbers

Reset Serial Number Set


Get
DLL Function -

ASCII Function int CCI_Return = ScCciResetSerialNumbers

Description This call resets all serial number entities to their start values.
CCI_Return Type: int
CCI return number, see Error list.
Notes · Further command to reset via DLL function is given in Entities->Objects-
>SerialNumber
C# Example: -
Table 142: CCI Reset Serial Number

Serial Number Global Settings Set


Get
DLL Function int CCI_Return = ScExecCommand(int Cmd_ID)

ASCII Function int CCI_Return = ScCciExecCommand(int Cmd_ID)

Description Increment, decrement or reset all serial number entities in the job.
Cmd_ID Type: int ID:
Location: ScComSAMLightClientCtrlExecCommandConstants
scComSAMLightClientCtrlExecCommandResetSerialNumber 8
Reset all the serial numbers in the job.
scComSAMLightClientCtrlExecCommandIncSerialNumber 23
Increment all serial numbers.
scComSAMLightClientCtrlExecCommandDecSerialNumber 24
Decrement all serial numbers.
CCI_Return Type: int
CCI return number, see error list.
Notes -
C# Example: Reset all serial numbers:

int CCI_Return = cci.ScExecCommand((int)


ScComSAMLightClientCtrlExecCommandConstants.scComSAMLightClientCtrlExecCommandResetSerialNumber);
C# Example: Increment all serial numbers in the job:

int CCI_Return = cci.ScExecCommand((int)


ScComSAMLightClientCtrlExecCommandConstants.scComSAMLightClientCtrlExecCommandIncSerialNumber);

© 2022 SCAPS GmbH


Client Control Interface Manual - Job 115

Table 143: Serial Number Global Settings

Serial Number Modes Set


Get
DLL Function int CCI_Return = ScSetEntityLongData(string Entity_Name, int Data_ID, int Flag)
int Flag = ScGetEntityLongData(string Entity_Name, int Data_ID)
ASCII Function int CCI_Return = ScCciSetEntityLongData(string Entity_Name, int Data_ID, int Flag)
int Flag = ScCciGetEntityLongData(string Entity_Name, int Data_ID)
Description Change the type of the serial number input.
Entity_Name Type: string Unit: none
Specify the entity to be changed.
Data_ID Type: int ID:
Location: ScComSAMLightClientCtrlFlags
scComSAMLightClientCtrlLongDataIdEntitySerialNumModesFlags 117
Flag Type: int Flag:
Location: None
scComSerialNumber2DModeText 0x1
scComSerialNumber2DModeBarCode 0x2
scComSerialNumber2DModeASCIIFile 0x4
scComSerialNumber2DModeDateTime 0x8
scComSerialNumber2DModeCustomFormat 0x10
CCI_Return Type: int
CCI return number, see error list.
Notes · You can only use one flag at once.
C# Example: Set the serial number mode to DateTime (for the entity "SerialEntity1"):

int Mode = 0X8;


int CCI_Return = cci.ScSetEntityLongData("SerialEntity1", (int)
ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlLongDataIdEntitySerialNumModesFlags, Mode);
C# Example: Get the current serial number mode of the entity "SerialEntity1":

int current_Mode = cci.ScGetEntityLongData("SerialEntity1", (int)


ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlLongDataIdEntitySerialNumModesFlags);
Table 144: Serial Number Modes

Serial Number Specifications Set


Get
DLL Function int CCI_Return = ScSetEntityLongData(string Entity_Name, int Data_ID, int Parameter)
int Parameter = ScGetEntityLongData(string Entity_Name, int Data_ID)
ASCII Function int CCI_Return = ScCciSetEntityLongData(string Entity_Name, int Data_ID, int Parameter)
int Parameter = ScCciGetEntityLongData(string Entity_Name, int Data_ID)
Description Change different serial number parameters for the defined entity.
Entity_Name Type: string Unit: none
Specify the entity to be changed.
Data_ID Type: int ID:
Location: ScComSAMLightClientCtrlFlags
scComSAMLightClientCtrlLongDataIdEntitySerialStartValue 71
Get or set the start value of a serial number.
scComSAMLightClientCtrlLongDataIdEntitySerialIncrValue 72

© 2022 SCAPS GmbH


Client Control Interface Manual - Job 116

Serial Number Specifications Set


Get
Get or set the increment value for a serial number object.
scComSAMLightClientCtrlLongDataIdEntitySerialCurrValue 73
Get the current value of a serial number.
scComSAMLightClientCtrlLongDataIdEntitySerialNumLines 77
Set the number of lies to be read from an ASCII file. Default is 1.
scComSAMLightClientCtrlLongDataIdEntitySerialBeatCount 79
Get or set the beat count of the serial number.
scComSAMLightClientCtrlLongDataIdEntitySerialResetCount 80
Get or set the reset count of the serial number.
Parameter Type: int Unit: none
The corresponding value.
CCI_Return Type: int
CCI return number, see error list.
Notes · The new values are used, after a serial number is reset by using
ResetSerialNumber.
C# Example: Change the start value for the entity "SerialEntity1" to 10:

//first set the new Start Value


int CCI_Return_01 = cci.ScSetEntityLongData("SerialEntity1", (int)
ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlLongDataIdEntitySerialStartValue, 10);
//reset all the serial numbers to update the start values
int CCI_Return_02 = cci.ScExecCommand((int)
ScComSAMLightClientCtrlExecCommandConstants.scComSAMLightClientCtrlExecCommandResetSerialNumber);
C# Example: Get the current increment value for the entity "SerialEntity2":

int serial_2_Inc = cci.ScGetEntityLongData("SerialEntity2", (int)


ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlLongDataIdEntitySerialIncrValue);
Table 145: Serial Number Specifications

6.1.5 Date Time


· Date Time Format

Date Time Format Set


Get
DLL Function int CCI_Return = ScSetEntityStringData(string Entity_Name, int Data_ID, string Format)
int CCI_Return = ScGetEntityStringData(string Entity_Name, int Data_ID, ref string Format)
ASCII Function int CCI_Return = ScCciSetEntityStringData(string Entity_Name, int Data_ID, string Format)
string Format = ScCciGetEntityStringData(string Entity_Name, int Data_ID)
Description This allows to get or set the format string of a date time bbject.
Entity_Name Type: string Unit: none
Specify the entity to be changed.

© 2022 SCAPS GmbH


Client Control Interface Manual - Job 117

Date Time Format Set


Get
Data_ID Type: int ID:
Location: ScComSAMLightClientCtrlFlags
scComSAMLightClientCtrlStringDataIdSerialNumberFormatString 27
Format Type: int Unit: none
The corresponding format. For the details on the DateTime format please refer to the
SAMLight manual.
CCI_Return Type: int
CCI return number, see error list.
Notes -
C# Example: Set date time format for the entity "DateTime1" as %y/%m/%d:

int CCI_Return = cci.ScSetEntityStringData( "DateTime1", ( int )


ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlStringDataIdSerialNumberFormatString, "%y/%m/%d" );
C# Example: Get date time format for the entity "DateTime1":

string Date_Time_Format = "";


int CCI_Return2 = cci.ScGetEntityStringData( "DateTime1", ( int )
ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlStringDataIdSerialNumberFormatString, ref
Date_Time_Format );
Table 146: Date Time Format

6.1.6 Text2D
· Change Text
· Change Text and Font
· Check Font Availability
· Spacing Mode
· Text2D Checkboxes
· Text Alignment
· Text Weight
· Various Text Parameters

Change Text Set


Get
DLL Function int CCI_Return = ScChangeTextByName(string Entity_Name, string Text)

ASCII Function int CCI_Return = ScCciChangeTextByName(string Entity_Name, string Text)

Description The string of the text object with the given Entity_Name can be set to the string
specified by the parameter Text. This function allows the dynamic change of text
objects. The different text objects are identified by their name.
Entity_Name Type: string Unit: none
· Specify the entity to be changed
· An empty string for a name in the parameter Text is valid too.
Text Type: string Unit: none
Enter the new text.
CCI_Return Type: int

© 2022 SCAPS GmbH


Client Control Interface Manual - Job 118

Change Text Set


Get
CCI return number, see error list.
Notes · It also possible to change the text of more than one entities with one function call.
Therefore set the Flag NamesSeparatedBySemicolon. Then separate the different
Entity_Names with a semicolon ';'. If you want to give the each entity a different
new string separate these strings by a vertical tab in the parameter Text.
· In C and C++ the vertical tab equals a '\v' whereas in Visual Basic the vertical tab
is ( vbVerticalTab ). Then the number of Entity_Names must be the same as the
number of names in the parameter Text.
C# Example: please refer to the Programming Examples: Create Entity Chapter
Table 147: Change Text

Change Text and Font Set


Get
DLL Function int CCI_Return = ScSetEntityStringData(string Entity_Name, int Data_ID, string Text)
int CCI_Return = ScGetEntityStringData(string Entity_Name, int Data_ID, ref string Text)
ASCII Function int CCI_Return = ScCciSetEntityStringData(string Entity_Name, int Data_ID, string Text)
string Text = ScCciGetEntityStringData(string Entity_Name, int Data_ID)
Description Edit the text of the Text2D entity or change the font
Entity_Name Type: string Unit: none
Specify the entity to be changed
Data_ID Type: int ID:
Location: ScComSAMLightClientCtrlFlags
scComSAMLightClientCtrlStringDataIdTextFontName 1
Change the text font.
scComSAMLightClientCtrlStringDataIdTextText 2
Change the text itself.
Text Type: string Unit: none
The corresponding text parameter.
CCI_Return Type: int
CCI return number, see error list.
Notes -
C# Example: Change the content of the "text1" entity and set "Arial" as font:

int CCI_Return_01 = cci.ScSetEntityStringData("text1", (int)


ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlStringDataIdTextFontName, "Arial");
int CCI_Return_02 = cci.ScSetEntityStringData("text1", (int)
ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlStringDataIdTextText, "New Part");
C# Example: Get the current content of the "text1" text entity:

string current_Text = "";


int CCI_Return = cci.ScGetEntityStringData("text1", (int)
ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlStringDataIdTextText, ref current_Text);
Table 148: Change Text and Font

Check Font Availability Set


Get
DLL Function int Font_Available = ScGetEntityLongData(string Entity_Name, int Data_ID)

ASCII Function int Font_Available = ScCciGetEntityLongData(string Entity_Name, int Data_ID)

© 2022 SCAPS GmbH


Client Control Interface Manual - Job 119

Check Font Availability Set


Get
Description This constant will examine if for the given Entity_Name the specified font is available
on the PC on which SAMLight is currently running. The return value will be 1 if the
fonts is available 0 if it is not.
Entity_Name Type: string Unit: none
Specify the entity to be changed.
Data_ID Type: int ID:
Location: ScComSAMLightClientCtrlFlags
scComSAMLightClientCtrlLongDataIdTextFontAvailable 10
Font_Available Type: int Unit: none
· 0: Not avaliable.
· 1: Avaliable.
Notes -
C# Example:

int font_available = cci.ScGetEntityLongData("text1", (int)


ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlLongDataIdTextFontAvailable);
Table 149: Check Font Availability

Find Entity with Text Set


Get
DLL Function int CCI_Return = ScGetEntityStringData(string Entity_Name, int Data_ID, ref string Parameter)

ASCII Function string Parameter = ScCciGetEntityStringData(string Entity_Name, int Data_ID)

Description Sucht Entity mit übergebenem Textinhalt, gibt Name des Entities zurück.
Entity_Name Type: string Unit: none
Specify the entity based on the name.
Data_ID Type: int
Location: ScComSAMLightClientCtrlFlags
scComSAMLightClientCtrlStringDataIdFindEntityWithText
Parameter Type: string Unit: none
The corresponding value.
CCI_Return Type: int
CCI return number, see error list.
Notes -
C# Example: How to use Entity String Data IDs

// Set content of text entity


int CCI_Return_01 = cci.ScSetEntityStringData( "Text_Entity", ( int )
ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlStringDataIdTextText, "Test" );

// Get content of text entity


string Entity_Text = "";
int CCI_Return_02 = cci.ScGetEntityStringData( "Text_Entity", ( int )
ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlStringDataIdTextText, ref Entity_Text );
Table 150: Find Entity with Text

© 2022 SCAPS GmbH


Client Control Interface Manual - Job 120

Spacing Mode Set


Get
DLL Function int CCI_Return = ScSetEntityLongData(string Entity_Name, int Data_ID, int Spacing_Mode)
int Spacing_Mode = ScGetEntityLongData(string Entity_Name, int Data_ID)
ASCII Function int CCI_Return = ScCciSetEntityLongData(string Entity_Name, int Data_ID, int Spacing_Mode)
int Spacing_Mode = ScCciGetEntityLongData(string Entity_Name, int Data_ID)
Description Swap between spacing given in SAMLight unit or percent.
Entity_Name Type: string Unit: none
Specify the entity to be changed
Data_ID Type: int ID:
Location: ScComSAMLightClientCtrlFlags
scComSAMLightClientCtrlLongDataIdUseMMForSpacing 144
Set character spacing mode to be set in [mm] or in %.
scComSAMLightClientCtrlLongDataIdUseMMforLineSpacing 145
Set line spacing mode to be set in [mm] or in %.
Spacing_Mode Type: int Unit: none
· 1 = use [mm]
· 0 = use factor (]0...1000]; 1= normal text spacing)
CCI_Return Type: int
CCI return number, see error list.
Notes · You can use only one parameter simultaneously.
C# Example: Set charcater spacing mode of entity "text1" to be set in [mm]:

int CCI_Return = cci.ScSetEntityLongData("text1", (int)


ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlLongDataIdTextUseMMForSpacing, 1 );
C# Example: Get Spacing Mode flag of entity "text1"

int SpacingType = cci.ScGetEntityLongData( "text1", ( int )


ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlLongDataIdTextUseMMForSpacing);
Table 151: Spacing Mode

Text2D Checkboxes Set


Get
DLL Function int CCI_Return = ScSetEntityLongData(string Entity_Name, int Data_ID, int Flag)
int Flag = ScGetEntityLongData(string Entity_Name, int Data_ID)
ASCII Function int CCI_Return = ScCciSetEntityLongData(string Entity_Name, int Data_ID, int Flag)
int Flag = ScCciGetEntityLongData(string Entity_Name, int Data_ID)
Description Enable multiple checkboxes from the Text Properties dialog-window.
Entity_Name Type: string Unit: none
Specify the entity to be changed.
Data_ID Type: int ID:
Location: ScComSAMLightClientCtrlFlags
scComSAMLightClientCtrlLongDataIdTextCharFlags 9
Flag Type: int Flag:
Location: ScComSAMLightClientCtrlFlags
ScComSAMLightClientCtrlLongDataIdTextCharFlagMonoSpaced 0x3
Set the Mono Spaced Flag in Text Properties dialog-window.
scComSAMLightClientCtrlLongDataIdTextCharFlagItalic 0x10000

© 2022 SCAPS GmbH


Client Control Interface Manual - Job 121

Text2D Checkboxes Set


Get
Set the Italic Flag.
scComSAMLightClientCtrlLongDataIdTextCharFlagRadial 0x20000
Set the Radial Flag in Text Properties dialog-window.
scComSAMLightClientCtrlLongDataIdTextCharFlagRadialAlignToCharOutline 0x40000
Set the Radial Align to Char Flag in Text Properties dialog-window.
scComSAMLightClientCtrlLongDataIdTextCharFlagReverseOrder 0x80000
Set the Reverse Flag in Text Properties dialog-window.
scComSAMLightClientCtrlLongDataIdTextCharFlagMirrorCharOnXAxi 0x100000
s
Set the Mirror X Flag in Text Properties dialog-window.
scComSAMLightClientCtrlLongDataIdTextCharFlagMirrorCharOnYAxi 0x200000
s
Set the Mirror Y Flag in Text Properties dialog-window.
scComSAMLightClientCtrlLongDataIdTextCharFlagSwapLines 0x400000
Set the Swap Lines Flag in Text Properties dialog-window.
scComSAMLightClientCtrlLongDataIdTextCharFlagSetToLimitLength 0x800000
Set checkbox force length in Text2D Extended.
scComSAMLightClientCtrlLongDataIdTextCharFlagSetToLimitHeight 0x100000
0
Set checkbox force height in Text2D Extended.
scComSAMLightClientCtrlLongDataIdTextCharFlagSetToLimitKeepAspect 0x200000
0
Set checkbox force keep aspect in Text2D Extended.
scComSAMLightClientCtrlLongDataIdTextCharFlagOrderBiDir 0x200000
0
Set the fourth Marking order symbol in Text Properties dialog-window.
scComSAMLightClientCtrlLongDataIdTextCharFlagOrderXDown 0x400000
0
Set the third Marking order symbol in Text Properties dialog-window.
scComSAMLightClientCtrlLongDataIdTextCharFlagRadialCenterMode 0x400000
0
Sets the 'center' checkbox for text in radial mode with the corresponding
RadialCenterX or RadialCenterY.
scComSAMLightClientCtrlLongDataIdTextCharFlagOrderYUp 0x800000
0
Set the second Marking order symbol in Text Properties dialog-window.
scComSAMLightClientCtrlLongDataIdTextCharFlagOrderYMainUp 0x10000000

Set the first Marking order symbol in Text Properties dialog-window.


CCI_Return Type: int
CCI return number, see error list.
Notes · some of these flags can be combined. For more information on single flags please
refer to the SAMLight manual.
C# Example: Set the following flags for the text entity "text1": Italic, mono spaced, mirror X:

int flags = (int)ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlLongDataIdTextCharFlagMonoSpaced;

© 2022 SCAPS GmbH


Client Control Interface Manual - Job 122

Text2D Checkboxes Set


Get
flags |= (int)ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlLongDataIdTextCharFlagItalic;
flags |= (int)ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlLongDataIdTextCharFlagMirrorCharOnXAxis;
int CCI_Return = cci.ScSetEntityLongData("text1", (int)
ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlLongDataIdTextCharFlags, flags);
C# Example: Get the current flags status:

int currentFlags = cci.ScGetEntityLongData("text1", (int)


ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlLongDataIdTextCharFlags);
Table 152: Text2D Checkboxes

Text Alignment Set


Get
DLL Function int CCI_Return = ScSetEntityLongData(string Entity_Name, int Data_ID, int Flag)
int Flag = ScGetEntityLongData(string Entity_Name, int Data_ID)
ASCII Function int CCI_Return = ScCciSetEntityLongData(string Entity_Name, int Data_ID, int Flag)
int Flag = ScCciGetEntityLongData(string Entity_Name, int Data_ID)
Description Set or get the state of the text alignment.
Entity_Name Type: string Unit: none
Specify the entity to be changed.
Data_ID Type: int ID:
Location: ScComSAMLightClientCtrlFlags
scComSAMLightClientCtrlLongDataIdTextAlignment 2
Flag Type: int Flag:
Location: ScComSAMLightClientCtrlFlags
scComSAMLightClientCtrlTextAlignmentCenter 0x1
scComSAMLightClientCtrlTextAlignmentLeft 0x2
scComSAMLightClientCtrlTextAlignmentRight 0x4
scComSAMLightClientCtrlTextAlignmentTop 0x8
scComSAMLightClientCtrlTextAlignmentBottom 0x10
scComSAMLightClientCtrlTextAlignmentMiddle 0x20
scComSAMLightClientCtrlTextAlignmentRadialCenter 0x40
scComSAMLightClientCtrlTextAlignmentRadialEnd 0x80
scComSAMLightClientCtrlTextAlignmentLineLeft 0x100
scComSAMLightClientCtrlTextAlignmentLineRight 0x200
scComSAMLightClientCtrlTextAlignmentLineCenter 0x400
CCI_Return Type: int
CCI return number, see error list.
Notes · You can combine the horizontal and the vertical alignments values
C# Example: Set the alignment of the text for the text entity "text1" to "Alignment Right" and "Alignment
Bottom":

int CCI_Return = cci.ScSetEntityLongData( "text1", ( int )


ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlLongDataIdTextAlignment, ( int )
ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlTextAlignmentRight | ( int )
ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlTextAlignmentBottom );
C# Example: Get text alignment:

© 2022 SCAPS GmbH


Client Control Interface Manual - Job 123

Text Alignment Set


Get
int Text_Alignment = cci.ScGetEntityLongData( "text1", ( int )
ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlLongDataIdTextAlignment );
Table 153: Text Alignment

Text Weight Set


Get
DLL Function int CCI_Return = ScSetEntityLongData(string Entity_Name, int Data_ID, int Text_Weight)
int Text_Weight = ScGetEntityLongData(string Entity_Name, int Data_ID)
ASCII Function int CCI_Return = ScCciSetEntityLongData(string Entity_Name, int Data_ID, int Text_Weight)
int Text_Weight = ScCciGetEntityLongData(string Entity_Name, int Data_ID)
Description Modify the text weight.
Entity_Name Type: string Unit: none
Specify the entity to be changed
Data_ID Type: int ID:
Location: ScComSAMLightClientCtrlFlags
scComSAMLightClientCtrlLongDataIdTextWeight 50
Text_Weight Type: int Unit: none
· 100: Thin
· 200: ExtraLight
· 300: Light
· 400: Normal
· 500: Medium
· 600: SemiBold
· 700: Bold
· 800: ExtraBold
· 900: Heavy
CCI_Return Type: int
CCI return number, see error list.
Notes · You can use only one parameter simultaneously.
C# Example: Set the text weight of entity "text1" to bold:

int CCI_Return = cci.ScSetEntityLongData("text1", (int)


ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlLongDataIdTextWeight, 700);
Table 154: Text Weight

Various Text Parameters Set


Get
DLL Function int CCI_Return = ScSetEntityDoubleData(string Entity_Name, int Data_ID, double Parameter)
int CCI_Return = ScGetEntityDoubleData(string Entity_Name, int Data_ID, ref double Parameter)
ASCII Function int CCI_Return = ScCciSetEntityDoubleData(string Entity_Name, int Data_ID, double Parameter)
double Parameter = ScCciGetEntityDoubleData(string Entity_Name, int Data_ID)
Description Set or get various Text2D parameters.
Entity_Name Type: string Unit: none
Specify the entity to be changed.
Data_ID Type: int ID:
Location: ScComSAMLightClientCtrlFlags
scComSAMLightClientCtrlDoubleDataIdTextSize 1

© 2022 SCAPS GmbH


Client Control Interface Manual - Job 124

Various Text Parameters Set


Get
The parameter data contains the size of the text.
scComSAMLightClientCtrlDoubleDataIdTextCharSpacing 2
Change the character spacing of the string. Can be set in mm or % depending on
flag UseMMforSpacing.
scComSAMLightClientCtrlDoubleDataIdTextLengthLimit 3
Change the length limit of the text object.
scComSAMLightClientCtrlDoubleDataIdTextHeightLimit 4
Change the height limit of the text object.
scComSAMLightClientCtrlDoubleDataIdTextRadius 5
Change the radius of a radial text. Units: [mm]
scComSAMLightClientCtrlDoubleDataIdTextStartAngle 6
Change the start angle of a radial text. Units: [rad].
scComSAMLightClientCtrlDoubleDataIdTextRadialCenterX 9
Sets the center of a radial text on the x axis. The center checkbox can be enabled
with ScSetEntityLongData() with the flag 'RadialCenterMode'.
scComSAMLightClientCtrlDoubleDataIdTextRadialCenterY 10
Sets the center of a radial text on the y axis. The center checkbox can be enabled
with ScSetEntityLongData() with the flag 'RadialCenterMode'.
scComSAMLightClientCtrlDoubleDataIdTextLineSpacing 11
Change the line spacing value. Can be set in mm or % depending on flag
UseMMforLineSpacing.
scComSAMLightClientCtrlDoubleDataIdTextOrientation 36
Changes the orientation of a text. With a parameter of 0 for the data field of
ScSetEntityDoubleData() the text is oriented in horizontal direction. If the parameter
is pi/2 then the text is displayed vertically.
Parameter Type: double Unit: depends on constant
The corresponding value.
CCI_Return Type: int
CCI return number, see error list.
Notes -
C# Example:Set the radius to 30 mm and change the text size of the text entity "text1" to 20 mm:

// set the radius to 30 mm


int CCI_Return_01 = cci.ScSetEntityDoubleData("text1", (int)
ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlDoubleDataIdTextRadius, 30.0);

// change the font size


int CCI_Return_02 = cci.ScSetEntityDoubleData("text1", (int)
ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlDoubleDataIdTextSize, 20.0);
Table 155: Various Text Parameters

6.1.7 Control Objects


· IO Control Object (ScWaitForInput and ScSetOutput) Properties
· Enable Control
· Jump Entity
· MOTF Offset
· Motion Axis Add Control

© 2022 SCAPS GmbH


Client Control Interface Manual - Job 125

· Motion Entity Parameter Get


· Motion Entity Parameter Set
· Motion Entity String
· Timer Value

IO Control Object (ScWaitForInput and ScSetOutput) Properties Set


Get
DLL Function int CCI_Return = ScSetEntityLongData(string Entity_Name, int Data_ID, int Parameter)
int Parameter = ScGetEntityLongData(string Entity_Name, int Data_ID)
ASCII Function int CCI_Return = ScCciSetEntityLongData(string Entity_Name, int Data_ID, int Parameter)
int Parameter = ScCciGetEntityLongData(string Entity_Name, int Data_ID)
Description Set or get properties of ScWaitForInput and ScSetOutput entities.
Entity_Name Type: string Unit: none
Specify the entity to be changed.
Data_ID Type: int ID:
Location: ScComSAMLightClientCtrlFlags
scComSAMLightClientCtrlLongDataIdEntitySetOutputPulse 64
Set the pulse length of a ScSetOutput entitiy. Unit here: [µs]. Unit in SAMLight: [ms]
· Value greater than 0 enables the output pulse functionality and sets this pulse
length.
· Value -1 disables the pulse checkbox.
scComSAMLightClientCtrlLongDataIdEntityGetOutputPulse 69
Get the pulse length of a ScSetOutput entitiy. Unit here: [µs]. Unit in SAMLight: [ms].
Value is -1 means the pulse checkbox is disabled.
scComSAMLightClientCtrlLongDataIdEntityIoControlObjectMask 146
Mask is a decimal number that is best understood binary:
The bits represent a value:
· 0: ignored (SAMLight: "X")
· 1: used (SAMLight: "0" if Staten is 0, "1" if Staten is 1)
Some bits are undefined (gray). Which bit represents which in/output depends on the
hardware and is shown below.

USC-1:
0000_0000_0000_0000_0000_0000_0010_0000
| Opto_In/Out_0
Opto_In/Out_5

USC-2/-3:
0000_0000_0000_0000_0000_0000_0010_0000
| || Opto_In/Out_0
| | Opto_In/Out_5
| Digi_In/Out_0
Digi_In/Out_9

RTC3/4/5/6:
0000_0000_0000_0000_0000_0000_0010_0000
| Digi_In/Out_0
Digi_In/Out_15
Alternative mathematical representation of unsigned Mask:

© 2022 SCAPS GmbH


Client Control Interface Manual - Job 126

IO Control Object (ScWaitForInput and ScSetOutput) Properties Set


Get

scComSAMLightClientCtrlLongDataIdEntityIoControlObjectStates 147
States is a decimal number that is best understood binary:
The bits represent a value:
· 0: inactive (SAMLight: "X" if Maskn is 0, "0" if Maskn is 1)
· 1: active (SAMLight: "X" if Maskn is 0, "1" if Maskn is 1).
Some bits are undefined (gray). Which bit represents which in/output depends on the
hardware and is shown below.

USC-1:
0000_0000_0000_0000_0000_0000_0010_0000
| Opto_In/Out_0
Opto_In/Out_5

USC-2/-3:
0000_0000_0000_0000_0000_0000_0010_0000
| || Opto_In/Out_0
| | Opto_In/Out_5
| Digi_In/Out_0
Digi_In/Out_9

RTC3/4/5/6:
0000_0000_0000_0000_0000_0000_0010_0000
| Digi_In/Out_0
Digi_In/Out_15
Alternative mathematical representation of unsigned States:

Parameter Type: int Unit: depends on constant


The corresponding value.
CCI_Return Type: int
CCI return number, see error list.
Notes -
C# Example: Set ScWaitForInput "wait for input" values to "XXXX XXXX XXXX 10XX" Wait for
Opto_Out_2 to be inactive and Opto_Out_3 to be active, ignore all other inputs:

int CCI_Return_01 = cci.ScSetEntityLongData( "wait for input", ( int )


ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlLongDataIdEntityIoControlObjectMask, 12 );

© 2022 SCAPS GmbH


Client Control Interface Manual - Job 127

IO Control Object (ScWaitForInput and ScSetOutput) Properties Set


Get
int CCI_Return_02 = cci.ScSetEntityLongData( "wait for input", ( int )
ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlLongDataIdEntityIoControlObjectStates, 8 );
C# Example: Set ScSetOutput "set output" values to "XXXX XXXX XXXX XX1X" Set Opto_Out_1 to
active, ignore all other outputs:

int CCI_Return_01 = cci.ScSetEntityLongData( "set output", ( int )


ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlLongDataIdEntityIoControlObjectMask, 2 );
int CCI_Return_02 = cci.ScSetEntityLongData( "set output", ( int )
ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlLongDataIdEntityIoControlObjectStates, 2 );
C# Example: Get ScSetOutput "set output" values and interpret ScSetOutput Mask 96 and States 32:
int Mask = cci.ScGetEntityLongData( "set output", ( int )
ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlLongDataIdEntityIoControlObjectMask );
int States = cci.ScGetEntityLongData( "set output", ( int )
ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlLongDataIdEntityIoControlObjectStates );

Mask: (96)dec = (0000 0000 0110 0000)bin


States: (32)dec = (0000 0000 0010 0000)bin
Mask an States combined: "XXXX XXXX X01X XXXX" Set Opto_Out_5 to active, Set Digi_Out_0 to
inactive, ignore all other outputs.
C# Example: Set pulse value to 20 ms of ScSetOutput entity "set output":

int CCI_Return = cci.ScSetEntityLongData("set output", (int)


ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlLongDataIdEntitySetOutputPulse, 20000);
C# Example: Get output pulse length of the entity "set output":

int Pulse_Length = cci.ScGetEntityLongData("set output", (int)


ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlLongDataIdEntityGetOutputPulse);
Table 156: IO Control Object Properties

Enable Control Set


Get
DLL Function int CCI_Return = ScSetEntityLongData(string Entity_Name, int Data_ID, int Checkbox)
int Checkbox = ScCciGetEntityLongData(string Entity_Name, int Data_ID)
ASCII Function int CCI_Return = ScCciSetEntityLongData(string Entity_Name, int Data_ID, int Checkbox)
int Checkbox = ScCciGetEntityLongData(string Entity_Name, int Data_ID)
Description Set or get the enable checkbox state for control objects.
Entity_Name Type: string Unit: none
Specify the entity to be changed.
Data_ID Type: int ID:
Location: ScComSAMLightClientCtrlFlags
scComSAMLightClientCtrlLongDataIdEnableControl 126
Checkbox Type: int Unit: depends on constant
· 0: Deactivated.
· 1: Activated.
CCI_Return Type: int
CCI return number, see error list.
Notes -
C# Example: Disable the enable checkbox:

int CCI_Return = cci.ScSetEntityLongData("", (int)


ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlLongDataIdEnableControl, 0);

© 2022 SCAPS GmbH


Client Control Interface Manual - Job 128

Table 157: Enable Control

Jump Entity Set


Get
DLL Function int CCI_Return = ScSetEntityLongData(string Entity_Name, int Data_ID, int Enabled)
int Enabled = ScGetEntityLongData(string Entity_Name, int Data_ID)
ASCII Function int CCI_Return = ScCciSetEntityLongData(string Entity_Name, int Data_ID, int Enabled)
int Enabled = ScCciGetEntityLongData(string Entity_Name, int Data_ID)
Description Set or get the state of the ScJump entity.
Entity_Name Type: string Unit: none
Specify the entity to be changed.
Data_ID Type: int ID:
Location: ScComSAMLightClientCtrlFlags
scComSAMLightClientCtrlLongDataIdEntityJump 132
Enabled Type: int Unit: none
· 0: Disable.
· 1: Enable.
CCI_Return Type: int
CCI return number, see error list.
Notes -
C# Example: Disable the "jump1" entity:

int CCI_Return = cci.ScSetEntityLongData("junp1", (int)


ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlLongDataIdEntityJump, 0);
C# Example: Check, if the "jump1" entity is enabled:

int Enabled = cci.ScGetEntityLongData("jump1", (int)


ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlLongDataIdEntityJump);
Table 158: Jump Entity

MOTF Offset Set


Get
DLL Function int CCI_Return = ScSetEntityDoubleData(string Entity_Name, int Data_ID, double MOTF_Offset)
int CCI_Return = ScGetEntityDoubleData(string Entity_Name, int Data_ID, ref double
MOTF_Offset)
ASCII Function int CCI_Return = ScCciSetEntityDoubleData(string Entity_Name, int Data_ID, double
MOTF_Offset)
double MOTF_Offset = ScCciGetEntityDoubleData(string Entity_Name, int Data_ID)
Description Set or get the distance of a ScMotfOffset control object.
Entity_Name Type: string Unit: none
Specify the entity to be changed.
Data_ID Type: int ID:
Location: ScComSAMLightClientCtrlFlags
scComSAMLightClientCtrlDoubleDataIdMotfOffset 70
MOTF_Offset Type: double Unit: [mm]
The offset value.
CCI_Return Type: int
CCI return number, see error list.
Notes -

© 2022 SCAPS GmbH


Client Control Interface Manual - Job 129

MOTF Offset Set


Get
C# Example: Set the MOTF offset value to 10 mm for the entity "motfoff1":

int CCI_Return = cci.ScSetEntityDoubleData( "motfoff1", ( int )


ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlDoubleDataIdMotfOffset, 10.0 );
C# Example: Get the MOTF offset value for the "motfoff1" entity:

double MOTF_Offset = 0.0;


int CCI_Return = cci.ScGetEntityDoubleData( "motfoff1", ( int )
ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlDoubleDataIdMotfOffset, ref MOTF_Offset );
Table 159: CCI MOTF Offset

Motion Axis Add Control Set


Get
DLL Function int CCI_Return = ScSetDoubleValue(int Value_Type, double Position)

ASCII Function int CCI_Return = ScCciSetDoubleValue(int Value_Type, double Position)

Description Insert a new motion entity and set the corresponding position value.
Value_Type Type: int
Location: ScComSAMLightClientCtrlValueTypes
scComSAMLightClientCtrlDoubleValueTypeMotionAxisAddControl 64
Position Type: double Unit: depends on constant
The desired position coordinate.
CCI_Return Type: int
CCI return number, see error list.
Notes -
C# Example: Insert new motion entity at 60.0:

int CCI_Return = cci.ScSetDoubleValue( ( int )


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlDoubleValueTypeMotionAxisAddControl, 60.0 );
Table 160: Motion Axis Add Control

Motion Entity Parameter Get Set


Get
DLL Function int CCI_Return = ScGetEntityDoubleData(string Entity_Name, int Data_ID, ref double Parameter)

ASCII Function double Parameter = ScCciGetEntityDoubleData(string Entity_Name, int Data_ID)

Description Get a position of a motion control object.


Entity_Name Type: string Unit: none
Enter the name of the entity to be changed.
Data_ID Type: int ID:
Location: ScComSAMLightClientCtrlFlags
ScComSAMLightClientCtrlDoubleDataIdGetMotionCtrlPos 97
Parameter Type: double Unit: [mm]* or [deg]
The position of a motion control object.
CCI_Return Type: int
CCI return number, see error list.
Notes · MotionAxis has to be set first.
C# Example: Get position of motion control object "Motion1":

© 2022 SCAPS GmbH


Client Control Interface Manual - Job 130

Motion Entity Parameter Get Set


Get
double Motion_Position = 0.0;
int CCI_Return = cci.ScGetEntityDoubleData( "Motion1", ( int )
ScComSAMLightClientCtrlFlags.ScComSAMLightClientCtrlDoubleDataIdGetMotionCtrlPos, ref Motion_Position );
Table 161: Motion Entity Parameter Get

Motion Entity Parameter Set Set


Get
DLL Function int CCI_Return = ScSetEntityStringData(string Entity_Name, int Data_ID, string Parameter)

ASCII Function int CCI_Return = ScCciSetEntityStringData(string Entity_Name, int Data_ID, string Parameter)

Description Set parameter of a motion control object.


Entity_Name Type: string Unit: none
Specify the entity to be changed
Data_ID Type: int ID:
Location: ScComSAMLightClientCtrlFlags
scComSAMLightClientCtrlStringDataIdSetMotionCtrls 26
Parameter Type: string Unit: none
The format for Parameter is:
1. For one axis, parameters are separated by semicolon:
< axis Index: 0..6 or -1 for all axes > (can not be empty)
< position as float value > (can be an empty string (""))
< speed as float value > (can be an empty string)
< relative movement 0 or 1 > (can be an empty string)
2. For all axes:
Up to 7 one axis strings, separated by space (" ").
3. For more than one motion entity - with one single function call:
As standard for this case there are multiple all axes strings separated by a
vertical tab ("\v"). To activate this mode call: ScSetMode (ScGetMode() Or
'NamesSeparatedBySemicolon') Multiple entity names must be separated by a
semicolon.
CCI_Return Type: int
CCI return number, see error list.
Notes -
C# Example: Send the motion data to the motion entity "Motion1": First axis (0),2.2 mm target position, 33.3
mm/s speed, absolute movement (0); second axis (1), 4.4 mm target position, 55.5 mm/s speed, relative
movement (1):

int CCI_Return = cci.ScSetEntityStringData( "Motion1", ( int )


ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlStringDataIdSetMotionCtrls, "0;2.2;33.3;0
1;4.4;55.5;1" );
Table 162: Motion Entity Parameter Set

Motion Entity String Set


Get
DLL Function int CCI_Return = ScSetEntityStringData(string Entity_Name, int Data_ID, string Parameter)

ASCII Function int CCI_Return = ScCciSetEntityStringData(string Entity_Name, int DataID, string Parameter)

Description Set string of a string motion control object.


Entity_Name Type: string Unit: none
Specify the entity to be changed.
Data_ID Type: int ID:

© 2022 SCAPS GmbH


Client Control Interface Manual - Job 131

Motion Entity String Set


Get
Location: ScComSAMLightClientCtrlFlags
scComSAMLightClientCtrlStringDataIdSetMotionCtrlsString 33
Parameter Type: string Unit: none
The motion control string.
CCI_Return Type: int
CCI return number, see error list.
Notes -
C# Example: Set the motion string of entity "Motion1" to "MA 0":

int CCI_Return = cci.ScSetEntityStringData( "Motion1", ( int )


ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlStringDataIdSetMotionCtrlsString, "MA 0" );
Table 163: Motion Entity String

Timer Value Set


Get
DLL Function int CCI_Return = ScSetEntityLongData(string Entity_Name, int Data_ID, int Timer_Value)
int Timer_Value = ScGetEntityLongData(string Entity_Name, int Data_ID)
ASCII Function int CCI_Return = ScCciSetEntityLongData(string Entity_Name, int Data_ID, int Timer_Value)
int Timer_Value = ScCciGetEntityLongData(string Entity_Name, int Data_ID)
Description Set or get the timer value.
Entity_Name Type: string Unit: none
Specify the entity to be changed
Data_ID Type: int ID:
Location: ScComSAMLightClientCtrlFlags
scComSAMLightClientCtrlLongDataIdEntitySetTimerValue 61
By using this constant the time value of a ScTimer object can be changed.
scComSAMLightClientCtrlLongDataIdEntityGetTimerValue 66
The current delay time of the ScTimer entity is read.
Timer_Value Type: int Unit: [ms]
The timer value.
CCI_Return Type: int
CCI return number, see error list.
Notes -
C# Example: Set the timer entity "timer1" to 10ms:

int CCI_Return =cci.ScSetEntityLongData("timer1", (int)


ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlLongDataIdEntitySetTimerValue, 10);
C# Example: Get the current timer value of the timer entity "timer1"

int timer_value = cci.ScGetEntityLongData("timer1", (int)


ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlLongDataIdEntityGetTimerValue);
Table 164: Timer Value

© 2022 SCAPS GmbH


Client Control Interface Manual - Job 132

6.2 Entities Properties


· Count Entities
· Entity Placement
· Entity User Data
· Point Coordinate
· Select Entity
· User Value Double
· User Value String

Count Entities Set


Get
DLL Function int Entity_Num = ScGetLongValue(int Value_Type)

ASCII Function int Entity_Num = ScCciGetLongValue(int Value_Type)

Description Get the total number of entities.


Value_Type Type: int ID:
Location: ScComSAMLightClientCtrlValueTypes
scComSAMLightClientCtrlLongValueTypeTotalEntityNum 10
By using this type parameter it is possible to count the total number of available
entities including the ones that are nested in groups.
scComSAMLightClientCtrlLongValueTypeToplevelEntityNum 11
This parameter can be used to evaluate the top level entities. Using this value the
number of entities is returned which is visible on the highest level, excluding the
contents of groups.
Entity_Num Type: int Unit: none
Returns the number of entities
CCI_Return Type: int
CCI return number, see error list.
Notes -
C# Example: Count all the top level entities

int Entity_Num = cci.ScGetLongValue((int)


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlLongValueTypeTopLevelEntityNum);
Table 165: Count Entities

Entity Placement Set


Get
DLL Function int CCI_Return = ScSetEntityLongData(string Entity_Name, int Data_ID, int Parameter)
int Parameter = ScGetEntityLongData(string Entity_Name, int Data_ID)
ASCII Function int CCI_Return = ScCciSetEntityLongData(string Entity_Name, int Data_ID, int Parameter)
int Parameter = ScCciGetEntityLongData(string Entity_Name, int Data_ID)
Description Make an entity to hidden entity or move it to background.
Entity_Name Type: string Unit: none
Specify the entity to be changed.
Data_ID Type: int ID:
Location: ScComSAMLightClientCtrlFlags
scComSAMLightClientCtrlLongDataIdEntitySetAsBackgroundEntity 78

© 2022 SCAPS GmbH


Client Control Interface Manual - Job 133

Entity Placement Set


Get
Set the entity specified by Entity_Name to the background or foreground. To set it to
the background use 1 as parameter. To set it into the foreground use 0 as
parameter. The entity gets also set nonmarkable and noneditable.
scComSAMLightClientCtrlLongDataIdEntitySetAsHiddenEntity 112
Hides or shows the entity in View2D specified by the Entity_Name. To hide it in
View2D use 1 as parameter. To show it in View2D use 0 as parameter.
scComSAMLightClientCtrlLongDataIdEntityRedpointer 131
Set the entity to a redpointer entity.
scComSAMLightClientCtrlLongDataIdEntityNonMarkableEntity 140
Set the entity nonmarkable.
scComSAMLightClientCtrlLongDataIdEntityNonEditableEntity 141
Set the entity noneditable.
scComSAMLightClientCtrlLongDataIdEntityNonSplittablePre 142
Set the entity nonsplittable - pre mark.
scComSAMLightClientCtrlLongDataIdEntityNonSplittablePost 143
Set the entity nonsplittable - post mark.
Parameter Type: int Unit: none
· 0: Disable.
· 1: Enable.
CCI_Return Type: int
CCI return number, see error list.
Notes -
C# Example: Hide the entity "circle1" and move it to the background:

int CCI_Return_01 = cci.ScSetEntityLongData("circle1", (int)


ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlLongDataIdEntitySetAsHiddenEntity, 1);
int CCI_Return_02 = cci.ScSetEntityLongData("circle1", (int)
ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlLongDataIdEntitySetAsBackgroundEntity, 1);
C# Example: Check, if the "circle1" entity is a hidden entity:

int Is_Not_Hidden = cci.ScGetEntityLongData("circle1", (int)


ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlLongDataIdEntitySetAsHiddenEntity);
Table 166: Entity Placement

Entity User Data Set


Get
DLL Function int CCI_Return = ScSetEntityLongData(string Entity_Name, int Data_ID, int User_Data)
int User_Data = ScGetEntityLongData(string Entity_Name, int Data_ID)
ASCII Function int CCI_Return = ScCciSetEntityLongData(string Entity_Name, int Data_ID, int User_Data)
int User_Data = ScCciGetEntityLongData(string Entity_Name, int Data_ID)
Description Set or get some arbitrary long value inside the entity.
Entity_Name Type: string Unit: none
Specify the entity to be changed.
Data_ID Type: int ID:
Location: ScComSAMLightClientCtrlFlags
scComSAMLightClientCtrlLongDataIdUserData 1
User_Data Type: int Unit: none

© 2022 SCAPS GmbH


Client Control Interface Manual - Job 134

Entity User Data Set


Get
Your data.
CCI_Return Type: int
CCI return number, see error list.
Notes · The data you store with this command will not be visible inside the SAMLight
application and can be called using the ScGetEntityLongData command.
C# Example: Store some random numbers inside the entity "Entity1":

int CCI_Return = cci.ScSetEntityLongData("Entity1", (int)


ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlLongDataIdUserData, 123456);
C# Example: Read the entity specific long user data of the entity "Entity1":

int User_Data = cci.ScGetEntityLongData("Entity1", (int)


ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlLongDataIdUserData);
Table 167: Entity User Data

Point Coordinate Set


Get
DLL Function double Coordinate = ScGetDoubleValue(int Value_Type)

ASCII Function double Coordinate = ScGetDoubleValue(int Value_Type)

Description Returns the x, y and z coordinate of a point which is selected in SAMLight.


Value_Type Type: int ID:
Location: ScComSAMLightClientCtrlValueTypes
scComSAMLightClientCtrlDoubleValueTypeSelPointXPos 86
The X position.
scComSAMLightClientCtrlDoubleValueTypeSelPointYPos 87
The Y position.
scComSAMLightClientCtrlDoubleValueTypeSelPointZPos 88
The Z position.
Coordinate Type: double Unit: none
Get the current position.
CCI_Return Type: int
CCI return number, see error list.
Notes · If no point is selected the return value is '0'.
· If more than one point is selected, the command returns the coordinate of the first
selected point.
C# Example: Get the x coordinate:

double x_Pos = cci.ScGetDoubleValue((int)


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlDoubleValueTypeSelPointXPos);
Table 168: Point Coordinate

Select Entity Set


Get
DLL Function int CCI_Return = ScSetEntityLongData(string Entity_Name, int Data_ID, int Is_Selected)
int Is_Selected = ScGetEntityLongData(string Entity_Name, int Data_ID)
ASCII Function int CCI_Return = ScCciSetEntityLongData(string Entity_Name, int Data_ID, int Is_Selected)
int Is_Selected = ScCciGetEntityLongData(string Entity_Name, int Data_ID)

© 2022 SCAPS GmbH


Client Control Interface Manual - Job 135

Select Entity Set


Get
Description This function can be used to set or get the selection state of entities or to get
information whether the entity is selected.
Entity_Name Type: string Unit: none
Specify the entity to be changed.
Data_ID Type: int ID:
Location: ScComSAMLightClientCtrlFlags
scComSAMLightClientCtrlLongDataIdEntitySelected 3
Is_Selected Type: int Unit: none
· 0: Deselect.
· 1: Select.
CCI_Return Type: int
CCI return number, see error list.
Notes -
C# Example: Select the entity "square1":

int CCI_Return = cci.ScSetEntityLongData("square1", (int)


ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlLongDataIdEntitySelected, 1);
C# Example: Check, if the entity "circle1" is selected:

int is_Selected = cci.ScGetEntityLongData("circle1", (int)


ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlLongDataIdEntitySelected);
Table 169: Select Entity

User Value Double Set


Get
DLL Function int CCI_Return = ScSetDoubleValue(int Value_Type, double User_Value)
double User_Value = ScSetGoubleValue(int Value_Type)
ASCII Function int CCI_Return = ScCciSetDoubleValue(int Value_Type, double User_Value)
double User_Value = ScCciGetDoubleValue(int Value_Type)
Description Set or get a double value into an unused and hidden entity in the job. This entity will
be generated automatically unless it is already existing.
Value_Type Type: int ID:
Location: ScComSAMLightClientCtrlValueTypes
scComSAMLightClientCtrlDoubleValueTypeUserValue 20000-20015

User_Value Type: double Unit: none


The value you want to set or get.
CCI_Return Type: int
CCI return number, see error list.
Notes · The values from 20001 to 20015 can be used with the same functionality.
C# Example: Set the 20002'nd double user value to 100.0:

int CCI_Return = cci.ScSetDoubleValue(20002, 100.0)


C# Example: Read the content of the 20002'nd double user value:

double User_20002 = cci.ScGetDoubleValue(20002);


Table 170: Double User Value

© 2022 SCAPS GmbH


Client Control Interface Manual - Job 136

User Value String Set


Get
DLL Function int CCI_Return = ScSetStringValue(int Value_Type, string User_Value)
int CCI_Return = ScGetStringValue(int Value_Type, ref string User_Value)
ASCII Function int CCI_Return = ScCciSetEntityStringValue(int Value_Type, string User_Value)
string User_Value = ScCciGetEntityStringValue(int Value_Type)
Description Set or get a string value into an unused and hidden entity in the job. This entity will
be generated automatically unless it is already existing. The values from 20001 to
20009 can be used with the same functionality.
Value_Type Type: int ID:
Location: ScComSAMLightClientCtrlValueTypes
scComSAMLightClientCtrlStringValueTypeUserValue 20000-20009

User_Value Type: int Unit: none


The value you want to set or get.
CCI_Return Type: int
CCI return number, see error list.
Notes · The values from 20001 to 20009 can be used with the same functionality.
C# Example: Save some random string to the 20003'rd user value:

string random_Information = "Some random string";


int CCI_Return = cci.ScSetStringValue(20003, random_Information);
C# Example: Read the content of the 20003'rd user value:

string user_20003_string = "";


int CCI_Return = cci.ScGetStringValue(20003, ref user_20003_string);
Table 171: String User Value

6.2.1 Entity Naming


· Entity Name
· Group Name
· Top Level Entity Name

Entity Name Set


Get
DLL Function int CCI_Return = ScSetIDStringData(int Data_ID, int Index, string Name)
int CCI_Return = ScGetIDStringData(int Data_ID, int Index, ref string Name)
ASCII Function int CCI_Return = ScCciSetIDStringData(int Data_ID, int Index, string Name)
string Name = ScCciGetIDStringData(int Data_ID, int Index)
Description This is used to set/get the name of an entity by its index or the current entity name.
The index is zero based and starts from the top level going through the tree on the
base of the first object, going on with the siblings.
Data_ID Type: int ID:
Location: ScComSAMLightClientCtrlFlags
scComSAMLightClientCtrlStringDataIdGetEntityName 21
If not deactivated with a mode flag this will get the name the of a sub-entity based on
the index.
scComSAMLightClientCtrlStringDataIdSetEntityName 23

© 2022 SCAPS GmbH


Client Control Interface Manual - Job 137

Entity Name Set


Get
If not deactivated with a mode flag this will set the name of a sub-entity also (groups,
etc.) based on the index. To change the name based on the current name use
ScSetEntityStringData() or ScSetIDStringData().
Index Type: int Unit: none
Set or get the entity ID.
Name Type: string Unit: none
Set or get the entity name.
CCI_Return Type: int
CCI return number, see error list.
Notes -
C# Example: Set the name of the 0th entity to "newName":

int CCI_Return = cci.ScSetIDStringData((int)


ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlStringDataIdSetEntityName, 0, "newName");
C# Example: Get the name of the 10th entity:

string Name = "";


int CCI_Return = cci.ScGetIDStringData((int)
ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlStringDataIdGetEntityName, 10, ref Name);
Table 172: Entity Name

Group Name Set


Get
DLL Function int CCI_Return = ScSetStringValue(int Value_Type, string Group_Name)

ASCII Function int CCI_Return = ScCciSetStringValue(int Value_Type, string Group_Name)

Description Gives the grouped entities a name as string.


Value_Type Type: int ID:
Location: ScComSAMLightClientCtrlValueTypes
scComSAMLightClientCtrlStringValueTypeGroupingName 37
Group_Name Type: string Unit: none
The coresponding group name.
CCI_Return Type: int
CCI return number, see error list.
Notes -
C# Example: Set a group name:

int CCI_Return = cci.ScSetStringValue((int)


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlStringValueType, "Group_Name");
Table 173: Group Name

Top Level Entity Name Set


Get
DLL Function int CCI_Return = ScSetIDStringData(int Data_ID, int Index, string Name)
int CCI_Return = ScGetIDStringData(int Data_ID, int Index, ref string Name)
ASCII Function int CCI_Return = ScCciSetIDStringData(int Data_ID, int Index, string Name)
string Name = ScCciGetIDStringData(int Data_ID, int Index)
Description This value can be used to get the name of a top-level entity that is specified by a
zero based index number starting from 0 to 65535 (lower 16 bits). Use
GetEntityName when you want to iterate trough all levels.

© 2022 SCAPS GmbH


Client Control Interface Manual - Job 138

Top Level Entity Name Set


Get
Data_ID Type: int ID:
Location: ScComSAMLightClientCtrlFlags
scComSAMLightClientCtrlStringDataIdGetToplevelEntity 17
Get the name of a top level entity.
scComSAMLightClientCtrlStringDataIdSetToplevelEntity 25
Set the name of a top level entity.
Index Type: int Unit: none
The corresponding index of the entity.
Name Type: string Unit: none
The new name of the top-level entity.
CCI_Return Type: int
CCI return number, see error list.
Notes -
C# Example: Please refer to the Programming Examples: Retrieve Entities.
C# Example: Give the name to the very first top level entity:

int CCI_Return = cci.ScSetIDStringData((int)


ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlStringDataIdSetToplevelEntity, 0, "NewName");
Table 174: Top Level Entity Name

6.2.2 Entity Hierarchy


· Entity Grouping
· Entity Top Level

Entity Grouping Set


Get
DLL Function int CCI_Return = ScExecCommand(int Cmd_ID)

ASCII Function int CCI_Return = ScCciExecCommand(int Cmd_ID)

Description Group or ungroup selected entities.


Cmd_ID Type: int ID:
Location: ScComSAMLightClientCtrlExecCommandConstants
scComSAMLightClientCtrlExecCommandGroupEntities 59
Groups the manually or by EntitySelected selected entities and puts them into an
entities group.
scComSAMLightClientCtrlExecCommandUngroupEntities 60
Ungroups the manually or by EntitySelected selected entities group. The view level
of all entities inside the group will be decreased by one.
CCI_Return Type: int
CCI return number, see error list.
Notes -
C# Example: Select entities "entity1","entity2" and group them:

© 2022 SCAPS GmbH


Client Control Interface Manual - Job 139

Entity Grouping Set


Get
// Enable the possibility to set define multiple entities with one command
int cur_Mode = 0;
int CCI_Return_01 = cci.ScGetMode(ref cur_Mode);
cur_Mode |= (int)
ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlModeFlagEntity_NamesSeparatedBySemicolon;
cci.ScSetMode(cur_Mode);

// select 3 entities
int CCI_Return_02 = cci.ScSetEntityLongData("Entity1;Entity2;Entity3", (int)
ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlLongDataIdEntitySelected, 1);

// group the selected entities


int CCI_Return_03 = cci.ScExecCommand((int)
ScComSAMLightClientCtrlExecCommandConstants.scComSAMLightClientCtrlExecCommandGroupEntities);
Table 175: Entity Grouping

Entity Top Level Set


Get
DLL Function int CCI_Return = ScSetStringValue(int Value_Type, string Entity_Name)

ASCII Function int CCI_Return = ScCciSetStringValue(int Value_Type, string Entity_Name)

Description Sets the entity inside the job with the specified name to the top level entity.
Value_Type Type: int ID:
Location: ScComSAMLightClientCtrlValueTypes
scComSAMLightClientCtrlStringValueTypeSetToTopLevelEntity 17
Entity_Name Type: string Unit: none
The entity name to be set to the top level.
CCI_Return Type: int
CCI return number, see error list.
Notes -
C# Example: Set the entity with the name "entity1" to the top level:

int CCI_Return = cci.ScSetStringValue((int)


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlStringValueTypeSetToTopLevelEntity, "entity1");
Table 176: Entity Top Level

6.2.3 Transformations
· Center Entity
· Entity Outline
· Entity Rotation Angle
· Mirror Entity
· Outline 2D
· Rotate Entity
· Rotate Entity (DataID)
· Rotation Angle & Outline
· Scale Entity
· Scale Entity (Current Position)
· Translate Entity
· Translate Entity (DataID)

© 2022 SCAPS GmbH


Client Control Interface Manual - Job 140

Center Entity Set


Get
DLL Function int CCI_Return = ScSetEntityLongData(string Entity_Name, int Data_ID, int Axis)

ASCII Function int CCI_Return = ScCciSetEntityLongData(string Entity_Name, int Data_ID, int Axis)

Description Center the entities with respect to the defined axis


Entity_Name Type: string Unit: none
Specify the entity to be changed.
Data_ID Type: int ID:
Location: ScComSAMLightClientCtrlFlags
scComSAMLightClientCtrlLongDataIdEntityCenter 129
Axis Type: int Unit: none
· 6: Center horizontally
· 7: Center vertically
· 8: Center both
CCI_Return Type: int
CCI return number, see error list.
Notes -
C# Example: Center the entity "entity1" in both axes:

int CCI_Return = cci.ScSetEntityLongData( "entity1", ( int )


ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlLongDataIdEntityCenter, 8 );
Table 177: Center Entity

Entity Outline Set


Get
DLL Function double Value = ScGetEntityOutline(string Entity_Name, int Index)

ASCII Function double Value = ScCciGetEntityOutline(string Entity_Name, int Index)

Description Returns the outline of the current enitity specified by Entity_Name. The following
constants can be set for Index to specify which outline value has to be returned.
Entity_Name Type: string Unit: none
If Entity_Name is an empty string, the function returns the job outline.
Index Type: int ID:
Location: ScComSAMLightClientCtrlExecCommandConstants
scComSAMLightClientCtrlOutlineIndexMinX 0
The smallest x coordinate.
scComSAMLightClientCtrlOutlineIndexMinY 1
The smallest y coordinate.
scComSAMLightClientCtrlOutlineIndexMinZ 2
The smallest z coordinate.
scComSAMLightClientCtrlOutlineIndexMaxX 3
The biggest x coordinate.
scComSAMLightClientCtrlOutlineIndexMaxY 4
The biggest y coordinate.
scComSAMLightClientCtrlOutlineIndexMaxZ 5
The biggest z coordinate.
Value Type: double Unit: [mm]*

© 2022 SCAPS GmbH


Client Control Interface Manual - Job 141

Entity Outline Set


Get
The corresponding value.
Notes · The default unit is mm, but the user can select a different unit.
C# Example: Get the biggest x coordinate of the whole job:

double Max_X = cci.ScGetEntityOutline( "", 3 );

Table 178: Entity Outline

Entity Rotation Angle Set


Get
DLL Function int CCI_Return = ScSetEntityDoubleData(string Entity_Name, int Data_ID, double Rot_Angle)
int CCI_Return = ScGetEntityDoubleData(string Entity_Name, int Data_ID, ref double Rot_Angle)
ASCII Function double Rot_Angle = ScCciGetEntityDoubleData(string Entity_Name, int Data_ID)

Description Set or get the rotation angle of the selected entity.


Entity_Name Type: string Unit: none
Specify the entity to be changed.
Data_ID Type: int ID:
Location: ScComSAMLightClientCtrlFlags
scComSAMLightClientCtrlDoubleDataIdEntityRotationAngle 71
Rot_Angle Type: double Unit: [deg]
The rotation angle value.
CCI_Return Type: int
CCI return number, see error list.
Notes -
C# Example: Get the rotation angle of the entity "rotEntity1":

double Entity_Rotation_Angle = 0;
int CCI_Return = cci.ScGetEntityDoubleData( "rotEntity1", ( int )
ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlDoubleDataIdEntityRotationAngle, ref
Entity_Rotation_Angle );
C# Example: Set the rotation angle of the entity "rotEntity1" to 50°:
int CCI_Return = cci.ScSetEntityDoubleData( "rotEntity1", ( int )
ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlDoubleDataIdEntityRotationAngle, 50.0 );
Table 179: Entity Rotation Angle

Mirror Entity Set


Get
DLL Function int CCI_Return = ScSetEntityLongData(string Entity_Name, int Data_ID, int Mirror_Plane)

ASCII Function int CCI_Return = ScCciSetEntityLongData(string Entity_Name, int Data_ID, int Mirror_Plane)

Description Mirrors the specified entity along the specified plane. The same functionality as the
buttons of page Z-Dimension > Mirror and Rotate.
Entity_Name Type: string Unit: none
Specify the entity to be changed.
Data_ID Type: int ID:
Location: ScComSAMLightClientCtrlFlags
scComSAMLightClientCtrlLongDataIdEntityMirrorOnPlane 120
Mirror_Plane Type: int Unit: none

© 2022 SCAPS GmbH


Client Control Interface Manual - Job 142

Mirror Entity Set


Get
· 1: xz-plane with y = center of field
· 2: yz-plane with x = center of field
· 3: xy-plane with z = center of field
· 4: xz-plane with y = center of entity
· 5: yz-plane with x = center of entity
· 6: xy-plane with z = center of entity
CCI_Return Type: int
CCI return number, see error list.
Notes · You can set only one flag simultaneously.
C# Example: Mirror the entity "entity1" on the xz-plane with y in the center of field

int CCI_Return = cci.ScSetEntityLongData( "entity1", ( int )


ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlLongDataIdEntityMirrorOnPlane, 1 );
Table 180: Mirror Entity

Outline 2D Set
Get
DLL Function int CCI_Return = ScSetEntityOutline2D(string Entity_Name, double Min_X, double Min_Y, double
Max_X, double Max_Y, int Index)
int CCI_Return = ScGetEntityOutline2D(string Entity_Name, ref double Min_X, ref double Min_Y,
ref double Max_X, ref double Max_Y)
ASCII Function int CCI_Return = ScCciSetEntityOutline2D(string Entity_Name, double Min_X, double Min_Y,
double Max_X, double Max_Y, int Index)
double Min_X double Min_Y double Max_X double Max_Y = ScCciGetEntityOutline2D(string
Entity_Name)
Description With this command the total 2D outlines of all entities with Entity_Name can be set
or get.
Entity_Name Type: string Unit: none
If Entity_Name is an empty string, the function returns the job outline.
Min_X Type: double Unit: none
The smallest x coordinate.
Min_Y Type: double Unit: none
The smallest y coordinate.
Max_X Type: double Unit: none
The biggest x coordinate.
Max_Y Type: double Unit: none
The biggest y coordinate.
Index Type: int Index:
Location: ScComSAMLightClientCtrlFlags
- 0x0
Entity will be scaled like defined by the parameters.
scComSAMLightClientCtrlSetOutlineNoMove 0x1
Left down point will stay at current position. Just the dimension will be changed,
defined by: X_dim = Max_X - Min_X and Y_dim = Max_Y - Min_Y.
scComSAMLightClientCtrlSetOutlineNoSize 0x2
Specity the center coordinates. The dimension will be ignored.
X_center = Max_X - Min_X and Y_center = Max_Y - Min_Y.

© 2022 SCAPS GmbH


Client Control Interface Manual - Job 143

Outline 2D Set
Get
CCI_Return Type: int
CCI return number, see error list.
Note · For this command the index cannot be combined.
· This command can also be used for 1D entities. In this case make sure that Min_X
= Max_X or Min_Y = Max_Y.
C# Example: Set new outline for the entity "circle":

int CCI_Return = cci.ScSetEntityOutline2D( "circle", -15, -10, 20, 15, 0 );


C# Example: Get current outline of entity "circle":

double Min_X, Min_Y, Max_X, Max_Y;


Min_X = Min_Y = Max_X = Max_Y = 0.0;
int CCI_Return = cci.ScGetEntityOutline2D( "circle", ref Min_X, ref Min_Y, ref Max_X, ref Max_Y );
Table 181: Outline 2D

Rotate Entity Set


Get
DLL Function int CCI_Return = ScRotateEntity(string Entity_Name, double Center_X, double CenterY, double
Angle)
ASCII Function int CCI_Return = ScCciRotateEntity(string Entity_Name, double Center_X, double Y, double
Angle)
Description Rotates the entity specified by Entity_Name.
Entity_Name Type: string Unit: none
The Entity to be scaled.
Center_X Type: double Unit: none
The origin of the rotation with respect to the x-axis
Center_Y Type: double Unit: none
The origin of the rotation with respect to the y-axis
Angle Type: double Unit: [deg]
the rotation angle. Counterclockwise for positive angles.
CCI_Return Type: int
CCI return number, see error list.
Notes · If Entity_Name is an empty string the complete job is rotated.
C# Example: Rotate the entity "entity1" by 45.5 degrees around the origin:

int CCI_Return = cci.ScRotateEntity( "entity1", 0.0, 0.0, 45.5 );


Table 182: Rotate Entity

Rotate Entity (DataID) Set


Get
DLL Function int CCI_Return = ScSetEntityStringData(string Entity_Name, int Data_ID, string Rotation_Param)

ASCII Function int CCI_Return = ScCciSetEntityStringData(string Entity_Name, int Data_ID, string


Rotation_Param)
Description This allows to rotate the entity or entities defined by Entity_Name.
Entity_Name Type: string Unit: none
Specify the entity to be changed.
Data_ID Type: int ID:
Location: ScComSAMLightClientCtrlFlags

© 2022 SCAPS GmbH


Client Control Interface Manual - Job 144

Rotate Entity (DataID) Set


Get
scComSAMLightClientCtrlStringDataIdRotate 30
Rotation_Param Type: string Unit: none
"CenterX;CenterY;Angle" defining the center of the rotation and the rotation angle
CCI _Return Type: int
CCI return number, see error list.
Notes · If used for multiple entities Entity_NamesSeparatedBySemicolon has to be set. In
this case Rotation_Param holds for each single entity the rotation vector as
"CenterX; CenterY; Angle" separated by a vertical Tab.
C# Example: Rotate the entity "entity1" by 45 degrees about the center at (0,0):

int CCI_Return = cci.ScSetEntityStringData( "entity1", ( int )


ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlStringDataIdRotate, "0.0; 0.0; 45.0" );
Table 183: Rotate Entity

Rotation Angle & Outline Set


Get
DLL Function int CCI_Return = ScGetEntityStringData(string Entity_Name, int Data_ID, ref string Outl_Angle)

ASCII Function string Outl_Angle = ScCciGetEntityStringData(string Entity_Name, int Data_ID)

Description This allows to get the Outline and the Rotation Angle of the Entities defined by
Entity_Name.
Entity_Name Type: string Unit: none
Specify the entity to be changed
Data_ID Type: int ID:
Location: Location: ScComSAMLightClientCtrlFlags
scComSAMLightClientCtrlStringDataIdOutlineAndRotate 31
Outl_Angle Type: string Unit: none
Returns the outline and the rotation angle in the following format:
"MinX;MinY;MaxX;MaxY;Angle"
CCI_Return Type: int
CCI return number, see error list.
Notes · If used for multiple entities Entity_NamesSeparatedBySemicolon has to be set.
Outl_Angle will hold the Outlines and Rotation Angle in a list in the format
"MinX;MinY;MaxX;MaxY;Angle".
C# Example: Get the outline and the rotation angle of the entity "entity1":

string Outl_Angle = "";


int CCI_Return = cci.ScGetEntityStringData( "entity1", ( int )
ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlStringDataIdOutlineAndRotate, ref Outl_Angle );
Table 184: Rotation Angle & Outline

Scale Entity Set


Get
DLL Function int CCI_Return = ScScaleEntity(string Entity_Name, double Scale_X, double Scale_Y, double
Scale_Z)
ASCII Function int CCI_Return = ScCciScaleEntity(string Entity_Name, double Scale_X, double Scale_Y, double
Scale_Z)
Description Scales the entity specified by Entity_Name. The scaling center is the center of field.
Entity_Name Type: string Unit: none

© 2022 SCAPS GmbH


Client Control Interface Manual - Job 145

Scale Entity Set


Get
The Entity to be scaled.
Scale_X Type: double Unit: none
Scaling coefficient in x direction.
Scale_Y Type: double Unit: none
Scaling coefficient in y direction.
Scale_Z Type: double Unit: none
Scaling coefficient in z direction.
CCI_Return Type: int
CCI return number, see error list.
Notes · If Entity_Name is set to an empty string the complete job is scaled.
C# Example: Scale the entity "entity1" by factor 2 in y direction:

int CCI_Return = cci.ScScaleEntity( "entity1", 1.0, 2.0, 1.0 );


Table 185: Scale Entity

Scale Entity (Current Position) Set


Get
DLL Function int CCI_Return = ScScaleEntityCurPos(string Entity_Name, double Scale_X, double Scale_Y,
double Scale_Z)
ASCII Function int CCI_Return = ScCciScaleEntityCurPos(string Entity_Name, double Scale_X, double Scale_Y,
double Scale_Z)
Description Scales the entity specified by Entity_Name. The scaling center is the center of entity.
Entity_Name Type: string Unit: none
The Entity to be scaled.
Scale_X Type: double Unit: none
Scaling coefficient in x direction.
Scale_Y Type: double Unit: none
Scaling coefficient in y direction.
Scale_Z Type: double Unit: none
Scaling coefficient in z direction.
CCI_Return Type: int
CCI return number, see error list.
Notes · If Entity_Name is set to an empty string the complete job is scaled.
C# Example: Scale the entity "entity1" by factor 2 in y direction:

int CCI_Return = cci.ScScaleEntityCurPos( "entity1", 1.0, 2.0, 1.0 );


Table 186: Scale Entity (Current Position)

Translate Entity Set


Get
DLL Function int CCI_Return = ScTranslateEntity(string Entity_Name, double X, double Y, double Z)

ASCII Function int CCI_Return = ScCciTranslateEntity(string Entity_Name, double X, double Y, double Z)

Description Translates the entity specified by Entity_Name relative to its current position..
Entity_Name Type: string Unit: none
The Entity to be translated.

© 2022 SCAPS GmbH


Client Control Interface Manual - Job 146

Translate Entity Set


Get
X Type: double Unit: [mm]*
The relative x coordinate.
Y Type: double Unit: [mm]*
The relative y coordinate.
Z Type: double Unit: [mm]*
The relative z coordinate.
CCI_Return Type: int
CCI return number, see error list.
Notes · If Entity_Name is set to an empty string the complete job is translated.
· The default unit is mm, but the user can select a different unit.
C# Example: Translate the entity "entity1" by 15 mm in x direction:

int CCI_Return = cci.ScTranslateEntity( "entity1", 15.0, 0.0, 0.0 );


Table 187: Translate Entity

Translate Entity (DataID) Set


Get
DLL Function int CCI_Return = ScSetEntityStringData(string Entity_Name, int Data_ID, string Coordinates)

ASCII Function int CCI_Return = ScCciSetEntityStringData(string Entity_Name, int Data_ID, string Coordinates)

Description Translate the entity to a relative point.


Entity_Name Type: string Unit: none
This allows to translate the entity or entities defined by Entity_Name.
Data_ID Type: int ID:
Location: ScComSAMLightClientCtrlFlags
scComSAMLightClientCtrlStringDataIdTranslate 29
Coordinates Type: string Unit: none
"X;Y;Z" with X, Y and Z: the desired relative coordinates.
CCI_Return Type: int
CCI return number, see error list.
Notes · If used for multiple entities the Flag Entity_NamesSeparatedBySemicolon with
ScSetMode() has to be set. In this case the parameter Data holds for each single
entity the translation vector as "X;Y" separated by a vertical Tab.
C# Example: Translate the entity "entity1" by 50 mm in y direction:

int CCI_Return = cci.ScSetEntityStringData( "entity1", ( int )


ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlStringDataIdTranslate, "0.0; 50.0; 0.0" );
Table 188: Translate Entity (DataID)

© 2022 SCAPS GmbH


Client Control Interface Manual - Job 147

6.2.4 Hatch
· EnableHatch & HatchStyle
· Hatch Angle
· Hatch Beam Compensation
· Hatch Default Values
· Hatch Distance
· Hatch End Offset
· Hatch Flags
· Hatch Line Index Step
· Hatch Line Reduction
· Hatch Loop
· Hatch Loop Angle
· Hatch Minimal Jump
· Hatch Minimal Length
· Hatch Num Loops
· Hatch Point Offset
· Hatch Rehatch All
· Hatch Select Hatch Pair
· Hatch Start Offset

Enable Hatch & Hatch Style Set


Get
DLL Function int CCI_Return = ScSetEntityLongData(string Entity_Name, int Data_ID, int Hatch_Style)
int Hatch_Style = ScGetEntityLongData(string Entity_Name, int Data_ID)
ASCII Function int CCI_Return = ScCciSetEntityLongData(string Entity_Name, int Data_ID, int Hatch_Style)
int Hatch_Style = ScCciGetEntityLongData(string Entity_Name, int Data_ID)
Description Set or get the hatch styles of the both hatchers. Both hatchers can be enabled,
disabled or the actual mode can be retrieved.
Entity_Name Type: string Unit: none
The corresponding entity name.
Data_ID Type: int ID:
Location: ScComSAMLightClientCtrlFlags
scComSAMLightClientCtrlLongDataIdEnableHatching1 51
Enable the hatch 1.
scComSAMLightClientCtrlLongDataIdEnableHatching2 52
Enable the hatch 2.
Hatch_Style Type: int Flag:
Disable 0x0
Wavy line without marking jumps 0x1
Horizontal left to right without marking jumps 0x2
Horizontal right to left without marking jumps 0x3
Rotational 0x4
Wavy line including jumps 0x5
Zigzag 0x6

© 2022 SCAPS GmbH


Client Control Interface Manual - Job 148

Enable Hatch & Hatch Style Set


Get
CCI_Return Type: int
CCI return number, see error list.
Notes · Rotational, applies only to rectangle, ellipse and triangle structures in the current
version.
C# Example: Set hatch 1 to hatch style 4 (rotational):

int CCI_Return = cci.ScSetEntityLongData("", (int)


ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlLongDataIdEnableHatching1, 4);
C# Example: Get hatch style of hatch 2:

int Hatch_Style_2 = cci.ScGetEntityLongData("", (int)


ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlLongDataIdEnableHatching2);
Table 189: Enable Hatch & Hatch Style

Hatch Angle Set


Get
DLL Function int CCI_Return = ScSetEntityDoubleData(string Entity_Name, int Data_ID, double Hatch_Angle)
int CCI_Return = ScGetEntityDoubleData(string Entity_Name, int Data_ID, ref double Hatch_Angle)
ASCII Function int CCI_Return = ScCciSetEntityDoubleData(string Entity_Name, int Data_ID, double Hatch_Angle)
double Hatch_Angle = ScCciGetEntityDoubleData(string Entity_Name, int Data_ID)
Description This function can be used to set or get the hatch angles.
Entity_Name Type: string Unit: none
The corresponding entity name.
Data_ID Type: int ID:
Location: ScComSAMLightClientCtrlFlags
scComSAMLightClientCtrlDoubleDataIdHatchAngle1 38
Set hatch angle 1.
scComSAMLightClientCtrlDoubleDataIdHatchAngle2 46
Set hatch angle 2.
Hatch_Angle Type: double Unit: [rad]
The corresponding hatch angle.
CCI_Return Type: int
CCI return number, see error list.
Notes · Please note that the unit of angle in CCI project is [rad], whereas the unit in
SAMLight is [deg].
· These constants can also be used for drill. If it is desired to get and set the values
of entities in the Drill Geometry, "drill_geom_" should be added at the beginning of
the entity name. For example, if the entity name is "Test", in the CCI call the entity
name should be modified to "drill_geom_Test".
C# Example: Set hatch angle 1 to 45° = pi/4:

int CCI_Return = cci.ScSetEntityDoubleData("", (int)


ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlDoubleDataIdHatchAngle1, 0.785398163397448);
C# Example: Get hatch angle 2 for rectangle with entity name "rectangle":

double Hatch_Angle_2 = 0;
int CCI_Return = cci.ScGetEntityDoubleData("rectangle", (int)
ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlDoubleDataIdHatchAngle2, ref Hatch_Angle_2);
Table 190: Hatch Angle

© 2022 SCAPS GmbH


Client Control Interface Manual - Job 149

Hatch Beam Compensation Set


Get
DLL Function int CCI_Return = ScSetEntityDoubleData(string Entity_Name, int Data_ID, double Beam_Comp)
int CCI_Return = ScGetEntityDoubleData(string Entity_Name, int Data_ID, ref double
Beam_Comp)
ASCII Function int CCI_Return = ScCciSetEntityDoubleData(string Entity_Name, int Data_ID, double Beam_Comp)
double Beam_Comp = ScCciGetEntityDoubleData(string Entity_Name, int Data_ID)
Description Sets or gets the hatch beam compensation for hatch number one or two.
Entity_Name Type: string Unit: none
The corresponding entity name.
Data_ID Type: int ID:
Location: ScComSAMLightClientCtrlFlags
scComSAMLightClientCtrlDoubleDataIdHatchBeamcompensation1 43
Set hatch beamcompensation 1.
scComSAMLightClientCtrlDoubleDataIdHatchBeamcompensation2 51
Set hatch beamcompensation 2.
Beam_Comp Type: double Unit: [mm]*
The corresponding hatch beam compensation.
CCI_Return Type: int
CCI return number, see error list.
Notes · The default unit is mm, but the user can select a different unit.
C# Example: Set hatch beam compensation 1 to 0.05:

int CCI_Return = cci.ScSetEntityDoubleData("", (int)


ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlDoubleDataIdHatchBeamcompensation1, 0.05);
C# Example: Get hatch beam compensation 2 for rectangle with entity name "rectangle":

double Beam_Compensation_2 = 0;
int CCI_Return = cci.ScGetEntityDoubleData("rectangle", (int)
ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlDoubleDataIdHatchBeamcompensation2, ref
Beam_Compensation_2);
Table 191: Hatch Beam Compensation

Hatch Default Values Set


Get
DLL Function int CCI_Return = ScSetEntityLongData(string Entity_Name, int Data_ID, int Pair)

ASCII Function int CCI_Return = ScCciSetEntityLongData(string Entity_Name, int Data_ID, int Pair)

Description Set the selected hatch pair to default values.


Entity_Name Type: string Unit: none
The corresponding entity name.
Data_ID Type: int ID:
Location: ScComSAMLightClientCtrlFlags
scComSAMLightClientCtrlLongDataIdEntitySetToDefaultHatchPair 51
Pair Type: int Unit: none
Select the wanted hatch pair.
CCI_Return Type: int
CCI return number, see error list.
Notes · Rotational, applies only to rectangle, ellipse and triangle structures in the current
version.

© 2022 SCAPS GmbH


Client Control Interface Manual - Job 150

Hatch Default Values Set


Get
C# Example: Set hatch pair A to default:

int CCI_Return = cci.ScSetEntityLongData("", (int)


ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlLongDataIdEntitySetToDefaultHatchPair, A);
Table 192: Hatch Default Values

Hatch Distance Set


Get
DLL Function int CCI_Return = ScSetEntityDoubleData(string Entity_Name, int Data_ID, double Distance)
int CCI_Return = ScGetEntityDoubleData(string Entity_Name, int Data_ID, ref double Distance)
ASCII Function int CCI_Return = ScCciSetEntityDoubleData(string Entity_Name, int Data_ID, double Distance)
int Distance = ScCciGetEntityDoubleData(string Entity_Name, int Data_ID)
Description Sets or gets the hatch distance for the hatch number one or two.
Entity_Name Type: string Unit: none
The corresponding entity name.
Data_ID Type: int ID:
Location: ScComSAMLightClientCtrlFlags
scComSAMLightClientCtrlDoubleDataIdHatchDistance1 37
Set hatch distance 1.
scComSAMLightClientCtrlDoubleDataIdHatchDistance2 45
Set hatch distance 2.
Distance Type: double Unit: [mm]*
The corresponding hatch distance.
CCI_Return Type: int
CCI return number, see error list.
Notes · The default unit is mm, but the user can select a different unit.
C# Example: Set hatch distance 1 to 10:

int CCI_Return = cci.ScSetEntityDoubleData("", (int)


ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlDoubleDataIdHatchDistance1, 10);
C# Example: Get hatch distance 2:

double Hatch_Distance_2 = 0;
int CCI_Return = cci.ScGetEntityDoubleData("rectangle", (int)
ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlDoubleDataIdHatchDistance2, ref hatchdistance2);
Table 193: Hatch Distance

Hatch End Offset Set


Get
DLL Function int CCI_Return = ScSetEntityDoubleData(string Entity_Name, int Data_ID, double End_Offset)
int CCI_Return = ScGetEntityDoubleData(string Entity_Name, int Data_ID, ref double End_Offset)
ASCII Function int CCI_Return = ScCciSetEntityDoubleData(string Entity_Name, int Data_ID, double End_Offset)
double End_Offset = ScCciGetEntityDoubleData(string Entity_Name, int Data_ID)
Description Sets or gets the hatch endoffset for hatch number one or two.
Entity_Name Type: string Unit: none
The corresponding entity name.
Data_ID Type: int ID:
Location: ScComSAMLightClientCtrlFlags
scComSAMLightClientCtrlDoubleDataIdHatchEndoffset1 42

© 2022 SCAPS GmbH


Client Control Interface Manual - Job 151

Hatch End Offset Set


Get
Set hatch endoffset 1.
scComSAMLightClientCtrlDoubleDataIdHatchEndoffset2 50
Set hatch endoffset 2.
End_Offset Type: double Unit: [mm]*
The corresponding hatch endoffset.
CCI_Return Type: int
CCI return number, see error list.
Notes · The default unit is mm, but the user can select a different unit.
C# Example: Set hatch endoffset 1 to 0.05:

int CCI_Return = cci.ScSetEntityDoubleData("", (int)


ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlDoubleDataIdHatchEndoffset1, 0.05);
C# Example: Get hatch endoffset 2 for rectangle with entity name "rectangle".

double Hatch_Endoffset_2 = 0;
int CCI_Return = cci.ScGetEntityDoubleData("rectangle", (int)
ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlDoubleDataIdHatchEndoffset2, ref Hatch_Endoffset_2);
Table 194: Hatch End Offset

Hatch Flags Set


Get
DLL Function int CCI_Return = ScSetEntityLongData(string Entity_Name, int Data_ID, int Flag)
int Flag = ScGetEntityLongData(string Entity_Name, int Data_ID)
ASCII Function int CCI_Return = ScCciSetEntityLongData(string Entity_Name, int Data_ID, int Flag)
int Flag = ScCciGetEntityLongData(string Entity_Name, int Data_ID)
Description Get or set or clear the hatch flags for the given entity. Use SetHatchFlags to check
the flag and ClearHatchFlags to uncheck the flag.
Entity_Name Type: string Unit: none
The corresponding entity name.
Data_ID Type: int ID:
Location: ScComSAMLightClientCtrlFlags
scComSAMLightClientCtrlLongDataIdSetHatchFlags1 81
Set flags of hatch 1.
scComSAMLightClientCtrlLongDataIdSetHatchFlags2 82
Set flags of hatch 2.
scComSAMLightClientCtrlLongDataIdClearHatchFlags1 91
Clear flags of hatch 1.
scComSAMLightClientCtrlLongDataIdClearHatchFlags2 92
Clear flags of hatch 2.
Flag Type: int Flag:
Location: ScComSAMLightClientCtrlFlags
scComSAMLightClientCtrlLongDataIdHatchFlagNoSort 0x100
Checkbox Sort on the hatch property page.
scComSAMLightClientCtrlLongDataIdHatchFlagAllLines 0x400
Checkbox All lines on the hatch property page.
scComSAMLightClientCtrlLongDataIdHatchFlagPolyLineBeamComp 0x2000

© 2022 SCAPS GmbH


Client Control Interface Manual - Job 152

Hatch Flags Set


Get
This flag activates the NumLoops feature of the hatch. It will create a beam
compensation from outside to inside of the object. This works not only for
2D but also in SAM3D situation.
scComSAMLightClientCtrlLongDataIdHatchFlagDontFillRest 0x4000
Checkbox Don't fill reset on the hatch property page.
scComSAMLightClientCtrlLongDataIdHatchFlagKeepAngle 0x80000
Checkbox KeepAngle on the hatch property page.
scComSAMLightClientCtrlLongDataIdHatchFlagEqualizeDistance 0x100000
0
Checkbox Equalize Distance on the hatch property page.
scComSAMLightClientCtrlLongDataIdHatchFlagBeamComp 0x200000
LoopReverseOrder 0

This flag has to be used together with the hatch flag PolyLineBeamComp
and will generate NumLoops from inside to outside of the object.
CCI_Return Type: int
CCI return number, see error list.
Notes · This works not only for 2D but also in SAM3D situation.
C# Example: Activate the checkboxe Sort of hatch 1A:

int CCI_Return = cci.ScSetEntityLongData("", (int)


ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlLongDataIdClearHatchFlags1, (int)
ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlLongDataIdHatchFlagNoSort);
C# Example: Get current set hatch flags as hex value of hatch 1A:

int Hatch_Flags_1 = cci.ScGetEntityLongData("", (int)


ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlLongDataIdSetHatchFlags1);
Table 195: Hatch Flags

Hatch Line Index Step Set


Get
DLL Function int CCI_Return = ScSetEntityDoubleData(string Entity_Name, int Data_ID, double
Line_Index_Step)
int CCI_Return = ScGetEntityDoubleData(string Entity_Name, int Data_ID, ref double
Line_Index_Step)
ASCII Function int CCI_Return = ScCciSetEntityDoubleData(string Entity_Name, int Data_ID, double
Line_Index_Step)
double Line_Index_Step = ScCciGetEntityDoubleData(string Entity_Name, int Data_ID)
Description Sets or gets the hatch line index step for hatch number one or two.
Entity_Name Type: string Unit: none
The corresponding entity name.
Data_ID Type: int ID:
Location: ScComSAMLightClientCtrlFlags
scComSAMLightClientCtrlDoubleDataIdHatchLineIndexStep1 93
Set hatch line index step 1.
scComSAMLightClientCtrlDoubleDataIdHatchLineIndexStep2 94
Set hatch line index step 2.
Line_Index_Step Type: double Unit: [mm]*
The corresponding hatch line index step.

© 2022 SCAPS GmbH


Client Control Interface Manual - Job 153

Hatch Line Index Step Set


Get
CCI_Return Type: int
CCI return number, see error list.
Notes · Double value of hatch line index step must be between 1 and 1000000.
· The default unit is mm, but the user can select a different unit.
C# Example: Set hatch line index Step 1 to 2:

int CCI_Return = cci.ScSetEntityDoubleData("", (int)


ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlDoubleDataIdHatchLineIndexStep1, 2);
C# Example: Get hatch line index step 2 for rectangle with entity name "rectangle":

double Hatch_Line_Index_Step2 = 0;
int CCI_Return = cci.ScGetEntityDoubleData("rectangle", (int)
ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlDoubleDataIdHatchLineIndexStep2, ref
Hatch_Line_Index_Step2);
Table 196: Hatch Line Index Step

Hatch Line Reduction Set


Get
DLL Function int CCI_Return = ScSetEntityDoubleData(string Entity_Name, int Data_ID, double Line_Reduction)
int CCI_Return = ScGetEntityDoubleData(string Entity_Name, int Data_ID, ref double
Line_Reduction)
ASCII Function int CCI_Return = ScCciSetEntityDoubleData(string Entity_Name, int Data_ID, double
Line_Reduction)
double Line_Reduction = ScCciGetEntityDoubleData(string Entity_Name, int Data_ID)
Description Sets or gets the hatch line reduction for hatch number one or two.
Entity_Name Type: string Unit: none
The corresponding entity name.
Data_ID Type: int ID:
Location: ScComSAMLightClientCtrlFlags
scComSAMLightClientCtrlDoubleDataIdHatchLinereduct1 93
Set hatch line reduction 1.
scComSAMLightClientCtrlDoubleDataIdHatchLinereduct2 94
Set hatch line reduction 2.
Line_Reduction Type: double Unit: [mm]*
The corresponding hatch line reduction.
CCI_Return Type: int
CCI return number, see error list.
Notes · The default unit is mm, but the user can select a different unit.
C# Example: Set hatch line reduction 1 to 0.05:

int CCI_Return = cci.ScSetEntityDoubleData("", (int)


ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlDoubleDataIdHatchLinereduct1, 0.05);
C# Example: Get hatch line reduction 2 for rectangle with entity name "rectangle":

double Hatch_Line_Reduct_2 = 0;
int CCI_Return = cci.ScGetEntityDoubleData("rectangle", (int)
ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlDoubleDataIdHatchLinereduct2, ref
Hatch_Line_Reduct_2);
Table 197: Hatch Line Reduction

© 2022 SCAPS GmbH


Client Control Interface Manual - Job 154

Hatch Loop Set


Get
DLL Function int CCI_Return = ScSetEntityLongData(string Entity_Name, int Data_ID, int Loop)
int Loop = ScGetEntityLongData(string Entity_Name, int Data_ID)
ASCII Function int CCI_Return = ScCciSetEntityLongData(string Entity_Name, int Data_ID, int Loop)
int Loop = ScCciGetEntityLongData(string Entity_Name, int Data_ID)
Description Sets or gets the hatch loop for hatch number one or two.
Entity_Name Type: string Unit: none
The corresponding entity name.
Data_ID Type: int ID:
Location: ScComSAMLightClientCtrlFlags
scComSAMLightClientCtrlLongDataIdHatchLoop1 134
Set hatch loop angle 1.
scComSAMLightClientCtrlLongDataIdHatchLoop2 135
Set hatch loop angle 2.
Loop Type: int Unit: none
The corresponding hatch loop.
CCI_Return Type: int
CCI return number, see error list.
Notes -
C# Example: Set hatch loop 15:

int CCI_Return = cci.ScSetEntityDoubleData("", (int)


ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlLongDataIdHatchLoop1, 15);
C# Example: Get hatch loop angle 1:

double Hatch_Loop_1 = 0;
int CCI_Return = cci.ScGetEntityDoubleData("", (int)
ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlLoopDataIdHatchLoop1, ref Hatch_Loop_1);
Table 198: Hatch Loop

Hatch Loop Angle Set


Get
DLL Function int CCI_Return = ScSetEntityDoubleData(string Entity_Name, int Data_ID, double Loop_Angle)
int CCI_Return = ScGetEntityDoubleData(string Entity_Name, int Data_ID, ref double Loop_Angle)
ASCII Function int CCI_Return = ScCciSetEntityDoubleData(string Entity_Name, int Data_ID, double Loop_Angle)
double Loop_Angle = ScCciGetEntityDoubleData(string Entity_Name, int Data_ID)
Description Sets or gets the hatch loop angle for hatch number one or two.
Entity_Name Type: string Unit: none
The corresponding entity name.
Data_ID Type: int ID:
Location: ScComSAMLightClientCtrlFlags
scComSAMLightClientCtrlDoubleDataIdHatchLoopAngle1 99
Set hatch loop angle 1.
scComSAMLightClientCtrlDoubleDataIdHatchLoopAngle2 100
Set hatch loop angle 2.
Loop Type: double Unit: [deg]
The corresponding hatch loop angle.

© 2022 SCAPS GmbH


Client Control Interface Manual - Job 155

Hatch Loop Angle Set


Get
CCI_Return Type: int
CCI return number, see error list.
Notes -
C# Example: Set hatch loop angle 1 to 15:

int CCI_Return = cci.ScSetEntityDoubleData("", (int)


ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlDoubleDataIdHatchLoopAngle1, 15.0);
C# Example: Get hatch loop angle 1:

double Hatch_Loop_Angle_1 = 0;
int CCI_Return = cci.ScGetEntityDoubleData("", (int)
ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlDoubleDataIdHatchLinereduct2, ref Hatch_Loop_Angle_1);
Table 199: Hatch Loop Angle

Hatch Minimal Jump Set


Get
DLL Function int CCI_Return = ScSetEntityDoubleData(string Entity_Name, int Data_ID, double Min_Jump)
int CCI_Return = ScGetEntityDoubleData(string Entity_Name, int Data_ID, ref double Min_Jump)
ASCII Function int CCI_Return = ScCciSetEntityDoubleData(string Entity_Name, int Data_ID, double Min_Jump)
double Min_Jump = ScCciGetEntityDoubleData(string Entity_Name, int Data_ID)
Description Sets or gets the hatch minimal jump for hatch number one or two.
Data_ID Type: int ID:
Location: ScComSAMLightClientCtrlFlags
scComSAMLightClientCtrlDoubleDataIdHatchMinjump1 39
Set hatch minimal jump 1.
scComSAMLightClientCtrlDoubleDataIdHatchMinjump2 47
Set hatch minimal jump 2.
Entity_Name Type: string Unit: none
The corresponding entity name.
Min_Jump Type: double Unit: [mm]*
The corresponding hatch minimal jump.
CCI_Return Type: int
CCI return number, see error list.
Notes · The default unit is mm, but the user can select a different unit.
C# Example: Set hatch minimal jump 1 to 0.02:

int CCI_Return = cci.ScSetEntityDoubleData("", (int)


ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlDoubleDataIdHatchMinjump1, 0.02);
C# Example: Get hatch minimal jump 2 for rectangle with entity name "rectangle":

double hatch_min_jump_2 = 0;
int CCI_Return = cci.ScGetEntityDoubleData("rectangle", (int)
ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlDoubleDataIdHatchMinjump2, ref hatch_min_jump_2);
Table 200: Hatch Minimal Jump

Hatch Minimal Length Set


Get
DLL Function int CCI_Return = ScSetEntityDoubleData(string Entity_Name, int Data_ID, double Minimal_Length)
int CCI_Return = ScGetEntityDoubleData(string Entity_Name, int Data_ID, ref double
Minimal_Length)

© 2022 SCAPS GmbH


Client Control Interface Manual - Job 156

Hatch Minimal Length Set


Get
ASCII Function int CCI_Return = ScCciSetEntityDoubleData(string Entity_Name, int Data_ID, double
Minimal_Length)
double Minimal_Length = ScCciGetEntityDoubleData(string Entity_Name, int Data_ID)
Description Sets or gets the hatch minimal length for hatch number one or two.
Data_ID Type: int ID:
Location: ScComSAMLightClientCtrlFlags
scComSAMLightClientCtrlDoubleDataIdHatchMinLength1 84
Set Hatch Minimal Length 1.
scComSAMLightClientCtrlDoubleDataIdHatchMinLength2 86
Set Hatch Minimal Length 2.
Entity_Name Type: string Unit: none
The corresponding entity name.
Minimal_Length Type: double Unit: [mm]*
The corresponding hatch minimal length.
CCI_Return Type: int
CCI return number, see error list.
Notes · The default unit is mm, but the user can select a different unit.
C# Example: Set hatch minimal length 1 to 1:

int CCI_Return = cci.ScSetEntityDoubleData("", (int)


ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlDoubleDataIdHatchMinLength1, 1);
C# Example: Get hatch minimal length 2 for rectangle with entity name "rectangle":

double hatch_minimal_length_2 = 0;
int CCI_Return = cci.ScGetEntityDoubleData("rectangle", (int)
ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlDoubleDataIdHatchMinLength2, ref
hatch_minimal_length_2);
Table 201: Hatch Minimal Length

Hatch Num Loops Set


Get
DLL Function int CCI_Return = ScSetEntityDoubleData(string Entity_Name, int Data_ID, double Num_Loops)
int CCI_Return = ScGetEntityDoubleData(string Entity_Name, int Data_ID, ref double Num_Loops)
ASCII Function int CCI_Return = ScCciSetEntityDoubleData(string Entity_Name, int Data_ID, double Num_Loops)
double Num_Loops = ScCciGetEntityDoubleData(string Entity_Name, int Data_ID)
Description Sets or gets the hatch numloops for hatch number one or two.
Data_ID Type: int ID:
Location: ScComSAMLightClientCtrlFlags
scComSAMLightClientCtrlDoubleDataIdHatchNumloops1 44
Set hatch num loops 1.
scComSAMLightClientCtrlDoubleDataIdHatchNumloops2 52
Set hatch num loops 2.
Entity_Name Type: string Unit: none
The corresponding entity name.
Num_Loops Type: int Unit: none
The corresponding hatch num loops.
CCI_Return Type: int

© 2022 SCAPS GmbH


Client Control Interface Manual - Job 157

Hatch Num Loops Set


Get
CCI return number, see error list.
Notes -
C# Example: Set hatch NumLoops 1 to 5:

int CCI_Return = cci.ScSetEntityDoubleData("", (int)


ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlDoubleDataIdHatchNumloops1, 5);
C# Example: Get hatch NumLoops 2 for rectangle with entity name "rectangle":

double hatch_num_loops_2 = 0;
int CCI_Return = cci.ScGetEntityDoubleData("rectangle", (int)
ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlDoubleDataIdHatchNumloops2, ref hatch_num_loops_2);
Table 202: Hatch Num Loops

Hatch Point Offset Set


Get
DLL Function int CCI_Return = ScSetEntityDoubleData(string Entity_Name, int Data_ID, double Point_Offset)
int CCI_Return = ScGetEntityDoubleData(string Entity_Name, int Data_ID, ref double Point_Offset)
ASCII Function int CCI_Return = ScCciSetEntityDoubleData(string Entity_Name, int Data_ID, double Point_Offset)
double Point_Offset = ScCciGetEntityDoubleData(string Entity_Name, int Data_ID)
Description Sets or gets the hatch point offset for hatch number one or two.
Data_ID Type: int ID:
Location: ScComSAMLightClientCtrlFlags
scComSAMLightClientCtrlDoubleDataIdHatchPointOffset1 83
Set hatch point offset 1.
scComSAMLightClientCtrlDoubleDataIdHatchPointOffset2 85
Set hatch point offset 2.
Entity_Name Type: string Unit: none
The corresponding entity name.
Point_Offset Type: double Unit: [mm]*
The corresponding hatch point offset.
CCI_Return Type: int
CCI return number, see error list.
Notes · The default unit is mm, but the user can select a different unit.
C# Example: Set hatch PointOffset 1 to 1:

int CCI_Return = cci.ScSetEntityDoubleData("", (int)


ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlDoubleDataIdHatchPointOffset1, 5);
C# Example: Get hatch PointOffset 2 for rectangle with entity name "rectangle":

double hatch_point_offset_2 = 0;
int CCI_Return = cci.ScGetEntityDoubleData("rectangle", (int)
ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlDoubleDataIdHatchPointOffset2, ref
hatch_point_offset_2);
Table 203: Hatch Point Offset

© 2022 SCAPS GmbH


Client Control Interface Manual - Job 158

Hatch Rehatch All Set


Get
DLL Function int CCI_Return = ScExecCommand(int Cmd_ID)

ASCII Function int CCI_Return = ScCciExecCommand(int Cmd_ID)

Description Updates the hatch of all entities in the current job.


Cmd_ID Type: int ID:
Location: ScComSAMLightClientCtrlExecCommandConstants
scComSAMLightClientCtrlExecCommandRehatchAll 28
CCI_Return Type: int
CCI return number, see error list.
Notes -
C# Example: Rehatch all entities:

int CCI_Return = cci.ScExecCommand((int)


ScComSAMLightClientCtrlExecCommandConstants.scComSAMLightClientCtrlExecCommandRehatchAll);
Table 204: Hatch Rehatch All

Hatch Select Hatch Pair Set


Get
DLL Function int CCI_Return = ScSetLongValue(int Value_Type, int Number_Hatch_Pair)
int Number_Hatch_Pair = ScGetLongValue(int Value_Type)
ASCII Function int CCI_Return = ScCciSetLongValue(int Value_Type, int Number_Hatch_Pair)
int Number_Hatch_Pair = ScCciGetLongValue(int Value_Type)
Description Get or set a number for the Hatch Pair. 0 corresponds to Pair A and 4 corresponds
to Pair E. This command will not update the GUI. Instead this will only affect the
other Client Control Hatch commands.
Value_Type Type: int ID:
Location: ScComSAMLightClientCtrlValueTypes
scComSAMLightClientCtrlLongValueTypeSelectHatchPair 64
Number_Hatch_Pair Type: int Unit: none
· 0: Hatch Pair A
· 1: Hatch Pair B
· 2: Hatch Pair C
· 3: Hatch Pair D
· 4: Hatch Pair E
CCI_Return Type: int
CCI return number, see error list.
Notes -
C# Example: Set hatch pair E:

int CCI_Return = cci.ScSetLongValue((int)


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlLongValueTypeSelectHatchPair, 4);
C# Example: Get hatch pair:

int hatch_pair_number = cci.ScGetLongValue((int)


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlLongValueTypeSelectHatchPair);
Table 205: Hatch Select Hatch Pair

Hatch Start Offset Set


Get
DLL Function int CCI_Return = ScSetEntityDoubleData(string Entity_Name, int Data_ID, double Start_Offset)

© 2022 SCAPS GmbH


Client Control Interface Manual - Job 159

Hatch Start Offset Set


Get
int CCI_Return = ScGetEntityDoubleData(string Entity_Name, int Data_ID, ref double Start_Offset)
ASCII Function int CCI_Return = ScCciSetEntityDoubleData(string Entity_Name, int Data_ID, double Start_Offset)
double Start_Offset = ScCciGetEntityDoubleData(string Entity_Name, int Data_ID)
Description Sets or gets the hatch start offset for hatch number one or two.
Data_ID Type: int ID:
Location: ScComSAMLightClientCtrlFlags
scComSAMLightClientCtrlDoubleDataIdHatchStartoffset1 40
Set hatch start offset 1.
scComSAMLightClientCtrlDoubleDataIdHatchStartoffset2 48
Set hatch start offset 2.
Entity_Name Type: string Unit: none
The corresponding entity name.
Start_Offset Type: double Unit: [mm]*
The corresponding hatch start offset.
CCI_Return Type: int
CCI return number, see error list.
Notes · The default unit is mm, but the user can select a different unit.
C# Example: Set hatch startoffset 1 to 0.05:

int CCI_Return = cci.ScSetEntityDoubleData("", (int)


ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlDoubleDataIdHatchStartoffset1, 0.05);
C# Example: Get hatch startoffset 2 for rectangle with entity name "rectangle":

double hatch_start_offset_2 = 0;
int CCI_Return = cci.ScGetEntityDoubleData("rectangle", (int)
ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlDoubleDataIdHatchStartoffset2, ref
hatch_start_offset_2);
Table 206: Hatch Start Offset

6.2.5 Entity Info


· Entity Type
· Group Settings
· Mark Loop Count
· Mark Beat Count
· Mark Start Count
· Optic Flags
· Output as Bitmap

Entity Type Set


Get
DLL Function int CCI_Return = ScGetIDStringData(int Data_ID, int Index, ref string Parameter)

ASCII Function string Parameter = ScCciGetIDStringData(int Data_ID, int Index)

Description This is used to get the entity type by its index. The index is zero based and starts
from the top level going through the tree on the base of the first object, going on with
the siblings.
Data_ID Type: int ID:
Location: ScComSAMLightClientCtrlFlags

© 2022 SCAPS GmbH


Client Control Interface Manual - Job 160

Entity Type Set


Get
scComSAMLightClientCtrlStringDataIdGetEntityType 22
Get the entity type of a (sub)-entity based on its index.
scComSAMLightClientCtrlStringDataIdGetEntityTypeAsInSAMLight 35
Get the entity type as in SAMLight of a (sub)-entity based on its index.
Index Type: int Unit: none
The entity ID.
Parameter Type: string Unit: none
The entity type.
CCI_Return Type: int
CCI return number, see error list.
Notes · Together with the top-level only mode flag it is possible just to get the type of the
top-level entities. See example Retrieve entities.
C# Example: Get the entity type:

string entity_type = "";


int CCI_Return = cci.ScGetIDStringData((int)
ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlStringDataIdGetEntityType, 0, ref entity_type);
C# Example: Get the entity type as in SAMLight of the second (sub)-entity:

string entity_type_as_in_SAMLight = "";


int CCI_Return_01 = cci.ScSetMode(0);
int CCI_Return_02 = cci.ScGetIDStringData((int)
ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlStringDataIdGetEntityTypeAsInSAMLight, 1, ref
entity_type_as_in_SAMLight);
Table 207: Entity Type

© 2022 SCAPS GmbH


Client Control Interface Manual - Job 161

Group Settings Set


Get
DLL Function int CCI_Return = ScSetEntityLongData(string Entity_Name, int Data_ID, int Checkbox)
int Checkbox = ScGetEntityLongData(string Entity_Name, int Data_ID)
ASCII Function int CCI_Return = ScCciSetEntityLongData(string Entity_Name, int Data_ID, int Checkbox)
int Checkbox = ScCciGetEntityLongData(string Entity_Name, int Data_ID)
Description Set or get the corresponding group checkboxes.
Data_ID Type: int ID:
Location: ScComSAMLightClientCtrlFlags
scComSAMLightClientCtrlLongDataIdEntityGroupPenPaths 118
Use this flag to get or set the checkbox PenPaths.
scComSAMLightClientCtrlLongDataIdEntityGroupCluster 119
Use this flag to get or set the checkbox Cluster.
Entity_Name Type: string Unit: none
Enter the name of the entity, which should be changed.
Checkbox Type: int Unit: none
· Enable checkbox PenPaths.
· Disable checkbox PenPaths.
CCI_Return Type: int
CCI return number, see error list.
Notes · For to set group checkbox just the values 1 and 0 are valid.
C# Example: Set the group PenPath checkbox flag of an entity with entity name "grouped entities":

int CCI_Return = cci.ScSetEntityLongData("grouped entities", (int)


ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlLongDataIdEntityGroupPenPaths, 1);
C# Example: Get the group PenPath checkbox flag of an entity with entity name "grouped entities":

int Proup_Pen_Paths = cci.ScGetEntityLongData("grouped entities", (int)


ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlLongDataIdEntityGroupPenPaths);
Table 208: Group Settings

© 2022 SCAPS GmbH


Client Control Interface Manual - Job 162

Mark Beat Count Set


Get
DLL Function int CCI_Return = ScSetEntityLongData(string Entity_Name, int Data_ID, int Mark_Beat_Count)
int Mark_Beat_Count = ScGetEntityLongData(string Entity_Name, int Data_ID)
ASCII Function int CCI_Return = ScCciSetEntityLongData(string Entity_Name, int Data_ID, int Mark_Beat_Count)
int Mark_Beat_Count = ScCciGetEntityLongData(string Entity_Name, int Data_ID)
Description Set or get the corresponding mark beat count.
Data_ID Type: int ID:
Location: ScComSAMLightClientCtrlFlags
scComSAMLightClientCtrlLongDataIdEntityMarkBeatCount 56
Entity_Name Type: string Unit: none
Enter the name of the entity, which should be changed.
Mark_Beat_Count Type: int Unit: none
The number of the mark beat count.
CCI_Return Type: int
CCI return number, see error list.
Notes -
C# Example: Set the mark beat count of an entity with entity name "rectangle" to 2:

int CCI_Return = cci.ScSetEntityLongData("rectangle", (int)


ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlLongDataIdEntityMarkBeatCount, 2);
C# Example: Get the mark beat count of an entity with entity name "rectangle":

int Mark_Beat_Count = cci.ScGetEntityLongData("rectangle", (int)


ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlLongDataIdEntityMarkBeatCount);
Table 209: Mark Beat Count

© 2022 SCAPS GmbH


Client Control Interface Manual - Job 163

Mark Loop Count Set


Get
DLL Function int CCI_Return = ScSetEntityLongData(string Entity_Name, int Data_ID, int Mark_Loop_Count)
int Mark_Loop_Count = ScGetEntityLongData(string Entity_Name, int Data_ID)
ASCII Function int CCI_Return = ScCciSetEntityLongData(string Entity_Name, int Data_ID, int Mark_Loop_Count)
int Mark_Loop_Count = ScCciGetEntityLongData(string Entity_Name, int Data_ID)
Description Set or get the corresponding mark loop count.
Data_ID Type: int ID:
Location: ScComSAMLightClientCtrlFlags
scComSAMLightClientCtrlLongDataIdEntityMarkLoopCount 55
Entity_Name Type: string Unit: none
Enter the name of the entity, which should be changed.
Mark_Loop_Count Type: int Unit: none
The number of the mark loop count.
CCI_Return Type: int
CCI return number, see error list.
Notes -
C# Example: Set the mark loop count of an entity with entity name "rectangle" to 10:

int CCI_Return = cci.ScSetEntityLongData("rectangle", (int)


ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlLongDataIdEntityMarkLoopCount, 10);
C# Example: Get the Mark Loop Count of an entity with entity name "rectangle":

int Mark_Loop_Count = cci.ScGetEntityLongData("rectangle", (int)


ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlLongDataIdEntityMarkLoopCount);
Table 210: Mark Loop Count

© 2022 SCAPS GmbH


Client Control Interface Manual - Job 164

Mark Start Count Set


Get
DLL Function int CCI_Return = ScSetEntityLongData(string Entity_Name, int Data_ID, int Mark_Start_Count)
int Mark_Start_Count = ScGetEntityLongData(string Entity_Name, int Data_ID)
ASCII Function int CCI_Return = ScCciSetEntityLongData(string Entity_Name, int Data_ID, int Mark_Start_Count)
int Mark_Start_Count = ScCciGetEntityLongData(string Entity_Name, int Data_ID)
Description Set or get the mark start count, which corresponds to the mark beat offset.
Data_ID Type: int ID:
Location: ScComSAMLightClientCtrlFlags
scComSAMLightClientCtrlLongDataIdEntityMarkStartCount 57
Entity_Name Type: string Unit: none
Enter the name of the entity, which should be changed.
Mark_Start_Count Type: int Unit: none
the number of the Mark Start Count.
CCI_Return Type: int
CCI return number, see error list.
Notes -
C# Example: Set the mark start count of an entity with entity name "rectangle" to 1:

int CCI_Return = cci.ScSetEntityLongData("rectangle", (int)


ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlLongDataIdEntityMarkStartCount, 1);
C# Example: Get the mark start count of an entity with entity name "rectangle":

int Mark_Start_Count = cci.ScGetEntityLongData("rectangle", (int)


ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlLongDataIdEntityMarkStartCount);
Table 211: Mark Start Count

Optic Flags Set


Get
DLL Function int CCI_Return = ScSetEntityLongData(string Entity_Name, int Data_ID, int Optic_Flag)
int Optic_Flag = ScGetEntityLongData(string Entity_Name, int Data_ID)
ASCII Function int CCI_Return = ScCciSetEntityLongData(string Entity_Name, int Data_ID, int Optic_Flag)
int Optic_Flag = ScCciGetEntityLongData(string Entity_Name, int Data_ID)
Description Set or get the optic flags for mark contour and mark hatch of entity Entity_Name.
The corresponding flag value is a bit field.
Data_ID Type: int ID:
Location: ScComSAMLightClientCtrlFlags
scComSAMLightClientCtrlLongDataIdEntityOpticFlags 75
Flag Type: int Flag:
Location: ScComSAMLightClientCtrlFlags
scComSAMLightClientCtrlLongDataIdEntityMarkFlagMarkContour 0x1
Mark Contour.
scComSAMLightClientCtrlLongDataIdEntityMarkFlagMarkHatch 0x2
Mark Hatch.
CCI_Return Type: int
CCI return number, see error list.
Notes · The mark hatch flag can only be set if the corresponding entity is hatched.
C# Example: Enable mark contour for an entity named "Circle":

© 2022 SCAPS GmbH


Client Control Interface Manual - Job 165

Optic Flags Set


Get
int CCI_Return = cci.ScSetEntityLongData( "Circle", ( int )
ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlLongDataIdEntityOpticFlags,
ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlLongDataIdMarkFlagmarkContour );
C# Example: Get the optic flags of an entity with entity name "Circle":

int Optic_Flags = cci.ScGetEntityLongData( "Circle", ( int )


ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlLongDataIdEntityOpticFlags );
Table 212: Optic Flags

Output as Bitmap Set


Get
DLL Function int CCI_Return = ScSetEntityLongData(string Entity_Name, int Data_ID, int As_Bitmap)
int As_Bitmap = ScGetEntityLongData(string Entity_Name, int Data_ID)
ASCII Function int CCI_Return = ScCciSetEntityLongData(string Entity_Name, int Data_ID, int As_Bitmap)
int As_Bitmap = ScCciGetEntityLongData(string Entity_Name, int Data_ID)
Description Set or get the corresponding As Bitmap checkbox.
Data_ID Type: int ID:
Location: ScComSAMLightClientCtrlFlags
scComSAMLightClientCtrlLongDataIdEntityOutputAsBitmap 121
Entity_Name Type: string Unit: none
Enter the name of the entity, which should be changed.
As_Bitmap Type: int Unit: none
· Enable checkbox As Bitmap.
· Disable checkbox As Bitmap.
CCI_Return Type: int
CCI return number, see error list.
Notes · For the checkbox just the values 1 and 0 are valid.
C# Example: Set the As Bitmap checkbox flag of an entity:

int CCI_Return = cci.ScSetEntityLongData("", (int)


ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlLongDataIdEntityOutputAsBitmap, 1);
C# Example: Get the As Bitmap checkbox flag of an entity:

int As_Bitmap = cci.ScGetEntityLongData("", (int)


ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlLongDataIdEntityEntityOutputAsBitmap);
Table 213: Group Settings

6.2.6 Array Copy


· Array Copy Adapt & Associate, see Application
· ArrayCount & ArrayStep
· Array Order Flags

© 2022 SCAPS GmbH


Client Control Interface Manual - Job 166

ArrayCount & ArrayStep Set


Get
DLL Function int CCI_Return = ScSetEntityLongData(string Entity_Name, int Data_ID, int Parameter)
int Parameter = ScGetEntityLongData(string Entity_Name, int Data_ID)
ASCII Function int CCI_Return = ScCciSetEntityLongData(string Entity_Name, int Data_ID, int Parameter)
int Parameter = ScCciGetEntityLongData(string Entity_Name, int Data_ID)
Description Set or get the corresponding ArrayCount and ArrayStep (Increment) at the EntityInfo
property page for a soft array copy with virtual entities.
Entity_Name Type: string Unit: none
Enter the name of the entity, which should be copied virtual.
Data_ID Type: int ID:
Location: ScComSAMLightClientCtrlFlags
scComSAMLightClientCtrlLongDataIdEntityArrayCountX 4
Use this command to set or get Array Count X.
scComSAMLightClientCtrlLongDataIdEntityArrayCountY 5
Use this command to set or get Array Count Y.
scComSAMLightClientCtrlLongDataIdEntityArrayStepX 6
Use this command to set or get Array Step (Increment) X. Units: [µm]
scComSAMLightClientCtrlLongDataIdEntityArrayStepY 7
Use this command to set or get Array Step (Increment) Y. Units: [µm]
Parameter Type: int Unit: depends on constant
Set or get the new number for the array count or array step (increment).
CCI_Return Type: int
CCI return number, see error list.
Notes · Array step (increment) can also be negative.
C# Example: For a soft arraycopy set count X = 3:

int CCI_Return = cci.ScSetEntityLongData( "ArrayCopy Soft",( int )


ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlLongDataIdEntityArrayCountX, 3 );
C# Example: For soft arraycopy get arraycountX:

int array_count_x = 0;
array_count_x = cci.ScGetEntityLongData("ArrayCopy Soft",(int)
ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlLongDataIdEntityArrayCountX);
Table 214: Array Copy & Arry Step

Array Order Flags Set


Get
DLL Function int CCI_Return = ScSetEntityLongData(string Entity_Name, int Data_ID, int Flag)
int Flag = ScGetEntityLongData(string Entity_Name, int Data_ID)
ASCII Function int CCI_Return = ScCciSetEntityLongData(string Entity_Name, int Data_ID, int Flag)
int Flag = ScCciGetEntityLongData(string Entity_Name, int Data_ID)
Description Set or get the output order of a virtual array (virtual means that no new entities are
generated in the entity list. The corresponding setup is in the EntityInfo property page
at array). The corresponding flag is a bit field.
Entity_Name Type: string Unit: none
Specify the entity to be changed.
Data_ID Type: int ID:
Location: ScComSAMLightClientCtrlFlags
scComSAMLightClientCtrlLongDataIdEntityArrayOrderFlags 8

© 2022 SCAPS GmbH


Client Control Interface Manual - Job 167

Array Order Flags Set


Get
Flag Type: int Flag:
Location: ScComSAMLightClientCtrlFlags
scComSAMLightClientCtrlEntityArrayOrderFlagNegX 0x100
Direction from right to left in horizontal direction if this flag is set, else from left to
right.
scComSAMLightClientCtrlEntityArrayOrderFlagNegY 0x200
Direction from top to bottom in vertical direction is this flag is set, else from bottom to
top.
scComSAMLightClientCtrlEntityArrayOrderFlagMainDirX 0x400
Use X as the main direction for array copying, array copies would be marked column
by column.
scComSAMLightClientCtrlEntityArrayOrderFlagBiDir 0x800
Use bidirectional mode (horizontal), which means the order of the array copy is
serpentinous back and forth instead of using only one direction with back jumps.
CCI_Return Type: int
CCI return number, see error list.
Notes -
C# Example: Set NegX flag for entity "ArrayCopySoft":

int CCI_Return = cci.ScSetEntityLongData( "ArrayCopySoft", ( int )


ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlLongDataIdEntityArrayOrderFlags,
( int )ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlEntityArrayOrderFlagNegX );
C# Example: Get current set flag for entity "ArrayCopySoft":

int Entity_Array_Order_Flags = cci.ScGetEntityLongData( "ArrayCopySoft", ( int )


ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlLongDataIdEntityArrayOrderFlags );
Table 215: Array Order Flags

6.2.7 Bitmap
· Bitmap Mode

Bitmap Mode Set


Get
DLL Function int CCI_Return = ScSetEntityLongData(string Entity_Name, int Data_ID, int Flag)
int Flag = ScGetEntityLongData(string Entity_Name, int Data_ID)
ASCII Function int CCI_Return = ScCciSetEntityLongData(string Entity_Name, int Data_ID, int Flag)
int Flag = ScCciGetEntityLongData(string Entity_Name, int Data_ID)
Description This function is used to manipulate a named bitmap.
Entity_Name Type: string Unit: none
The corresponding entity name.
Data_ID Type: int ID:
Location: ScComSAMLightClientCtrlFlags
scComSAMLightClientCtrlLongDataIdBitmapMode 49
Flag Type: int Flag:
Location: ScComSAMLightClientCtrlFlags
scComSAMLightClientCtrlLongDataIdBitmapModeInvert 0x1

© 2022 SCAPS GmbH


Client Control Interface Manual - Job 168

Bitmap Mode Set


Get
scComSAMLightClientCtrlLongDataIdBitmapModeGreyscale 0x2
scComSAMLightClientCtrlLongDataIdBitmapModeDrillmode 0x4
scComSAMLightClientCtrlLongDataIdBitmapModeBidirectional 0x8
scComSAMLightClientCtrlLongDataIdBitmapModeStartlastline 0x10
scComSAMLightClientCtrlLongDataIdBitmapModeNolineincr 0x20
scComSAMLightClientCtrlLongDataIdBitmapModeShowBitmap 0x100
scComSAMLightClientCtrlLongDataIdBitmapModeShowScanner 0x200
scComSAMLightClientCtrlLongDataIdBitmapModeScanXDir 0x400
scComSAMLightClientCtrlLongDataIdBitmapModePenFrequency 0x800
scComSAMLightClientCtrlLongDataIdBitmapModeJumpOverBlankPixel 0x1000
s
scComSAMLightClientCtrlLongDataIdBitmapModeDrillGreyscale 0x2000
CCI_Return Type: int
CCI return number, see error list.
Notes · The scanner bitmap is created after every call to DontUpdateEntity is not set.
C# Example: Set bitmap mode:

//Set Greyscale & Show Scanner Bitmap


int CCI_Return = cci.ScSetEntityLongData("",(int)
ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlLongDataIdBitmapMode,0x202);
C# Example: Get bitmap mode:

int Flag = cci.ScGetEntityLongData("", (int)


ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlLongDataIdBitmapMode);
Table 216: Bitmap Mode

6.3 Data Wizard


· Close Polylines
· Create Beam Comped Copy
· Create One Group
· Create Pen Groups
· Create Single Pen Group
· Data Reduction Redundant Points
· Data Reduction Short Lines
· Double Para
· Optimize Jumps
· String Para
· Wizard Clipper
· Wizard Order

Close Polylines Set


Get
DLL Function int CCI_Return = ScExecCommand(int Cmd_ID)

ASCII Function int CCI_Return = ScCciExecCommand(int Cmd_ID)

© 2022 SCAPS GmbH


Client Control Interface Manual - Job 169

Close Polylines Set


Get
Description With this command it is possible to close polylines.
Cmd_ID Type: int ID:
Location: ScComSAMLightClientCtrlExecCommandConstants
scComSAMLightClientCtrlExecCommandWizardClosePolylines 61
CCI_Return Type: int
CCI return number, see error list.
Notes · Use DoublePara1 before.
· Select entities with EntitySelected before.
C# Example: Close polylines:

int CCI_Return = cci.ScExecCommand((int)


ScComSAMLightClientCtrlExecCommandConstants.scComSAMLightClientCtrlExecCommandWizardClosePolylines);
Table 217: Close Polylines

Create Beam Comped Copy Set


Get
DLL Function int CCI_Return = ScExecCommand(int Cmd_ID)

ASCII Function int CCI_Return = ScCciExecCommand(int Cmd_ID)

Description Create a beam comped copy of the entity that is defined via StringPara1. The copy
will be stored in the entity defined by StringPara2. The Dist parameter is defined by
DoublePara1.
Cmd_ID Type: int ID:
Location: ScComSAMLightClientCtrlExecCommandConstants
scComSAMLightClientCtrlExecCommandCreateBeamCompedCopy 37
CCI_Return Type: int
CCI return number, see error list.
Notes -
C# Example: Create beam comped copy:

int CCI_Return = cci.ScExecCommand((int)


ScComSAMLightClientCtrlExecCommandConstants.scComSAMLightClientCtrlExecCommandCreateBeamCompedCopy);
Table 218: Create Beam Comped Copy

Create One Group Set


Get
DLL Function int CCI_Return = ScExecCommand(int Cmd_ID)

ASCII Function int CCI_Return = ScCciExecCommand(int Cmd_ID)

Description Executes the data wizard command "Create One Group".


Cmd_ID Type: int ID:
Location: ScComSAMLightClientCtrlExecCommandConstants
scComSAMLightClientCtrlExecCommandWizardCreateOneGroup 57
CCI_Return Type: int
CCI return number, see error list.
Notes · Select entities with EntitySelected before.
C# Example: Create one group:

© 2022 SCAPS GmbH


Client Control Interface Manual - Job 170

Create One Group Set


Get
int CCI_Return = cci.ScExecCommand((int)
ScComSAMLightClientCtrlExecCommandConstants.scComSAMLightClientCtrlExecCommandWizardCreateOneGroup);
Table 219: Create One Group

Create Pen Groups Set


Get
DLL Function int CCI_Return = ScExecCommand(int Cmd_ID)

ASCII Function int CCI_Return = ScCciExecCommand(int Cmd_ID)

Description Regroups selected entities into pen groups.


Cmd_ID Type: int ID:
Location: ScComSAMLightClientCtrlExecCommandConstants
scComSAMLightClientCtrlExecCommandWizardCreatePenGroups 63
CCI_Return Type: int
CCI return number, see error list.
Notes · Select entities with EntitySelected before.
C# Example: Create pen groups:

int CCI_Return = cci.ScExecCommand((int)


ScComSAMLightClientCtrlExecCommandConstants.scComSAMLightClientCtrlExecCommandWizardCreatePenGroups);
Table 220: Create Pen Groups

Create Single Pen Group Set


Get
DLL Function int CCI_Return = ScExecCommand(int Cmd_ID)

ASCII Function int CCI_Return = ScCciExecCommand(int Cmd_ID)

Description Create a pen group for a specific pen.


Cmd_ID Type: int ID:
Location: ScComSAMLightClientCtrlExecCommandConstants
scComSAMLightClientCtrlExecCommandWizardCreateSinglePenGroup 29
CCI_Return Type: int
CCI return number, see error list.
Notes ·
Returns '0' if no vector with the chosen pen is found in the selected entites.
·
Select entities with EntitySelected before.
·
Choose pen with ScSetPen.
·
Eventually it could be helpful to select all entities and create one group first by
corresponding CCI command before settings pen.
C# Example: Create single pen group:

int CCI_Return = cci.ScExecCommand((int)


ScComSAMLightClientCtrlExecCommandConstants.scComSAMLightClientCtrlExecCommandWizardCreateSinglePenGroup);
Table 221: Create Single Pen Group

Data Reduction Redundant Points Set


Get
DLL Function int CCI_Return = ScExecCommand(int Cmd_ID)

ASCII Function int CCI_Return = ScCciExecCommand(int Cmd_ID)

Description Use the data wizard function data reduction redundant points.

© 2022 SCAPS GmbH


Client Control Interface Manual - Job 171

Data Reduction Redundant Points Set


Get
Cmd_ID Type: int ID:
Location: ScComSAMLightClientCtrlExecCommandConstants
scComSAMLightClientCtrlExecCommandWizardDataReductionRedundantPoints 31
CCI_Return Type: int
CCI return number, see error list.
Notes · Select entities with EntitySelected.
C# Example: Data reduction redundant points, e.g. draw rectangle and insert point in entity list at point
editor view and then execute:

int CCI_Return = cci.ScExecCommand((int)


ScComSAMLightClientCtrlExecCommandConstants.scComSAMLightClientCtrlExecCommandWizardDataReductionRedundant
Points);
Table 222: Data Reduction Redundant Points

Data Reduction Short Lines Set


Get
DLL Function int CCI_Return = ScExecCommand(int Cmd_ID)

ASCII Function int CCI_Return = ScCciExecCommand(int Cmd_ID)

Description This allows you to use the data wizard function data reduction short lines.
Cmd_ID Type: int ID:
Location: ScComSAMLightClientCtrlExecCommandConstants
scComSAMLightClientCtrlExecCommandWizardDataReductionShortLines 42
CCI Return Type: int
CCI error number, see error list.
Notes · Select entities with EntitySelected.
· Define Short Lines Length with DoublePara1.
C# Example: Data reduction short lines, e.g. generate circle with SegCount = 1000 and then execute:

int CCI_Return = cci.ScExecCommand((int)


ScComSAMLightClientCtrlExecCommandConstants.scComSAMLightClientCtrlExecCommandWizardDataReductionShortLine
s);
Table 223: Data Reduction Short Lines

Double Para Set


Get
DLL Function int CCI_Return = ScSetDoubleValue(int Value_Type, double Parameter)

ASCII Function int CCI_Return = ScCciSetDoubleValue(int Value_Type, double Parameter)

Description This value has multiple purposes.


Value_Type Type: int ID:
Location: ScComSAMLightClientCtrlValueTypes
scComSAMLightClientCtrlDoubleValueTypeDoublePara1 66
This value has multiple purposes:
· Data Wizard -> Beam Compensation -> Dist.
· Data Wizard -> Marking Order -> arrow direction
o 0: Left to right
o 1: Top to bottom
o 2: Right to left

© 2022 SCAPS GmbH


Client Control Interface Manual - Job 172

Double Para Set


Get
o 3: Bottom to top
· Data Wizard -> Data Reduction -> Short Lines Length
· Data Wizard -> Areas
o 0: Intersection
o 1: Union
o 2: Difference
o 3: Xor
· ScJump entity -> Control
address the x value of the ScJump entity
· Background Camera Point: Top Left X
scComSAMLightClientCtrlDoubleValueTypeDoublePara2 67
This value has multiple purposes:
· Data Wizard -> Checkbox "Sort Equal Coordinates By Size"
o 0: Deactivate
o 1: Activate
· Data Wizard -> Areas -> Fill Type
o 0: Even/Odd
o 1: NonZero
o 2: Positive
o 3: Negative
· ScJump entity -> Control address the y value of the ScJump entity
· Background Camera Point: Top Left Y
scComSAMLightClientCtrlDoubleValueTypeDoublePara3 95
This value has multiple purposes:
· Data Wizard -> Checkbox "Sort Equal by other Coordinate"
o 0: Disable
o 1: Enable
· ScJump entity ->’ Control
· address the z value of the ScJump entity
· Background Camera Point: Top Right X
scComSAMLightClientCtrlDoubleValueTypeDoublePara4 148
· Background Camera Point: Top Right Y
scComSAMLightClientCtrlDoubleValueTypeDoublePara5 149
· Background Camera Point: Bottom Left X
scComSAMLightClientCtrlDoubleValueTypeDoublePara6 150
· Background Camera Point: Bottom Left Y
scComSAMLightClientCtrlDoubleValueTypeDoublePara7 151
· Background Camera Point: Bottom Right X
scComSAMLightClientCtrlDoubleValueTypeDoublePara8 152
· Background Camera Point: Bottom Right Y
CCI_Return Type: int
CCI return number, see error list.
Notes -
C# Example: Set marking order from left to right:

int CCI_Return = cci.ScSetDoubleValue((int)


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlDoubleValueTypeDoublePara1, 0);

© 2022 SCAPS GmbH


Client Control Interface Manual - Job 173

Table 224: Double Para

Optimize Jumps Set


Get
DLL Function int CCI_Return = ScExecCommand(int Cmd_ID)

ASCII Function int CCI_Return = ScCciExecCommand(int Cmd_ID)

Description The total jump distance between poly lines would be optimized.
Cmd_ID Type: int ID:
Location: ScComSAMLightClientCtrlExecCommandConstants
scComSAMLightClientCtrlExecCommandWizardOptimizeJumps 62
CCI_Return Type: int
CCI return number, see error list.
Notes · Select entities with EntitySelected.
C# Example: Optimize jumps, e.g. draw a line and duplicate it or draw two parallel lines with same direction,
check marking jumps by SAMLight Menu Bar > Window > Preview and Mark > Preview and then execute:

int CCI_Return = cci.ScExecCommand((int)


ScComSAMLightClientCtrlExecCommandConstants.scComSAMLightClientCtrlExecCommandWizardOptimizeJumps);
Table 225: Optimize Jumps

String Para Set


Get
DLL Function int CCI_Return = ScSetDoubleValue(int Value_Type, double Parameter)

ASCII Function int CCI_Return = ScCciSetDoubleValue(int Value_Type, double Parameter)

Description Set or get string values.


Value_Type Type: int ID:
Location: ScComSAMLightClientCtrlValueTypes
scComSAMLightClientCtrlStringValueTypeStringPara1 19
This value has multiple purposes:
· Data Wizard -> Beam Compensation
This parameter is used to define the source entity, which will be used for the beam
comped copy function.
· ScJump Entity -> Control property page
scComSAMLightClientCtrlStringValueTypeStringPara2 20
This parameter is used to define the copied entity, which will be used for the beam
comped copy function.
Parameter Type: string Unit: none
· 0: Disable homeposition.
· 1: Enable homeposition.
CCI_Return Type: int
· CCI return number, see error list.
Notes -
C# Example: Create a beam compensated copy out of the entity "Entity" with the name
"BeamCompedEntity":

int CCI_Return_01 = cci.ScSetStringValue((int)


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlStringValueTypeStringPara1,"Entity");
int CCI_Return_02 = cci.ScSetStringValue((int)
ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlStringValueTypeStringPara2,"BeamCompedEntity" );
Table 226: String Para

© 2022 SCAPS GmbH


Client Control Interface Manual - Job 174

Wizard Clipper Set


Get
DLL Function int CCI_Return = ScExecCommand(int Cmd_ID)

ASCII Function int CCI_Return = ScCciExecCommand(int Cmd_ID)

Description This allows the use of the data wizard areas functions.
Cmd_ID Type: int ID:
Location: ScComSAMLightClientCtrlExecCommandConstants
scComSAMLightClientCtrlExecCommandWizardClipper 43
CCI_Return Type: int
CCI returnb number, see error list.
Notes · Select entities with EntitySelected.
· Define area operation with DoublePara1.
· Define fill type with DoublePara2.
C# Example: Data wizard clipper, e.g. to get positive union of two or more drawn overlapping geometries
with geometry object toolbar execute:

int CCI_Return = cci.ScExecCommand((int)


ScComSAMLightClientCtrlExecCommandConstants.scComSAMLightClientCtrlExecCommandWizardClipper);
Table 227: Wizard Clipper

Wizard Order Set


Get
DLL Function int CCI_Return = ScExecCommand(int Cmd_ID)

ASCII Function int CCI_Return = ScCciExecCommand(int Cmd_ID)

Description Executes the Data Wizard command "Set Order". There can be set 3 parameters
with Client Control. See Double Value Types DoublePara1/2/3. This will affect all
entities in the job.
Cmd_ID Type: int ID:
Location: ScComSAMLightClientCtrlExecCommandConstants
scComSAMLightClientCtrlExecCommandWizardOrder 55
CCI_Return Type: int
CCI return number, see error list.
Notes · Select entities with EntitySelected.
· Define marking order with DoublePara1.
· Define checkbox "Sort Equal Coordinates By Size" with DoublePara2.
· Define checkbox "Sort Equal by other Coordinate" with DoublePara3.
C# Example: Data wizard order:

int CCI_Return = cci.ScExecCommand((int)


ScComSAMLightClientCtrlExecCommandConstants.scComSAMLightClientCtrlExecCommandWizardOrder);
Table 228: Wizard Order

© 2022 SCAPS GmbH


Client Control Interface Manual - Direct motion control 175

7 Direct motion control


There are two possibilities to drive motion axes via CCI:

· Job control objects, see Control Objects


o Motion Entity Parameter Get
o Motion Entity Parameter Set
o Motion Entity String

· Direct motion control, see sub-chapters:


o Direct motion home
o Direct motion move
o Direct motion RS-232
o Direct motion stop
o Direct motion status

7.1 Direct motion home


· Direct Motion Home

Direct Motion Home Set


Get
DLL Function int CCI_Return = ScExecCommand(int Cmd_ID)

ASCII Function int CCI_Return = ScCciExecCommand(int Cmd_ID)

Description Start the direction motion homing procedure.


Cmd_ID Type: int ID:
Location: ScComSAMLightClientCtrlExecCommandConstants
scComSAMLightClientCtrlExecCommandMotionHome 15
CCI_Return Type: int
CCI return number, see error list.
Notes · MotionAxis has to be set before.
C# Example: Start homing:

int CCI_Return = cci.ScExecCommand( ( int )


ScComSAMLightClientCtrlExecCommandConstants.scComSAMLightClientCtrlExecCommandMotionHome );
Table 229: Direct Motion Home

7.2 Direct motion move


· Direct Motion Move
· Motion Axis
· Motion Axis Type
· Motion Position
· Motion Speed
· Motion Wait For End

© 2022 SCAPS GmbH


Client Control Interface Manual - Direct motion control 176

Direct Motion Move Set


Get
DLL Function int CCI_Return = ScExecCommand(int Cmd_ID)

ASCII Function int CCI_Return = ScCciExecCommand(int Cmd_ID)

Description Start the direction motion.


Cmd_ID Type: int ID:
Location: ScComSAMLightClientCtrlExecCommandConstants
scComSAMLightClientCtrlExecCommandMotionGo 16
CCI_Return Type: int
CCI return number, see error list.
Notes The following motion move parameters have to be set before:
· MotionAxis
· AxisPosition, MotionAxisAngle, MotionAxisPositionRelative or
MotionAxisAngleRelative
· MotionAxisSpeed
· MotionWaitForEnd
C# Example: Start motion move:

int CCI_Return = cci.ScExecCommand( ( int )


ScComSAMLightClientCtrlExecCommandConstants.scComSAMLightClientCtrlExecCommandMotionGo );
Table 230: Direct Motion Move

Motion Axis Set


Get
DLL Function int CCI_Return = ScSetLongValue(int Value_Type, int Motion_Axis)
int Motion_Axis = ScGetLongValue(int Value_Type)
ASCII Function int CCI_Return = ScCciSetLongValue(int Value_Type, int Motion_Axis)
int Motion_Axis = ScCciGetLongValue(int Value_Type)
Description Set or get the selected motion axis for further motion CCI commands.
Value_Type Type: int ID:
Location: ScComSAMLightClientCtrlValueTypes
scComSAMLightClientCtrlLongValueTypeMotionAxis 17
Motion_Axis Type: int Unit: none
· -1: all motion axes
· [0, 6]: motion axis (up to 7 axes, depending on the motion type)
CCI_Return Type: int
CCI return number, see error list.
Notes -
C# Example: Select first motion axis:

int CCI_Return = cci.ScSetLongValue( ( int )


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlLongValueTypeMotionAxis, 0 );
C# Example: Get current selected motion axis:

int Motion_Axis = cci.ScGetLongValue( ( int )


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlLongValueTypeMotionAxis );
Table 231: Motion Axis

© 2022 SCAPS GmbH


Client Control Interface Manual - Direct motion control 177

Motion Axis Type Set


Get
DLL Function int Type = ScGetLongValue(int Value_Type)

ASCII Function int Type = ScCciGetLongValue(int Value_Type)

Description Get the set motion type angular or planar.


Value_Type Type: int
Location: ScComSAMLightClientCtrlValueTypes
scComSAMLightClientCtrlLongValueTypeMotionAxisType 113
Type Type: int Unit: none
· 0: Planar.
· 3: Angular.
CCI_Return Type: int
CCI return number, see error list.
Notes · Axis has to be selected before via MotionAxis.
C# Example: Get axis type:

int Type = cci.ScGetLongValue( ( int )


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlLongValueTypeMotionAxisType );
Table 232: Motion Axis Type

Motion Position Set


Get
DLL Function int CCI_Return = ScSetDoubleValue(int Value_Type, double Motion_Position)
double Motion_Position = ScGetDoubleValue(int Value_Type)
ASCII Function int CCI_Return = ScCciSetDoubleValue(int Value_Type, double Motion_Position)
double Motion_Position = ScCciGetDoubleValue(int Value_Type)
Description 1) Set or get the target position for MotionGo.
2) Get current axis position (after using MotionUpdatePos).
Value_Type Type: int ID:
Location: ScComSAMLightClientCtrlValueTypes
scComSAMLightClientCtrlDoubleValueTypeMotionAxisPosition 38
Absolute position [mm]
scComSAMLightClientCtrlDoubleValueTypeMotionAxisAngle 39
Absolute angle [deg]
scComSAMLightClientCtrlDoubleValueTypeMotionAxisPositionRelativ 40
e
Position relative to the current position [mm]
scComSAMLightClientCtrlDoubleValueTypeMotionAxisAngleRelative 41
Position angle relative to the current angle [deg]
Motion_Position Type: double Unit: depends on constant
Absolut / relative target position.
CCI_Return Type: int
CCI return number, see error list.
Notes · MotionAxis has to be set first.
· In some cases (e.g. after stop signal), it is recommended to use MotionUpdatePos
before the get command.
C# Example: Set target position to 10.0 mm:

© 2022 SCAPS GmbH


Client Control Interface Manual - Direct motion control 178

Motion Position Set


Get

int CCI_Return = cci.ScSetDoubleValue( ( int )


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlDoubleValueTypeMotionAxisPosition, 10.0 );
C# Example: Get current target position value:

double Motion_Position = cci.ScGetDoubleValue( ( int )


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlDoubleValueTypeMotionAxisPosition );
Table 233: Motion Position

Motion Speed Set


Get
DLL Function int CCI_Return = ScSetDoubleValue(int Value_Type, double Motion_Speed)
double Motion_Speed = ScGetDoubleValue(int Value_Type)
ASCII Function int CCI_Return = ScCciSetDoubleValue(int Value_Type, double Motion_Speed)
double Motion_Speed = ScCciGetDoubleValue(int Value_Type)
Description Set or get the motion speed for MotionGo.
Value_Type Type: int ID:
Location: ScComSAMLightClientCtrlValueTypes
scComSAMLightClientCtrlDoubleValueTypeMotionAxisSpeed
Motion_Speed Type: double Unit: depends on constant
Motion speed [mm/s]
CCI_Return Type: int
CCI return number, see error list.
Notes · MotionAxis has to be set first.
C# Example: Set speed to 25.0 mm/s:

int CCI_Return = cci.ScSetDoubleValue( ( int )


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlDoubleValueTypeMotionAxisSpeed, 25.0 );
C# Example: Get current speed value:

double Motion_Position = cci.ScGetDoubleValue( ( int )


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlDoubleValueTypeMotionAxisSpeed );
Table 234: Motion Speed

Motion Wait For End Set


Get
DLL Function int CCI_Return = ScSetLongValue(int Value_Type, int Motion_Wait_For_End)
int Motion_Wait_For_End = ScGetLongValue(int Value_Type)
ASCII Function int CCI_Return = ScCciSetLongValue(int Value_Type, int Motion_Wait_For_End)
int Motion_Wait_For_End = ScCciGetLongValue(int Value_Type)
Description Set or get the motion wait for end value, which changes the return timing of
MotionGo.
Value_Type Type: int ID:
Location: ScComSAMLightClientCtrlValueTypes
scComSAMLightClientCtrlLongValueTypeMotionWaitForEnd 18
Motion_Wait_For_End Type: int Unit: none
· 0: MotionGo returns immediately. This is not possible for homing.
· 1: MotionGo returns when the motion move has finished.

© 2022 SCAPS GmbH


Client Control Interface Manual - Direct motion control 179

Motion Wait For End Set


Get
CCI_Return Type: int
CCI return number, see error list.
Notes · MotionAxis has to be set first.
C# Example: Set motion wait for end value to 1:

int CCI_Return = cci.ScSetLongValue( ( int )


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlLongValueTypeMotionWaitForEnd, 1 );
C# Example: Get current motion wait for end value:

int Motion_Wait_For_End = cci.ScGetLongValue( ( int )


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlLongValueTypeMotionWaitForEnd );
Table 235: Motion Wait For End

7.3 Direct motion RS-232


· Direct Motion RS-232
· RS-232 Motion String

Direct Motion RS-232 Set


Get
DLL Function int CCI_Return = ScExecCommand(int Cmd_ID)

ASCII Function int CCI_Return = ScCciExecCommand(int Cmd_ID)

Description Send the RS-232 motion string.


Cmd_ID Type: int ID:
Location: ScComSAMLightClientCtrlExecCommandConstants
scComSAMLightClientCtrlExecCommandMotionSendString 17
CCI_Return Type: int
CCI return number, see error list.
Notes The following motion move parameters have to be set before:
· MotionAxis has to be set before.
· MotionString has to be set before.
C# Example: Send motion RS-232:

int CCI_Return = cci.ScExecCommand( ( int )


ScComSAMLightClientCtrlExecCommandConstants.scComSAMLightClientCtrlExecCommandMotionSendString );
Table 236: Direct Motion RS-232

RS-232 motion string Set


Get
DLL Function int CCI_Return = ScSetStringValue(int Value_Type, string RS232_String)
int CCI_Return = ScGetStringValue(int Value_Type, ref string RS232_String)
ASCII Function int CCI_Return = ScCciSetStringValue(int Value_Type, string RS232_String)
string RS232_String = ScCciGetStringValue(int Value_Type)
Description Set or get the motion string for MotionSendString.
Value_Type Type: int ID:
Location: ScComSAMLightClientCtrlValueTypes
scComSAMLightClientCtrlStringValueTypeMotionString 11

© 2022 SCAPS GmbH


Client Control Interface Manual - Direct motion control 180

RS-232 motion string Set


Get
RS232_String Type: string Unit: depends on constant
RS-232 motion string
CCI_Return Type: int
CCI return number, see error list.
Notes · MotionAxis has to be set first.
· MotionSendString sends the string.
C# Example: Set RS-232 motion string to "PR AL":

int CCI_Return = cci.ScSetStringValue( ( int )


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlStringValueTypeMotionString, "PR AL" );
C# Example: Get current RS-232 motion string:

string RS232_String = "";


int CCI_Return = cci.ScGetStringValue( ( int )
ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlStringValueTypeMotionString, ref RS232_String );
Table 237: RS-232 Motion String

7.4 Direct motion status


· Motion Moving
· Update Motion Position

Motion moving Set


Get
DLL Function int Motion_Moving = ScGetLongValue(int Value_Type)

ASCII Function int Motion_Moving = ScCciGetLongValue(int Value_Type)

Description Returns the moving state of the motion axes.


Value_Type Type: int ID:
Location: ScComSAMLightClientCtrlValueTypes
scComSAMLightClientCtrlLongValueTypeMotionMoving 19
Motion_Moving Type: int Unit: none
For a single axis:
· 0: Axis is not moving.
· 1: Axis is moving.
For all axes (MotionAxis is -1):
· 0: No axis is moving.
· 1: At least one axis is moving.
Notes · MotionAxis has to be set first.
C# Example: Check if motion axis is moving:

int Motion_Moving = cci.ScGetLongValue( ( int )


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlLongValueTypeMotionWaitForEnd );
Table 238: Motion Moving

© 2022 SCAPS GmbH


Client Control Interface Manual - Direct motion control 181

Update Motion Position Set


Get
DLL Function int CCI_Return = ScExecCommand(int Cmd_ID)

ASCII Function int CCI_Return = ScCciExecCommand(int Cmd_ID)

Description Updates the SAMLight motion position from the motion controller
Cmd_ID Type: int ID:
Location: ScComSAMLightClientCtrlExecCommandConstants
scComSAMLightClientCtrlExecCommandMotionUpdatePos 18
CCI_Return Type: int
CCI return number, see error list.
Notes · MotionAxis has to be set before.
· After the update the position can be get with AxisPosition or MotionAxisAngle.
C# Example: Update motion position:

int CCI_Return = cci.ScExecCommand( ( int )


ScComSAMLightClientCtrlExecCommandConstants.scComSAMLightClientCtrlExecCommandMotionUpdatePos );
Table 239: Update Motion Position

7.5 Direct motion stop


· Direct Motion Stop

Direct Motion Stop Set


Get
DLL Function int CCI_Return = ScExecCommand(int Cmd_ID)

ASCII Function int CCI_Return = ScCciExecCommand(int Cmd_ID)

Description Stops a current motion move.


Cmd_ID Type: int ID:
Location: ScComSAMLightClientCtrlExecCommandConstants
scComSAMLightClientCtrlExecCommandMotionStopMove 14
CCI_Return Type: int
CCI return number, see error list.
Notes · MotionAxis has to be set before.
C# Example: Stop a current motion move:

int CCI_Return = cci.ScExecCommand( ( int )


ScComSAMLightClientCtrlExecCommandConstants.scComSAMLightClientCtrlExecCommandMotionStopMove );
Table 240: Direct Motion Stop

8 Inputs and Outputs


The following commands can be used to directly control inputs and outputs.
The CCI commands for ScWaitForInput and ScSetOutput are described here.

· Get Inputs
· Get Outputs
· Set Outputs
· Get Output Inversions

© 2022 SCAPS GmbH


Client Control Interface Manual - Inputs and Outputs 182

· Set Output Inversions

Get Inputs Set


Get
DLL Function int Input_States = ScGetLongValue(int Value_Type)

ASCII Function int Input_States = ScCciGetLongValue(int Value_Type)

Description This function is used to get the input states of the Opto_Ins and Digi_Ins.
Value_Type Type: int ID:
Location: ScComSAMLightClientCtrlValueTypes
scComSAMLightClientCtrlLongValueTypeOptoIO 4
Input_States Type: int Unit: none
Input_States is a decimal number that is best understood binary:
The bits represent an input state (blue), inactive (0) or active (1). Some bits are
undefined (gray). Which bit represents which input depends on the hardware and is
shown below.

USC-1:
0000_0000_0000_0000_0000_0000_0010_0000
| Opto_In_0
Opto_In_5

USC-2/-3:
0000_0000_0000_0000_0000_0000_0010_0000
| | | || Opto_In_0
| | | | Opto_In_5
| | | Digi_In_0
| | Digi_In_9
| Stepper_In_0
Stepper_In_2

RTC3/4/5/6:
0000_0000_0000_0000_0000_0000_0010_0000
| Digi_In_0
Digi_In_15

Alternative mathematical representation of unsigned Input_States:

Notes · An programming example to get a single input can be found here.


C# Example: Get input states:

int Input_States = cci.ScGetLongValue((int)


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlLongValueTypeOptoIO);
Example: Interpret USC input states 32:

© 2022 SCAPS GmbH


Client Control Interface Manual - Inputs and Outputs 183

Get Inputs Set


Get
(32)dec = (0000 0000 0010 0000)bin Opto_In_5 is active, all other inputs are inactive.
Table 241: Get Inputs

Get Outputs Set


Get
DLL Function int Output_States = ScGetLongValue(int Value_Type)

ASCII Function int Output_States = ScCciGetLongValue(int Value_Type)

Description This function is used to get the output states of the Opto_Outs and Digi_Outs.
Output_States Type: int Unit: none
Output_States is a decimal number that is best understood binary:
The bits represent an output state (blue), inactive (0) or active (1). Some bits are
undefined (gray). Which bit represents which output depends on the hardware and is
shown below.

USC-1:
0000_0000_0000_0000_0000_0000_0000_1000
| Opto_Out_0
Opto_Out_5

USC-2/-3:
0000_0000_0000_0000_0000_0000_0000_1000
| | | | | || Opto_Out_0
| | | | | | Opto_Out_5
| | | | | Digi_Out_0
| | | | Digi_Out_9
| | | Stepper_Out_0
| | Stepper_Out_5
| Laser_Port_0
Laser_Port_7
Alternative mathematical representation of unsigned Ouput_States:

Value_Type Type: int ID:


Location: ScComSAMLightClientCtrlValueTypes
scComSAMLightClientCtrlLongValueTypeGetOptoOut 31
Notes · USC cards only.
· USC-1 does not have Digi_Outs.
· Do not misunderstand the name of the command, you can also get Digi_Outs.
· An programming example to get a single output can be found here.

© 2022 SCAPS GmbH


Client Control Interface Manual - Inputs and Outputs 184

Get Outputs Set


Get
C# Example: Get output states:

int Output_States = cci.ScGetLongValue((int)


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlLongValueTypeGetOptoOut);
Example: Interpret USC output states 16:
(16)dec = (0000 0000 0001 0000)bin Opto_Out_4 is active, all other outputs are inactive.
Table 242: Get Outputs

Set Outputs Set


Get
DLL Function int CCI_Return = ScSetLongValue(int Value_Type, int Output_States)

ASCII Function int CCI_Return = ScCciSetLongValue(int Value_Type, int Output_States)

Description This function is used to set the output states of the Opto_Outs and Digi_Outs.
Value_Type Type: int ID:
Location: ScComSAMLightClientCtrlValueTypes
scComSAMLightClientCtrlLongValueTypeOptoIO 4
Output_States Type: int Unit: none
Output_States is a 32 bit signed integer that is best understood binary:
The first 16 bits represent a mask of the outputs (red), telling which output should be
changed (0) or unchanged (1). The last 16 bits represent the desired state of the
output (blue), inactive (0) or active (1). Some bits are undefined (gray). Which bit
represents which output depends on the hardware and is shown below.

USC-1:
1111_1111_1111_0111_0000_0000_0000_1000
| | | State Opto_Out_0
| | State Opto_Out_5
| Mask Opto_Out_0
Mask Opto_Out_5

USC-2/-3:
1111_1111_1111_0111_0000_0000_0000_1000
| || | | || State Opto_Out_0
| || | | | State Opto_Out_5
| || | | State Digi_Out_0
| || | State Digi_Out_9
| || Mask Opto_Out_0
| | Mask Opto_Out_5
| Mask Digi_Out_0
Mask Digi_Out_9

RTC3/4/5/6:
1111_1111_1111_0111_0000_0000_0000_1000
| | | State Digi_Out_0
| | State Digi_Out_15
| Mask Digi_Out_0
Mask Digi_Out_15

Alternative mathematical representation of unsigned Output_States:

© 2022 SCAPS GmbH


Client Control Interface Manual - Inputs and Outputs 185

Set Outputs Set


Get

CCI_Return Type: int


CCI return number, see error list.
Notes · Opto_Out 0 can not be influenced by this command, since it is reserved for the
mark in progress flag.
· An programming example to set a single output can be found here.
· Only output states where the associated mask is 0 have an effect.
· If a output is used somewhere else (like status outputs, red pointer, stepper
motion, etc.) the output will be overwritten when the event occurs.
C# Example: Set USC Opto_Out_3 active and keep all other outputs in their current state:
uint Output_States = 0b_1111_1111_1111_0111_0000_0000_0000_1000;
// Decimal 4294377480 as uint32 and -589816 as int32.
int CCI_Return = cci.ScSetLongValue((int)
ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlLongValueTypeOptoIO, (int) Output_States);
Table 243: Set Outputs

Get Output Inversions Set


Get
DLL Function int Output_Inversions = ScGetLongValue(int Value_Type)

ASCII Function int Output_Inversions = ScCciGetLongValue(int Value_Type)

Description Get the inversion states of outputs on USC-2/-3 cards.


Value_Type Type: int ID:
Location: ScComSAMLightClientCtrlValueTypes
scComSAMLightClientCtrlLongValueTypeOptoOutInvert 124
Output_Inversions Type: int Unit: none
Output_Inversions is a decimal number that is best understood binary:
The bits represent an output inversion state (blue), normal (0) or inverted (1). Some
bits are undefined (gray). Which bit represents which output inversion is shown
below.

USC-2/-3:
0000_0000_0000_0000_0000_0000_0000_0101
| | | || Inversion State Opto_Out_0
| | | | Inversion State Opto_Out_5
| | | Inversion State Digi_Out_0
| | Inversion State Digi_Out_9
| Inversion State Stepper_Out_0
Inversion State Stepper_Out_5

Alternative mathematical representation of unsigned Ouput_Inversions:

© 2022 SCAPS GmbH


Client Control Interface Manual - Inputs and Outputs 186

Get Output Inversions Set


Get

CCI_Return Type: int


CCI return number, see error list.
Notes -
C# Example: Get output inversion states:

int Output_Inversion = cci.ScGetLongValue((int)


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlLongValueTypeOptoOutInvert);
Example: Interpret USC output inversion states 5:
(5)dec = (0000 0000 0000 0101)bin Inversion states of Opto_Out_0 and Opto_Out_2 are active, all other
inversion states are inactive.
Table 244: Get Output Inversions

Set Output Inversions Set


Get
DLL Function int CCI_Return = ScSetLongValue(int Value_Type, int Output_Inversions)

ASCII Function int CCI_Return = ScCciSetLongValue(int Value_Type, int Output_Inversions)

Description Set or get the inversion states of outputs on USC-2/-3 cards.


Value_Type Type: int ID:
Location: ScComSAMLightClientCtrlValueTypes
scComSAMLightClientCtrlLongValueTypeOptoOutInvert 124
Output_Inversions Type: int Unit: none
Output_Inversions is a 32 bit signed integer that is best understood binary:
The first 16 bits represent a mask of the output inversions (red), telling which output
inversion should be changed (0) or unchanged (1). The last 16 bits represent the
desired state of the output inversion (blue), normal (0) or inverted (1).

USC-2/-3:
1111_1111_1100_0000_0000_0000_0011_1111
| || | | || Inversion State Opto_Out_0
| || | | | Inversion State Opto_Out_5
| || | | Inversion State Digi_Out_0
| || | Inversion State Digi_Out_9
| || Mask Opto_Out_0
| | Mask Opto_Out_5
| Mask Digi_Out_0
Mask Digi_Out_9

Alternative mathematical representation of unsigned Ouput_Inversions:

© 2022 SCAPS GmbH


Client Control Interface Manual - Inputs and Outputs 187

Set Output Inversions Set


Get

CCI_Return Type: int


CCI return number, see error list.
Notes -
C# Example: Invert all Opto_Outs and keep the inversion states of the Digi_Outs in their current state:

uint Output_Inversion = 0b_1111_1111_1100_0000_0000_0000_0011_1111;


// Decimal 4290773055 as uint32 and -4194241 as int32.
int CCI_Return = cci.ScSetLongValue((int)
ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlLongValueTypeOptoOutInvert, (int)
Output_Inversion);
Table 245: Set Output Inversions

----------

IO Control Object (ScSetOutput or ScWaitForInput) values: Set


Get
DLL Function int CCI_Return = ScSetEntityLongData(string Entity_Name, int Data_ID, int Parameter)
int Parameter = ScGetEntityLongData(string Entity_Name, int Data_ID)
ASCII Function int CCI_Return = ScCciSetEntityLongData(string Entity_Name, int Data_ID, int Parameter)
int Parameter = ScCciGetEntityLongData(string Entity_Name, int Data_ID)
Description Set or get IO Control Object (ScSetOutput or ScWaitForInput) vaules.
Value_Type Type: int ID:
Location:
scComSAMLightClientCtrlLongDataIdEntityIoControlObjectMask 146
Mask is a decimal number that is best understood binary:
The bits represent a value:
· 0: ignored (SAMLight: "X")
· 1: used (SAMLight: "0 if Staten is "0" or "1" if Staten is "1")
Some bits of the USC-1 are undefined (gray). Which bit represents which in/output
depends on the hardware and is shown below.

USC-1:
0000_0000_0010_0000
| Opto_In/Out_0
Opto_In/Out_5

USC-2/-3:
0000_0000_0010_0000

© 2022 SCAPS GmbH


Client Control Interface Manual - Inputs and Outputs 188

IO Control Object (ScSetOutput or ScWaitForInput) values: Set


Get
| || Opto_In/Out_0
| | Opto_In/Out_5
| Digi_In/Out_0
Digi_In/Out_9

RTC3/4/5/6:
0000_0000_0010_0000
| Digi_In/Out_0
Digi_In/Out_15
Alternative mathematical representation of unsigned Mask:

scComSAMLightClientCtrlLongDataIdEntityIoControlObjectStates 147
Mask is a decimal number that is best understood binary:
The bits represent a value:
· 0: inactive (SAMLight: "X" if Maskn is "0" or "0" if Maskn is "1")
· 1: active (SAMLight: "X" if Maskn is "0" or "1" if Maskn is "1").
Some bits of the USC-1 are undefined (gray). Which bit represents which in/output
depends on the hardware and is shown below.

USC-1:
0000_0000_0010_0000
| Opto_In/Out_0
Opto_In/Out_5

USC-2/-3:
0000_0000_0010_0000
| || Opto_In/Out_0
| | Opto_In/Out_5
| Digi_In/Out_0
Digi_In/Out_9

RTC3/4/5/6:
0000_0000_0010_0000
| Digi_In/Out_0
Digi_In/Out_15
Alternative mathematical representation of unsigned States:

© 2022 SCAPS GmbH


Client Control Interface Manual - Inputs and Outputs 189

IO Control Object (ScSetOutput or ScWaitForInput) values: Set


Get

Parameter Type: int Unit: none


The corresponding value.
Notes -
C# Example: Set ScWaitForInput "wait for input" values to "XXXX XXXX XXXX 10XX" Wait for
Opto_Out_2 to be inactive and Opto_Out_3 to be active, ignore all other inputs:

int CCI_Return_01 = cci.ScSetEntityLongData( "wait for input", ( int )


ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlLongDataIdEntityIoControlObjectMask, 12 );
int CCI_Return_02 = cci.ScSetEntityLongData( "wait for input", ( int )
ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlLongDataIdEntityIoControlObjectStates, 8 );
C# Example: Set ScSetOutput "set output" values to "XXXX XXXX XXXX XX1X" Set Opto_Out_1 to
active, ignore all other outputs:

int CCI_Return_01 = cci.ScSetEntityLongData( "set output", ( int )


ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlLongDataIdEntityIoControlObjectMask, 2 );
int CCI_Return_02 = cci.ScSetEntityLongData( "set output", ( int )
ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlLongDataIdEntityIoControlObjectStates, 2 );
C# Example: Get ScSetOutput "set output" values and interpret ScSetOutput Mask 96 and States 32:
int Mask = cci.ScGetEntityLongData( "set output", ( int )
ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlLongDataIdEntityIoControlObjectMask );
int States = cci.ScGetEntityLongData( "set output", ( int )
ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlLongDataIdEntityIoControlObjectStates );

Mask: (96)dec = (0000 0000 0110 0000)bin


States: (32)dec = (0000 0000 0010 0000)bin
Mask an States combined: "XXXX XXXX X01X XXXX" Set Opto_Out_5 to active, Set Digi_Out_0 to
inactive, ignore all other outputs.
Table 246: IO Control Object values

© 2022 SCAPS GmbH


Client Control Interface Manual - Mark 190

9 Mark
Mark has following sub-chapters:

· Mark Dialog
o Red Pointer
· Trigger Dialog
· Mark Preview
· Mark Sequence
· Mark Time
· Mark Counter

The following commands are described in this chapter:

· Execution Status
· Is Marking
· Mark Entity by Name
· Mark Flags
· Stop Marking

Execution Status Set


Get
DLL Function int Status = ScGetLongValue(int Value_Type)

ASCII Function int Status = ScCciGetLongValue(int Value_Type)

Description Returns the current execution state.


Value_Type Type: int
Location: ScComSAMLightClientCtrlValueTypes
scComSAMLightClientCtrlLongValueTypeExecutionStatus 3
Index Type: int Flag:
Location: None
scComStandardDeviceExecutionExtStop 0x1
scComStandardDeviceExecutionBreak 0x2
scComStandardDeviceExecutionWaitForTrigger (only RTC) 0x4
Notes · ExtStop (0x1) will usually be reset by SAMLight using the Break (0x2).
C# Example: Get execution status

int Status = cci.ScGetLongValue( ( int )


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlLongValueTypeExecutionStatus );
Table 247: Execution Status

Is Marking Set
Get
DLL Function int CCI_Return = ScIsMarking()

ASCII Function int CCI_Return = ScCciIsMarking()

Description If the ScMarkEntityByName function was called with WaitForMarkEnd set to 0, this
function can be used for checking whether the actual marking process is already
finished or not. The Function returns 1 if the scanner application is still marking.
CCI_Return Type: int
CCI return number, see error list.
Notes -

© 2022 SCAPS GmbH


Client Control Interface Manual - Mark 191

Is Marking Set
Get
C# Example: Check if the actual marking process is already finished or not:

int CCI_Return = cci.ScIsMarking();


Table 248: Is Marking

Mark Entity by Name Set


Get
DLL Function int CCI_Return = ScMarkEntityByName(string Entity_Name, int Wait_For_Mark_End)

ASCII Function int CCI_Return = ScCciMarkEntityByName(string Entity_Name, int Wait_For_Mark_End)

Description Marks the entity with the name Entity_Name.


Entity Name Type: string Unit: none
Set the entity name.
Wait_For_Mark_End Type: int Unit: none
If it is set to 0, the function returns immediately and the client application can start
other tasks while the scanner application is marking in background. If it is set to 1,
function returns at the end of marking.
CCI_Return Type: int
CCI return number, see error list.
Notes · If the string for the entity name is empty (""), the complete job will be marked.
· Entity_Name together with the flag
scComSAMLightClientCtrlModeFlagEntity_NamesSeparatedBySemicolon can
include more than one entity name. Therefore the names of the entities have to
separated by a semicolon. If more than one entity with a given name exists, all of
them are marked.
· If you are in SAM3D Mode it is possible to mark the whole 3D object. Therefore
set the parameter Entity_Name to @@@Scaps.SpecialTag.3d.All.Layers@@@.
After 10h it runs into a timeout.
· Some mark flags can be set before this command by ScSetMarkFlags().
· The red pointer has to be stopped before the marking procedure can be started by
this command.
C# Example: Mark whole job:

int CCI_Return = cci.ScMarkEntityByName( "", 1 );


Table 249: Mark Entity by Name

Mark Flags Set


Get
DLL Function int CCI_Return = ScSetMarkFlags(int Flag)
int Flag = ScGetMarkFlags()
ASCII Function int CCI_Return = ScCciSetMarkFlags(int Flag)
int Flag = ScCciGetMarkFlags()
Description The mark flags that can be set and get using these functions define the general
behavior of the output process during the next call of ScMarkEntityByName().
Following marking flags are available and can be combined to set using a logical
OR:
Flag Type: int Flag:
Location: None
scComSAMLightClientCtrlMarkFlagWaitForTrigger 0x1
The Mark function starts only after an external start. The WaitForMarkEnd parameter
value of ScMarkEntityByName() flag has no effect.

© 2022 SCAPS GmbH


Client Control Interface Manual - Mark 192

Mark Flags Set


Get
scComSAMLightClientCtrlMarkFlagHideOutput 0x4
Does not show the trigger output window of the controlled scanner application during
marking.
scComSAMLightClientCtrlMarkFlagDisableHomeJump 0x8
Switch off the home jump after the mark.
scComSAMLightClientCtrlMarkFlagPreview 0x10
Execute marking in preview mode. For an example see also: Precalculating Marking
Time.
scComSAMLightClientCtrlMarkFlagSelected 0x20
Mark only selected entities and ignore all other ones.
scComSAMLightClientCtrlMarkFlagDisablePreProcessing 0x40
Disable the pre-processing phase.
scComSAMLightClientCtrlMarkFlagDisablePostProcessing 0x80
Disable the post-processing phase.
scComSAMLightClientCtrlMarkFlagControlLoopByEntity 0x400
Normally if the Mark Loop Count of an Entity is greater than 1, for example 10, then if
marking is active 10 copies of this entity are created internally during download to the
card. If this flag is set, only 1 copy is created but looping 10 times on a lower
software level. This saves time and memory. Only helpful for very complex jobs with
very high loop count and for very high speed marking applications with minimum
dead time between two marks. This flag only works for basic vector objects without
advanced features as for example pen paths or event objects.
scComSAMLightClientCtrlMarkFlagCloseTriggerWindowAtStop 0x800
Close trigger window, if e.g. a ScStopExecution() is called.
scComSAMLightClientCtrlMarkFlagManualLayerPreparation 0x2000
SAMLight prepares the selected layer.
scComSAMLightClientCtrlMarkFlagUseAlreadyOpenedMarkDialog 0x4000
Keeps marking dialog opened for MarkEntityByName.
scComSAMLightClientCtrlMarkFlagDontSwitchToNextLayer 0x8000
For this flag, the mark dialog in SAMLight needs to be open. Then, this flag ensures
that the next ScMarkEntityByName() command will start the marking or the red
pointer according to the current settings in the mark dialog. The mark dialog can be
opened with OpenMarkDialog.
CCI_Return Type: int
CCI return number, see error list.
Notes · Function can be used for to set and get the Mark Flags.
C# Example: Disable home jump:

int Mark_Flags = cci.ScGetMarkFlags();


Mark_Flags = Mark_Flags | 0x8;
int CCI_Return = cci.ScSetMarkFlags(Mark_Flags);
C# Example: Get current set mark flags:

int Mark_Flags = cci.ScGetMarkFlags();


Table 250: Mark Flags

© 2022 SCAPS GmbH


Client Control Interface Manual - Mark 193

Stop Marking Set


Get
DLL Function int CCI_Return = ScStopMarking()

ASCII Function int CCI_Return = ScCciStopMarking()

Description Stops the current marking process.


CCI_Return Type: int
CCI return number, see error list.
Notes -
C# Example: Stop marking:

int CCI_Return = cci.ScStopMarking();


Table 251: Stop Marking

9.1 Mark Dialog


· Mark Dialog Status
· Open / Close Mark Dialog

Mark Dialog Status Set


Get
DLL Function int State = ScGetLongValue (int Value_Type)

ASCII Function int State = ScCciGetLongValue(int Value_Type)

Description Return the state of the mark dialog.


· 0: Mark dialog is closed.
· 1: Mark dialog is open.
Value_Type Type: int ID:
Location: ScComSAMLightClientCtrlValueTypes
scComSAMLightClientCtrlLongValueTypeIsMarkDialogOpen 135
CCI_Return Type: int
CCI return number, see error list.
Notes -
C# Example: Get the state of the mark dialog:

int State = cci.ScGetLongValue( ( int )


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlLongValueTypeIsMarkDialogOpen );
Table 252: Mark Dialog Status

Open / Close Mark Dialog Set


Get
DLL Function int CCI_Return = ScExecCommand(int Cmd_ID)

ASCII Function int CCI_Return = ScCciExecCommand(int Cmd_ID)

Description Open or close the mark dialog.


Cmd_ID Type: int ID:
Location: ScComSAMLightClientCtrlExecCommandConstants
scComSAMLightClientCtrlExecCommandOpenMarkDialog 48
Open the Mark dialog.
scComSAMLightClientCtrlExecCommandCloseMarkDialog 49

© 2022 SCAPS GmbH


Client Control Interface Manual - Mark 194

Open / Close Mark Dialog Set


Get
Close the Mark dialog.
CCI_Return Type: int
CCI return number, see error list.
Notes · The state of the mark dialog can be obtained as well.
C# Example: Open the mark dialog:

int CCI_Return = cci.ScExecCommand( ( int )


ScComSAMLightClientCtrlExecCommandConstants.scComSAMLightClientCtrlExecCommandOpenMarkDialog );
Table 253: Open / Close Mark Dialog

9.1.1 Red Pointer


· Redpointer Mode
· Start / Stop Redpointer

Redpointer Mode Set


Get
DLL Function int CCI_Return = ScSetLongValue(int Value_Type, int Redpointer_Mode)
int Redpointer_Mode = ScGetLongValue(int Value_Type)
ASCII Function int CCI_Return = ScCciSetLongValue(int Value_Type, int Redpointer_Mode)
int Redpointer_Mode = ScCciGetLongValue(int Value_Type)
Description Set or get the redpointer mode.
Value_Type Type: int ID:
Location: ScComSAMLightClientCtrlValueTypes
scComSAMLightClientCtrlLongValueTypeRedpointerMode 65
Redpointer_Mode Type: int Unit: none
· 1: Individual outline
· 2: Total outline
· 3: Individual border
· 4: Only redpointer entities
· 5: Outermost border
CCI_Return Type: int
CCI return number, see error list.
Notes · The mark dialog must be open.
C# Example: Set redpointer mode to total outline:

int CCI_Return = cci.ScSetLongValue( ( int )


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlLongValueTypeRedpointerMode, 0x2 );
Table 254: Redpointer Mode

Start / Stop Redpointer Set


Get
DLL Function int CCI_Return = ScExecCommand(int Cmd_ID)

ASCII Function int CCI_Return = ScCciExecCommand(int Cmd_ID)

Description Start or stop the redpointer.


Cmd_ID Type: int ID:
Location: ScComSAMLightClientCtrlExecCommandConstants

© 2022 SCAPS GmbH


Client Control Interface Manual - Mark 195

Start / Stop Redpointer Set


Get
scComSAMLightClientCtrlExecCommandRedPointerStart 20
Start the red pointer. The mark dialog will be opened, if its closed.
scComSAMLightClientCtrlExecCommandRedPointerStop 21
Stops the red pointer. The mark dialog must be open.
CCI_Return Type: int
CCI error number, see error list.
Notes -
C# Example: Start redpointer:

int CCI_Return = cci.ScExecCommand( ( int )


ScComSAMLightClientCtrlExecCommandConstants.scComSAMLightClientCtrlExecCommandRedPointerStart );
Table 255: Start / Stop Redpointer

9.2 Trigger Dialog


· Exit Trigger Mode
· Start Trigger Mode with Mark Entity by Name and Mark Flag WaitForTrigger
· Stop Execution

Exit Trigger Mode Set


Get
DLL Function int CCI_Return = ScExecCommand(int Cmd_ID)

ASCII Function int CCI_Return = ScCciExecCommand(int Cmd_ID)

Description Stops the TriggerMode.


Cmd_ID Type: int ID:
Location: ScComSAMLightClientCtrlExecCommandConstants
scComSAMLightClientCtrlExecCommandExitTriggerMode 41
CCI_Return Type: int
CCI return number, see error list.
Notes -
C# Example: Exit trigger mode:

int CCI_Return = cci.ScExecCommand( ( int )


ScComSAMLightClientCtrlExecCommandConstants.scComSAMLightClientCtrlExecCommandExitTriggerMode );
Table 256: Exit Trigger Mode

Stop Execution Set


Get
DLL Function int CCI_Return = ScExecCommand(int Cmd_ID)

ASCII Function int CCI_Return = ScCciExecCommand(int Cmd_ID)

Description Stops the execution: If scComSAMLightClientCtrlMarkFlagWaitForTrigger is set with


ScSetMarkFlags and mark is called with ScMarkEntityByName, the trigger mark
dialog opens. The command closes the trigger mark dialog and disables trigger
mode. This is necessary for example if a job is edited and new data need to be given
to the scanner card. Then the trigger mode needs to be stopped and the marking
has to be
started again.

© 2022 SCAPS GmbH


Client Control Interface Manual - Mark 196

Stop Execution Set


Get
Cmd_ID Type: int ID:
Location: ScComSAMLightClientCtrlExecCommandConstants
scComSAMLightClientCtrlExecCommandStopExecution 19
CCI_Return Type: int
CCI return number, see error list.
Notes -
C# Example: Stop execution:

int CCI_Return = cci.ScExecCommand( ( int )


ScComSAMLightClientCtrlExecCommandConstants.scComSAMLightClientCtrlExecCommandStopExecution );
Table 257: Stop Execution

9.3 Mark Preview


· Generate Preview with Mark Entity by Name and Mark Flag Preview
· Show Preview

Show Preview Set


Get
DLL Function int CCI_Return = ScSetLongValue(int Value_Type, int Preview)
int Preview = ScGetLongValue(int Value_Type)
ASCII Function int CCI_Return = ScCciSetLongValue(int Value_Type, int Preview)
int Preview = ScCciGetLongValue(int Value_Type)
Description Switch between Main and preview window.
Value_Type Type: int ID:
Location: ScComSAMLightClientCtrlValueTypes
scComSAMLightClientCtrlLongValueTypeSwitchToPane 43
Preview Type: int Unit: none
· 1: Preview window
· 2: Main window
CCI_Return Type: int
CCI return number, see error list.
Notes -
C# Example: Switch to mark preview window:

int CCI_Return = cci.ScSetLongValue( ( int )


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlLongValueTypeSwitchToPane, 1 );
Table 258: Show Preview

9.4 Mark Sequence


· ResetSequence

Reset Sequence Set


Get
DLL Function int CCI_Return = ScExecCommand(int Cmd_ID)

© 2022 SCAPS GmbH


Client Control Interface Manual - Mark 197

Reset Sequence Set


Get
ASCII Function int CCI_Return = ScCciExecCommand(int Cmd_ID)
int CCI_Return = ScCciResetSequence()
Description This resets the marking sequence to its initial state. This is important for jobs using
the beat count and beat offset parameters.
Cmd_ID Type: int ID:
Location: ScComSAMLightClientCtrlExecCommandConstants
scComSAMLightClientCtrlExecCommandResetSequence 2
CCI_Return Type: int
CCI return number, see error list.
Notes -
C# Example: Reset Sequence:

int CCI_Return = cci.ScExecCommand( ( int )


ScComSAMLightClientCtrlExecCommandConstants.scComSAMLightClientCtrlExecCommandResetSequence );
Table 259: Reset Sequence

9.5 Mark Time


· Relevant Times

Relevant Times Set


Get
DLL Function double Time = ScGetDoubleValue(int Value_Type)

ASCII Function double Time = ScCciGetDoubleValue(int Value_Type)

Description Get various mark times.


Value_Type Type: int ID:
Location: ScComSAMLightClientCtrlValueTypes
scComSAMLightClientCtrlDoubleValueTypeLastMarkTime 21
Get the marking time of the last mark. It can be used to evaluate the time that was
needed for the last marking operation. It is listed in the status bar in SAMLight.
scComSAMLightClientCtrlDoubleValueTypeLastExpectedMarkTime 34
Get the expected marking time. Returns the expected marking time like SAMLight->
Mark->TimeInfo. A previous mark preview is not required.
scComSAMLightClientCtrlDoubleValueTypeLastPreviewTime 112
Get process time of last preview.
scComSAMLightClientCtrlDoubleValueTypeProcessTime 143
Get the process time listed in the status bar in SAMLight.
scComSAMLightClientCtrlDoubleValueTypeTotalMarkingTime 144
Get the total marking time listed in the status bar in SAMLight.
Time Type: double Unit: [s]
The corresponding time.
Notes -
C# Example: Get expected mark time:

double Expected_Mark_Time = cci.ScGetDoubleValue( ( int )


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlDoubleValueTypeLastExpectedMarkTime );

© 2022 SCAPS GmbH


Client Control Interface Manual - Mark 198

Table 260: Relevant Times

9.6 Mark Counter


· Number Marks Completed
· Quantity & Max Quantity
· Reset Counter

Number Marks Completed Set


Get
DLL Function int Mark_Num = ScGetLongValue(int Value_Type)

ASCII Function int Mark_Num = ScCciGetLongValue(int Value_Type)

Description Return the number of markings.


Value_Type Type: int ID:
Location: ScComSAMLightClientCtrlValueTypes
scComSAMLightClientCtrlLongValueTypeNumMarksCompleted 1
Marks_Num Type: int Unit: none
The number of markings.
CCI_Return Type: int
CCI return number, see error list.
Notes -
C# Example: Return the number of marks:

int Mark_Num = cci.ScGetLongValue( ( int )


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlLongValueTypeNumMarksCompleted );
Table 261: Number Marks Completed

Quantity Set
Get
DLL Function int CCI_Return = ScSetLongValue(int Value_Type, int Quantity)
int Quantity = ScGetLongValue(int Value_Type)
ASCII Function int CCI_Return = ScCciSetLongValue(int Value_Type, int Quantity)
int Quantity = ScCciGetLongValue(int Value_Type)
Description Set or get the current quantity or maximum quantity.
Value_Type Type: int ID:
Location: ScComSAMLightClientCtrlValueTypes
scComSAMLightClientCtrlLongValueTypeQuantity 5
Quantity. Quantity counter must be enabled.
scComSAMLightClientCtrlLongValueTypeMaxQuantity 15
Maximum quantity, after that a message is shown. When a value of -1 is set, the
quantity counter functionality is disabled.
Quantity Type: int Unit: none
Returns the number of marks.
CCI_Return Type: int
CCI return number, see error list.
Notes -
C# Example: Get the current quantity:

© 2022 SCAPS GmbH


Client Control Interface Manual - Mark 199

Quantity Set
Get
int Quantity = cci.ScGetLongValue( ( int )
ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlLongValueTypeQuantity );
Table 262: Quantity

Reset Counter Set


Get
DLL Function int CCI_Return = ScExecCommand(int Cmd_ID)

ASCII Function int CCI_Return = ScCciExecCommand(int Cmd_ID)


int CCI_Return = ScCciResetCounter()
Description Resets the mark quantity counter. See chapter Mark Status Bar.
Cmd_ID Type: int ID:
Location: ScComSAMLightClientCtrlExecCommandConstants
scComSAMLightClientCtrlExecCommandResetCounter 7
CCI_Return Type: int
CCI return number, see error list.
Notes -
C# Example: Reset counter

int CCI_Return = cci.ScExecCommand( ( int )


ScComSAMLightClientCtrlExecCommandConstants.scComSAMLightClientCtrlExecCommandResetCounter );
Table 263: Reset Counter

© 2022 SCAPS GmbH


Client Control Interface Manual - Splitting 200

10 Splitting
This chapter deals with the option splitting. There exist several options that are only available in some
modes but not in all modes. The commands available in all modes are explained below. Other commands
only available in a few modes are explained with further details in the following subchapters:

· Angular Splitting
· 1D Planar Splitting
· 2D Planar Splitting
· Ring Splitting
· 1D MOTF Splitting
· Bitmap Rotary Splitting
· Step and Repeat

Following commands can be used and are relevant for all Splitting Modes:

· Disable Splitting
· Global Splitting Checkboxes
· Save Splits As Entities
· Save Splits Job File Name
· Save Splits As Orig Entities
· Split Mode
· Split Order
· Split Overlap
· Split / Resplit Job
· Split Repetitions
· Splitting Submode

Disable Splitting Set


Get
DLL Function int CCI_Return = ScExecCommand(int Cmd_ID)

ASCII Function int CCI_Return = ScCciExecCommand(int Cmd_ID)

Description Deacitvates the splitting checkbox.


Cmd_ID Type: int ID:
Location: ScComSAMLightClientCtrlExecCommandConstants
scComSAMLightClientCtrlExecCommandDisableSplit 44
CCI_Return Type: int
CCI return number, see error list.
Notes -
C# Example: Disable splitting:

int CCI_Return = cci.ScExecCommand((int)


ScComSAMLightClientCtrlExecCommandConstants.scComSAMLightClientCtrlExecCommandDisableSplit);
Table 264: Disable Splitting

© 2022 SCAPS GmbH


Client Control Interface Manual - Splitting 201

Global Splitting Checkboxes Set


Get
DLL Function int CCI_Return = ScSetLongValue(int Value_Type, int Checkbox)
int Checkbox = ScGetLongValue(int Value_Type)
ASCII Function int CCI_Return = ScCciSetLongValue(int Value_Type, int Checkbox)
int Checkbox = ScCciGetLongValue(int Value_Type)
Description Set or get the state of various global splitting checkboxes.
Value_Type Type: int ID:
Location: ScComSAMLightClientCtrlValueTypes
scComSAMLightClientCtrlLongValueTypeSplitKeepMarkFlag 127
Checkbox Keep Mark In Progress Active.
scComSAMLightClientCtrlLongValueTypeSplitDoNotRecalculateSplitLines 128
Checkbox Do Not Recalculate Split Lines.
Only available in vector marking - fixed size splitting.
scComSAMLightClientCtrlLongValueTypeSplitCogOverlappedLines 129
Checkbox Cog Vectors in Overlap Area. Not available in Bitmap Marking.
scComSAMLightClientCtrlLongValueTypeSplitEntityBasedOnlyTopLevel 130
Checkbox Top Level Entities as Split Parts.
Only available in vector marking - entity based splitting.
scComSAMLightClientCtrlLongValueTypeSplitEntityBasedOnlyTopLevelUngr 132
oupWinTextChars2D
Checkbox Ungroup Text. Top Level Entities as Split Part has to be enabled before.
Only available in vector marking - entity based splitting.
scComSAMLightClientCtrlLongValueTypeSplitAllowPreSort 133
Checkbox Avoid Unnecessary Splits in Overlap Area.
Only available in vector marking - fixed split size.
Checkbox Type: int Unit: none
· 0: Disable Checkbox
· 1: Enable Checkbox
CCI_Return Type: int
CCI return number, see error list.
Notes · The availability depends on the 1D MOTF Splitting Mode.
C# Example: Enable cog vectors in overlap area:

int CCI_Return = cci.ScSetLongValue( ( int )


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlLongValueTypeSplitCogOverlappedLines, 1 );
C# Example: Get the state of the cog vectors in overlap area checkbox:

int Cog_Overlapped_Lines_Checkbox = cci.ScGetLongValue( ( int )


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlLongValueTypeSplitCogOverlappedLines );
Table 265: Global Splitting Checkboxes

Save Splits Job File Name Set


Get
DLL Function int CCI_Return = ScSetStringValue(int Value_Type, string File_Name)

ASCII Function int CCI_Return = ScCciSetStringValue(int Value_Type, string File_Name)

Description Set the string values of the file name.


Value_Type Type: int ID:
Location: ScComSAMLightClientCtrlValueTypes

© 2022 SCAPS GmbH


Client Control Interface Manual - Splitting 202

Save Splits Job File Name Set


Get
scComSAMLightClientCtrlStringValueTypeSaveSplitsJobFileName 21
File_Name Type: string Unit: none
Set the required file name value.
CCI_Return Type: int
CCI return number, see error list.
Notes
C# Example: Set file name for splitjob:

int Split_Job = cci.ScSetStringValue((int)


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlStringValueTypeSaveSplitsJobFileName,
Environment.ExpandEnvironmentVariables(@"%SCAPS_SAM%") + "\\jobfiles\\demo_splitted.sjf");
// Job is saved in <SCAPS>/jobfiles
Table 266: Save Splits Job File Name

Save Splitjob Set


Get
DLL Function int CCI_Return = ScExecCommand(int Cmd_ID)

ASCII Function int CCI_Return = ScCciExecCommand(int Cmd_ID)

Description This constant can be used to save a splitted job file as an entity list of split tiles.
Cmd_ID Type: int ID:
Location: ScComSAMLightClientCtrlExecCommandConstants
scComSAMLightClientCtrlExecCommandSaveSplitsAsOrigEntities 30
Save the splitted job with the functionality of the checkbox "Original positions /
Positions as in job to mark".
scComSAMLightClientCtrlExecCommandSaveSplitsAsEntities 38
Save the splitted job.
CCI_Return Type: int
CCI return number, see error list.
Notes This constant has to be executed after SaveSplitsJobFileName.
C# Example: Resplit job:

int CCI_Return = cci.ScExecCommand((int)


ScComSAMLightClientCtrlExecCommandConstants.scComSAMLightClientCtrlExecCommandResplitJob);
Table 267: Save Splits

© 2022 SCAPS GmbH


Client Control Interface Manual - Splitting 203

Split Mode Set


Get
DLL Function int CCI_Return = ScSetLongValue(int Value_Type, int Split_Mode)
int Split_Mode = ScGetLongValue(int Value_Type)
ASCII Function int CCI_Return = ScCciSetLongValue(int Value_Type, int Split_Mode)
int Split_Mode = ScCciGetLongValue(int Value_Type)
Description Set or get the global split mode.
Value_Type Type: int ID:
Location: ScComSAMLightClientCtrlValueTypes
scComSAMLightClientCtrlLongValueTypeSplitMode 125
Split_Mode Type: int Unit: none
· 1: Angular Splitting
· 2: 1D Planar Splitting
· 3: 2D Planar Splitting
· 4: 1D Mark on the Fly Splitting
· 5: Ring Splitting
CCI_Return Type: int
CCI return number, see error list.
Notes · If no mode is selected, the return is -1.
C# Example: Set splitting mode to angular splitting:

int CCI_Return = cci.ScSetLongValue( ( int )


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlLongValueTypeSplitMode, 1 );
C# Example: Get current split mode:

int Split_Mode = cci.ScGetLongValue( ( int )


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlLongValueTypeSplitMode );
Table 268: Split Mode

© 2022 SCAPS GmbH


Client Control Interface Manual - Splitting 204

Split Order Set


Get
DLL Function int CCI_Return = ScSetLongValue(int Value_Type, int Parameter)
int Parameter = ScGetLongValue(int Value_Type)
ASCII Function int CCI_Return = ScCciSetLongValue(int Value_Type, int Parameter)
int Parameter = ScCciGetLongValue(int Value_Type)
Description Set or get various long values in the 1D MOTF settings dialog.
Value_Type Type: int ID:
Location: ScComSAMLightClientCtrlValueTypes
scComSAMLightClientCtrlLongValueTypeAngularSplittingSplitAxis 94
Split axis:
· 0: Vertical
· 1: Horizontal
scComSAMLightClientCtrlLongValueType1dMotfReverse 104
Split Direction. (Only 1D MOTF Splitting).
· 0: Normal
· 1: Reverse
scComSAMLightClientCtrlLongValueTypeReverseSplitOrder 108
Enables and disables the ReverseSplitOrder. (Not available for 1D MOTF Splitting)
· 0: Off.
· 1: On.
Parameter Type: int Unit: none
The corresponding value.
CCI_Return Type: int
CCI return number, see error list.
Notes -
C# Example: Set the split order to vertical:

int CCI_Return = cci.ScSetLongValue( ( int )


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlLongValueTypeAngularSplittingSplitAxis, 0 );
C# Example: Get the set axis:

int Axis_State = cci.ScGetLongValue( ( int )


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlLongValueTypeAngularSplittingSplitAxis );
Table 269: Split Order

SplitAxis ReverseSplitOrder Fixed Size Split Order Entity Based Split Order
0 0

0 1

1 0

1 1

Table 270: Splitting Direction

© 2022 SCAPS GmbH


Client Control Interface Manual - Splitting 205

Split Overlap Set


Get
DLL Function int CCI_Return = ScSetDoubleValue(int Value_Type, double Overlap)
double Overlap = ScGetDoubleValue(int Value_Type)
ASCII Function int CCI_Return = ScCciSetDoubleValue(int Value_Type, double Overlap)
double Overlap = ScCciGetDoubleValue(int Value_Type)
Description Set or get the split overlap value for each available split mode.
Value_Type Type: int ID:
Location: ScComSAMLightClientCtrlValueTypes
scComSAMLightClientCtrlDoubleValueTypeSplitOverlap 145
Overlap Type: double Unit: [%]
Define the split overlap value.
CCI_Return Type: int
CCI return number, see error list.
Notes -
C# Example: Set the split overlap to 50.0%:

int CCI_Return = cci.ScSetDoubleValue((int)


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlDoubleValueTypeSplitOverlap, 50.0);
C# Example: Get the split overlap value:

double Overlap = cci.ScGetDoubleValue((int)


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlDoubleValueTypeSplitOverlap);
Table 271: Split Overlap

Split / Resplit Job Set


Get
DLL Function int CCI_Return = ScExecCommand(int Cmd_ID)

ASCII Function int CCI_Return = ScCciExecCommand(int Cmd_ID)


int CCI_Return = ScCciResplitJob()
Description Resplit / activate the splitting of a job that was modified so that the split data have to
be updated by this option.
Cmd_ID Type: int ID:
Location: ScComSAMLightClientCtrlExecCommandConstants
scComSAMLightClientCtrlExecCommandResplitJob 13
CCI_Return Type: int
CCI return number, see error list.
Notes · The splitting mode will be activated if it is disabled.
C# Example: Resplit job:

int CCI_Return = cci.ScExecCommand((int)


ScComSAMLightClientCtrlExecCommandConstants.scComSAMLightClientCtrlExecCommandResplitJob);
Table 272: Split / Resplit Job

© 2022 SCAPS GmbH


Client Control Interface Manual - Splitting 206

Split Repetitions Set


Get
DLL Function int CCI_Return = ScSetLongValue(int Value_Type, int Repetitions)
int Repetitions = ScGetLongValue(int Value_Type)
ASCII Function int CCI_Return = ScCciSetLongValue(int Value_Type, int Repetitions)
int Repetitions = ScCciGetLongValue(int Value_Type)
Description Set or get the number of repetitions of each single split part.
Value_Type Type: int ID:
Location: ScComSAMLightClientCtrlValueTypes
scComSAMLightClientCtrlLongValueTypeSplitMarkLoop 126
Repetitions Type: int Unit: none
The corresponding value.
CCI_Return Type: int
CCI return number, see error list.
Notes -
C# Example: Set split repetitions to 20:

int CCI_Return = cci.ScSetLongValue( ( int )


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlLongValueTypeSplitMarkLoop, 20 );
C# Example: Get the split repetitions:

int Mark_Loop_Count = cci.ScGetLongValue( ( int )


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlLongValueTypeSplitMarkLoop );
Table 273: Split Repetitions

Splitting Submode Set


Get
DLL Function int CCI_Return = ScExecCommand(int Cmd_ID)

ASCII Function int CCI_Return = ScCciExecCommand(int Cmd_ID)

Description Set the submode of the drop down menu in the splitting settings dialog.
Cmd_ID Type: int ID:
Location: ScComSAMLightClientCtrlExecCommandConstants
scComSAMLightClientCtrlExecCommandSetMotfFixed 45
Vector marking - fixed split size.
scComSAMLightClientCtrlExecCommandSetMotfBmp 46
Bitmap Marking.
scComSAMLightClientCtrlExecCommandSetMotf 53
Vector marking - entity based splitting.
CCI_Return Type: int
CCI return number, see error list.
Notes
C# Example: Set 1D splitting submode to vector marking - fixed size:

int CCI_Return = cci.ScExecCommand( ( int )


ScComSAMLightClientCtrlExecCommandConstants.scComSAMLightClientCtrlExecCommandSetMotfFixed );
Table 274: Splitting Submode

© 2022 SCAPS GmbH


Client Control Interface Manual - Splitting 207

10.1 Angular Splitting


· Diameter
· Global Splitting Checkboxes, see Splitting
o Avoid Unnecessary Splits in Overlap Area
o Cog Vectors in Overlap Area
o Do Not Recalculate Split Lines
o Top Level Entities as Split Parts
o Keep Mark In Progress Active
o Ungroup Text
· Repetitions Over 360°
· Split Angle
· Split Order, see Splitting
· Split Overlap, see Splitting
· Start Position, see Splitting 2D Planar Splitting
· Split Repetitions, see Splitting
· Split Submode, see Splitting

Diameter Set
Get
DLL Function int CCI_Return = ScSetDoubleValue(int Value_Type, double Total_Diameter)
double Total_Diameter = ScGetDoubleValue(int Value_Type)
ASCII Function int CCI_Return = ScCciSetDoubleValue(int Value_Type, double Total_Diameter)
double Total_Diameter = ScCciGetDoubleValue(int Value_Type)
Description Set or get the angular splitting total diameter.
Value_Type Type: int ID:
Location: ScComSAMLightClientCtrlValueTypes
scComSAMLightClientCtrlDoubleValueTypeAngularSplittingTotalDiameter 50
Total_Diameter Type: double Unit: [mm]*
The corresponding value of the total diameter.
CCI_Return Type: int
CCI return number, see error list.
Notes · The default unit is mm, but the user can select a different unit.
C# Example: Set the angular splitting total diameter to 100.0:

int CCI_Return = cci.ScSetDoubleValue((int)


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlDoubleValueTypeAngularSplittingTotalDiameter,
100.0);
C# Example: Get the angular splitting total diameter:

double Total_Diameter = cci.ScGetDoubleValue((int)


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlDoubleValueTypeAngularSplittingTotalDiameter);
Table 275: Diameter

© 2022 SCAPS GmbH


Client Control Interface Manual - Splitting 208

Repetitions Over 360° Set


Get
DLL Function int CCI_Return = ScSetLongValue(int Value_Type, int Parts)
int Parts = ScGetLongValue(int Value_Type)
ASCII Function int CCI_Return = ScCciSetLongValue(int Value_Type, int Parts)
int Parts = ScCciGetLongValue(int Value_Type)
Description Especially for Rotary Splitting this constant defines how often the job should be
marked distributed homogeneously on the surface.
Value_Type Type: int ID:
Location: ScComSAMLightClientCtrlValueTypes
scComSAMLightClientCtrlLongValueTypeAngularSplittingParts 33
Sets or gets the number of parts distributed homogeneously over the surface of the
cylinder, if it is big enough.
Parts Type: int Unit: none
Define the number of repetitions within 360°.
CCI_Return Type: int
CCI return number, see error list.
Notes -
C# Example: Set number of AngularSplittingParts to 10:

int CCI_Return = cci.ScSetLongValue((int)


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlLongValueTypeAngularSplittingParts, 10);
C# Example: Get number of AngularSplittingParts:

int CCI_Return = cci.ScGetLongValue((int)


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlLongValueTypeAngularSplittingParts);
Table 276: Repetitions Over 360°

© 2022 SCAPS GmbH


Client Control Interface Manual - Splitting 209

Split Angle Set


Get
DLL Function int CCI_Return = ScSetDoubleValue(int Value_Type, double Angle)
double Angle = ScGetDoubleValue(int Value_Type)
ASCII Function int CCI_Return = ScCciSetDoubleValue(int Value_Type, double Angle)
double Angle = ScCciGetDoubleValue(int Value_Type)
Description Set or get the angular splitting angle for angular splitting mode "Vector Marking -
Fixed Split Size".
Value_Type Type: int ID:
Location: ScComSAMLightClientCtrlValueTypes
scComSAMLightClientCtrlDoubleValueTypeAngularSplittingAngle 51
Angle Type: double Unit: [deg]
The corresponding value of the splitting angle.
CCI_Return Type: int
CCI return number, see error list.
Notes · The default unit is mm, but the user can select a different unit.
C# Example: Set the angular splitting angle to 10.0°:

int CCI_Return = cci.ScSetDoubleValue((int)


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlDoubleValueTypeAngularSplittingAngle, 10.0);
C# Example: Get the angular splitting angle:

double Splitting_Angle = cci.ScGetDoubleValue((int)


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlDoubleValueTypeAngularSplittingAngle);
Table 277: Split Angle

10.2 1D Planar Splitting


· Global Splitting Checkboxes, see Splitting
o Avoid Unnecessary Splits in Overlap Area
o Cog Vectors in Overlap Area
o Do Not Recalculate Split Lines
o Top Level Entities as Split Parts
o Keep Mark In Progress Active
o Ungroup Text
· Group Width
· Split Order, see Splitting
· Split Overlap, see Splitting
· Start Position, see Splitting 2D Planar Splitting
· Split Repetitions, see Splitting
· Split Size
· Split Submode, see Splitting

© 2022 SCAPS GmbH


Client Control Interface Manual - Splitting 210

Group Width Set


Get
DLL Function int CCI_Return = ScSetDoubleValue(int Value_Type, double Width)
double Width = ScGetDoubleValue(int Value_Type)
ASCII Function int CCI_Return = ScCciSetDoubleValue(int Value_Type, double Width)
double Width = ScCciGetDoubleValue(int Value_Type)
Description Set or get the grouped entities width.
Value_Type Type: int ID:
Location: ScComSAMLightClientCtrlValueTypes
scComSAMLightClientCtrlDoubleValueTypeEntityBasedSplittingGroupedEntityWidth 94
Width Type: double Unit: [mm]*
The corresponding value.
CCI_Return Type: int
CCI return number, see error list.
Notes · The default length unit is mm, but the user can select a different unit.
· Only available in vector marking - entity based splitting.
C# Example: Set the grouped entities width to 16.7 mm:

int CCI_Return = cci.ScSetDoubleValue( ( int )


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlDoubleValueTypeEntityBasedSplittingGroupedEntityW
idth, 16.7 );
C# Example: Get the grouped entities width:

double Grouped_Entities_Width = cci.ScGetDoubleValue( ( int )


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlDoubleValueTypeEntityBasedSplittingGroupedEntityW
idth );
Table 278: Group Width

© 2022 SCAPS GmbH


Client Control Interface Manual - Splitting 211

Split Size Set


Get
DLL Function int CCI_Return = ScSetDoubleValue(int Value_Type, double Horizontal_Splitting_Value)
double Horizontal_Splitting_Value = ScGetDoubleValue(int Value_Type)
ASCII Function int CCI_Return = ScCciSetDoubleValue(int Value_Type, double Horizontal_Splitting_Value)
double Horizontal_Splitting_Value = ScCciGetDoubleValue(int Value_Type)
Description Set or get the Splitting Size for 1D planar splitting mode "Vector Marking - Fixed Split
Size"
Value_Type Type: int ID:
Location: ScComSAMLightClientCtrlValueTypes
scComSAMLightClientCtrlDoubleValueTypeHorizontalSplittingValue 52
Set the horizontal splitting value.
scComSAMLightClientCtrlDoubleValueTypeVerticalSplittingValue 53
Set the vertical splitting value.
Value Type: double Unit: [mm]*
The corresponding value of the splitting size.
CCI_Return Type: int
CCI return number, see error list.
Notes · Can also be set with 2DSplitWidthValue.
· The default unit is mm, but the user can select a different unit.
C# Example: Set the horizontal splitting value (Splitting Size) to 30

int CCI_Return = cci.ScSetDoubleValue((int)


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlDoubleValueTypeHorizontalSplittingValue, 30);
C# Example: Get the horizontal splitting value (Splitting Size)

double Splitting_Size = cci.ScGetDoubleValue((int)


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlDoubleValueTypeHorizontalSplittingValue);
Table 279: Split Size

10.3 2D Planar Splitting


· Global Splitting Checkboxes, see Splitting
o Avoid Unnecessary Splits in Overlap Area
o Cog Vectors in Overlap Area
o Do Not Recalculate Split Lines
o Top Level Entities as Split Parts
o Keep Mark In Progress Active
o Ungroup Text
· Split Order, see Splitting
· Split Overlap, see Splitting
· Start Position
· Split Repetitions, see Splitting
· Split Submode, see Splitting
· Split Width / Height

© 2022 SCAPS GmbH


Client Control Interface Manual - Splitting 212

Start Position Set


Get
DLL Function int CCI_Return = ScSetDoubleValue(int Value_Type, double Parameter)
double Parameter = ScGetDoubleValue(int Value_Type)
ASCII Function int CCI_Return = ScCciSetDoubleValue(int Value_Type, double Parameter)
double Parameter = ScCciGetDoubleValue(int Value_Type)
Description Set or get the start value for splitting.
Value_Type Type: int ID:
Location: ScComSAMLightClientCtrlValueTypes
scComSAMLightClientCtrlDoubleValueTypeStartSplittingPosX 56
Set or get a start value for the first axis (not necessarily X axis).
scComSAMLightClientCtrlDoubleValueTypeStartSplittingPosY 57
Set or get a start value for the second axis (not necessarily Y axis).
Parameter Type: double Unit: depends on constant
Set or get the required data.
CCI_Return Type: int
CCI return number, see error list.
Notes When using Angular Splitting, the start value can be set with StartSplittingPosX in °.
When using 2D planar splitting, the start value of the first axis is set with
StartSplittingPosX, the start value of the second axis is set with StartSplittingPosY.
C# Example: Set spitting start value X to 12.3:

int CCI_Return = cci.ScSetDoubleValue((int)


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlDoubleValueTypeStartSplittingPosX, 12.3);
C# Example: Get spitting start value Y:

double Start_Splitting_Position = cci.ScGetDoubleValue((int)


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlDoubleValueTypeStartSplittingPosY);
Table 280: Start Position

© 2022 SCAPS GmbH


Client Control Interface Manual - Splitting 213

Split Width / Height Set


Get
DLL Function int CCI_Return = ScSetDoubleValue(int Value_Type, double 2D_Split_Width_Value)
double 2D_Split_Width_Value = ScGetDoubleValue(int Value_Type)
ASCII Function int CCI_Return = ScCciSetDoubleValue(int Value_Type, double 2D_Split_Width_Value)
double 2D_Split_Width_Value = ScCciGetDoubleValue(int Value_Type)
Description Set or get the split width or height for 2D planar splitting mode "Vector Marking -
Fixed Split Size"
Value_Type Type: int ID:
Location: ScComSAMLightClientCtrlValueTypes
scComSAMLightClientCtrlDoubleValueType2DSplitWidthValue 113
Set or get the split width.
scComSAMLightClientCtrlDoubleValueType2DSplitHeightValue 114
Set or get the split height.
Value Type: double Unit: [mm]*
The corresponding value of the split width/height.
CCI_Return Type: int
CCI return number, see error list.
Notes · The default unit is mm, but the user can select a different unit.
C# Example: Set the split width to 10.0:

int CCI_Return = cci.ScSetDoubleValue((int)


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlDoubleValueType2DSplitWidthValue, 10.0);
C# Example: Get the split height:

double Split_Height_Value = cci.ScGetDoubleValue((int)


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlDoubleValueType2DSplitHeightValue
Table 281: Split Width / Height

10.4 Ring Splitting


The following parameter for ring splitting can be found and only be set in the ring splitting dialog. In addition
there is a Splitting Tab in SAMLight at Settings System Splitting, see Global Settings Splitting.

· Enable Z Tilt Compensation


· Global Splitting Checkboxes, see Splitting
o Avoid Unnecessary Splits in Overlap Area
o Cog Vectors in Overlap Area
o Do Not Recalculate Split Lines
o Top Level Entities as Split Parts
o Keep Mark In Progress Active
o Ungroup Text
· Group Width, see Splitting 1D Planar Splitting
· Repetitions Over 360°s, see Splitting Angular Splitting
· Tilt Compensation Parameters, see Global Settings Splitting
o Mark Angle
· Split Order, see Splitting
· Split Overlap, see Splitting
· Split Repetitions, see Splitting
· Split Submode, see Splitting
· Z Motion Axis, see Global Settings Splitting

© 2022 SCAPS GmbH


Client Control Interface Manual - Splitting 214

Enable Z Tilt Compensation Set


Get
DLL Function int CCI_Return = ScSetLongValue(int Value_Type, int Tilt_Compensation)
int Tilt_Compensation = ScGetLongValue(int Value_Type)
ASCII Function int CCI_Return = ScCciSetLongValue(int Value_Type, int Tilt_Compensation)
int Tilt_Compensation = ScCciGetLongValue(int Value_Type)
Description Sets or gets the Ring Splitting Z tilt compensation
Value_Type Type: int ID:
Location: ScComSAMLightClientCtrlValueTypes
scComSAMLightClientCtrlLongValueTypeRingSplittingEnableZTiltCompensation 96
Tilt_Compensation Type: int Unit: none
· 0: Disables the z tilt compensation.
· 1: Enables the z tilt compensation.
CCI_Return Type: int
CCI return number, see error list.
Notes -
C# Example: Enable the ring splitting z tilt compensation:

int CCI_Return = cci.ScSetLongValue((int)


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlLongValueTypeRingSplittingEnableZTiltCompensation
, 1);
C# Example: Get the ring splitting Z tilt compensation status:

int Z_Tilt_Compensation = cci.ScGetLongValue((int)


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlLongValueTypeRingSplittingEnableZTiltCompensation
);
Table 282: Enable Z Tilt Compensation

10.5 1D MOTF Splitting


· 1D MOTF Splitting Checkboxes
· 1D MOTF Splitting Double Values
· Global Splitting Checkboxes, see Splitting
o Avoid Unnecessary Splits in Overlap Area
o Cog Vectors in Overlap Area
o Do Not Recalculate Split Lines
o Top Level Entities as Split Parts
o Keep Mark In Progress Active
o Ungroup Text
· Group Width, see Splitting 1D Planar Splitting
· Split Order, see Splitting
· Split Overlap, see Splitting
· Split Repetitions, see Splitting
· Splitting Submode, see Splitting

© 2022 SCAPS GmbH


Client Control Interface Manual - Splitting 215

1D MOTF Splitting Checkboxes Set


Get
DLL Function int CCI_Return = ScSetLongValue(int Value_Type, int Checkbox)
int Checkbox = ScGetLongValue(int Value_Type)
ASCII Function int CCI_Return = ScCciSetLongValue(int Value_Type, int Checkbox)
int Checkbox = ScCciGetLongValue(int Value_Type)
Description Set or get the state of various 1D MOTF Splitting checkboxes.
Value_Type Type: int ID:
Location: ScComSAMLightClientCtrlValueTypes
scComSAMLightClientCtrlLongValueType1DMotfCenter 111
Checkbox Center resulting splits. Not available in Bitmap Marking.
scComSAMLightClientCtrlLongValueTypeSplitEntityBasedOnlyTopLevelSort 131
AccordingToStartBorder
Checkbox Sort according to start border. OnlyTopLevel has to be enabled before.
Only available in vector marking - entity based splitting.
scComSAMLightClientCtrlLongValueTypeSplitMotfEndlessRepeat 134
Checkbox Endless repeat.
Checkbox Type: int Unit: none
· 0: Disable Checkbox.
· 1: Enable Checkbox.
CCI_Return Type: int
CCI return number, see error list.
Notes · The availability depends on the 1D MOTF Splitting Mode.
C# Example: Enable endless repeat:

int CCI_Return = cci.ScSetLongValue( ( int )


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlLongValueTypeSplitMotfEndlessRepeat, 1 );
C# Example: Get the state of the endless repeat checkbox:

int Endless_Repeat_Checkbox = cci.ScGetLongValue( ( int )


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlLongValueTypeSplitMotfEndlessRepeat );
Table 283: 1D MOTF Splitting Checkboxes

© 2022 SCAPS GmbH


Client Control Interface Manual - Splitting 216

1D MOTF Splitting Double Values Set


Get
DLL Function int CCI_Return = ScSetDoubleValue(int Value_Type, double Parameter)
double Parameter = ScGetDoubleValue(int Value_Type)
ASCII Function int CCI_Return = ScCciSetDoubleValue(int Value_Type, double Parameter)
double Parameter = ScCciGetDoubleValue(int Value_Type)
Description Set or get various double values in the 1D MOTF settings dialog.
Value_Type Type: int ID:
Location: ScComSAMLightClientCtrlValueTypes
scComSAMLightClientCtrlDoubleValueTypeSpeedMotfEntityBasedSplitting 91
Set function: Use speed [mm/s]. Get function: Current possible speed [mm/s]. The
unit displayed in SAMLight is different: [m/min]. Only available in vector marking -
entity based splitting.
scComSAMLightClientCtrlDoubleValueTypeSplitMotfDistanceBetweenSplits 147
Gap between splits [mm]*. Endless repeat has to enabled.
Parameter Type: double Unit: depends on constant
The corresponding value.
CCI_Return Type: int
CCI return number, see error list.
Notes · The default length unit is mm, but the user can select a different unit.
C# Example: Set the gap between the splits to 16.7 mm:

int CCI_Return = cci.ScSetDoubleValue( ( int )


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlDoubleValueTypeSplitMotfDistanceBetweenSplits,
16.7 );
C# Example: Get the gap between splits:

double Gap_Between_Splits = cci.ScGetDoubleValue( ( int )


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlDoubleValueTypeSplitMotfDistanceBetweenSplits );
Table 284: 1D MOTF Splitting Double Values

© 2022 SCAPS GmbH


Client Control Interface Manual - Splitting 217

10.6 Bitmap Rotary Splitting


· Bitmap Mode Parameters
· Enable Bitmap Rotary Splitting

Bitmap Mode Parameters Set


Get
DLL Function int CCI_Return = ScSetDoubleValue(int Value_Type, double Parameter)
double Parameter = ScGetDoubleValue(int Value_Type)
ASCII Function int CCI_Return = ScCciSetDoubleValue(int Value_Type, double Parameter)
double Parameter = ScCciGetDoubleValue(int Value_Type)
Description
Value_Type Type: int
Location: ScComSAMLightClientCtrlValueTypes
scComSAMLightClientCtrlDoubleValueTypeBmpContinuousTotalDiameter 141
Set total diameter value [mm*].
scComSAMLightClientCtrlDoubleValueTypeBmpContinuousAngle 142
Set the mark angle [deg].
Parameter Type: double Unit: depends on constant
The desired value.
CCI_Return Type: int
CCI return number, see error list.
Notes · The default unit is mm, but the user can select a different unit.
C# Example:

Table 285: Bitmap Mode Parameters

Enable Bitmap Rotary Splitting Set


Get
DLL Function int CCI_Return = ScSetLongValue(int Value_Type, int Bitmap_Splitting)
int Bitmap_Splitting = ScGetLongValue(int Value_Type)
ASCII Function int CCI_Return = ScCciSetLongValue(int Value_Type, int Bitmap_Splitting)
int Bitmap_Splitting = ScCciGetLongValue(int Value_Type)
Description Enable the bitmap rotary splitting mode.
Value_Type Type: int ID:
Location: ScComSAMLightClientCtrlValueTypes
scComSAMLightClientCtrlLongValueTypeEnableBmpSplitting 93
Bitmap_Splitting Type: int Unit: none
· 0: Disable bitmap rotary splitting.
· 1: Enable bitmap rotary splitting.
CCI_Return Type: int
CCI return number, see error list.
Notes -
C# Example: Get if bitmap rotary splitting is enabled:

int Bitmap_Splitting = cci.ScGetLongValue((int)


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlLongValueTypeEnableBmpSplitting);

© 2022 SCAPS GmbH


Client Control Interface Manual - Splitting 218

Table 286: Enable Bitmap Rotary Splitting

10.7 Step and Repeat


· Enable Step and Repeat / Select Mode
· Step and Repeat Parameters
· Step and Repeat Planar Stepping

The command SplitKeepMarkFlag does not set the flag Keep Marking Active Output for Step and
Repeat.

Enable Step and Repeat / Select Mode Set


Get
DLL Function int CCI_Return = ScSetLongValue(int Value_Type, int Parameter)
int Step_Repeat = ScGetLongValue(int Value_Type)
ASCII Function int CCI_Return = ScCciSetLongValue(int Value_Type, int Parameter)
int Step_Repeat = ScCciGetLongValue(int Value_Type)
Description See below.
Value_Type Type: int ID:
Location: ScComSAMLightClientCtrlValueTypes
scComSAMLightClientCtrlLongValueTypeStepAndRepeatPlanarMode 115
Set or get if planar mode for step and repeat is enabled.
scComSAMLightClientCtrlLongValueTypeStepAndRepeatPlanarModeSimulation 116
Set or get if simulate axis for planar mode is enabled.
scComSAMLightClientCtrlLongValueTypeEnableStepAndRepeat 121
Set or get if step and repeat is enabled.
Parameter Type: int Unit: none
· 0: Disable step and repeat.
· 1: Enable step and repeat.
CCI_Return Type: int
CCI return number, see error list.
Notes -
C# Example: Set step and repeat to enabled:

int Step_Repeat_enable = cci.ScSetLongValue((int)


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlLongValueTypeEnableStepAndRepeat, 1);

Table 287: Enable Step and Repeat /Select Mode

© 2022 SCAPS GmbH


Client Control Interface Manual - Splitting 219

Step and Repeat Parameters Set


Get
DLL Function int CCI_Return = ScSetLongValue(int Value_Type, int Parameter)
int Parameter = ScGetLongValue(int Value_Type)
ASCII Function int CCI_Return = ScCciSetLongValue(int Value_Type, int Parameter)
int Parameter = ScCciGetLongValue(int Value_Type)
Description See below.
Value_Type Type: int ID:
Location: ScComSAMLightClientCtrlValueTypes
scComSAMLightClientCtrlLongValueTypeStepAndRepeatTotalSteps 114
Set or get the total number of steps.
scComSAMLightClientCtrlLongValueTypeStepAndRepeatFirstMoveAxis 117
Set or get planar axis in 1(X), please refer to motion settings dialog for the axis index
(zero based). None is not allowed to be set.
scComSAMLightClientCtrlLongValueTypeStepAndRepeatSecondMoveAxis 118
Set or get planar axis in 2(Y), please refer to motion settings dialog for the axis index
(zero based). Index of "none" is -1.
scComSAMLightClientCtrlLongValueTypeStepAndRepeatPlanarStepCountX 119
Set or get the step count for X.
scComSAMLightClientCtrlLongValueTypeStepAndRepeatPlanarStepCountY 120
Set or get the step count for Y.
Parameter Type: int Unit: none
The corresponding parameter.
CCI_Return Type: int
CCI return number, see error list.
Notes -
C# Example: Set total steps to 9:

int Total_Steps = cci.ScSetLongValue((int)


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlLongValueTypeEnableStepAndRepeatTotalSteps, 9);

Table 288: Step and Repeat Parameters

Step and Repeat Planar Stepping Set


Get
DLL Function int CCI_Return = ScSetDoubleValue(int Value_Type, double Parameter)
double Parameter = ScGetDoubleValue(int Value_Type)
ASCII Function int CCI_Return = ScCciSetDoubleValue(int Value_Type, double Parameter)
double Parameter = ScCciGetDoubleValue(int Value_Type)
Description Set or get the parameters for the planar mode.
Value_Type Type: int ID:
Location: ScComSAMLightClientCtrlValueTypes
scComSAMLightClientCtrlDoubleValueTypeStepAndRepeatPlanarStart 132
X
Set or get the start parameter of the first axis.
scComSAMLightClientCtrlDoubleValueTypeStepAndRepeatPlanarStart 133
Y
Set or get the start parameter of the second axis.

© 2022 SCAPS GmbH


Client Control Interface Manual - Splitting 220

Step and Repeat Planar Stepping Set


Get
scComSAMLightClientCtrlDoubleValueTypeStepAndRepeatPlanarStep 134
X
Set or get the step value of the first axis.
scComSAMLightClientCtrlDoubleValueTypeStepAndRepeatPlanarStep 135
Y
Set or get the step value of the second axis.
scComSAMLightClientCtrlDoubleValueTypeStepAndRepeatSpeed 136
Set or get the motion speed.
Parameter Type: double Unit: none
The corresponding parameter.
CCI_Return Type: int
CCI return number, see error list.
Notes -
C# Example: Get the start parameter for the first axis:

double Start_First_Axis = cci.ScGetDoubleValue((int)


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlDoubleValueTypeStepAndRepeatPlanarStartX);
Table 289: Step and Repeat Planar Stepping

11 Option Optic3D
The following chapter deals with Optic3D. Global parameters can be found in the main chapter, whereby the
commands for 3D surfaces are explained in the following subchapter:

· Optic 3D Settings

Optic 3D Settings Set


Get
DLL Function int CCI_Return = ScSetDoubleValue(int Value_Type, double Parameter)
double Parameter = ScGetDoubleValue(int Value_Type)
ASCII Function int CCI_Return = ScCciSetDoubleValue(int Value_Type, double Parameter)
double Parameter = ScCciGetDoubleValue(int Value_Type)
Description Set or get various Optic 3D parameter of the Z Correction (3D Ext) dialog.
Value_Type Type: int ID:
Location: ScComSAMLightClientCtrlValueTypes
scComSAMLightClientCtrlDoubleValueTypeDistanceMirrorsMM 196608
Distance mirrors [mm].
scComSAMLightClientCtrlDoubleValueTypeRadiusSecondMirrorMM 196609
Distance 2nd mirror to focus [mm].
scComSAMLightClientCtrlDoubleValueTypeZNumControlPoints 196610
Number of Z-Corr lookup control points of the Z-Corr lookup table. Range: [2.0,
32.0].
scComSAMLightClientCtrlDoubleValueTypeZCorrFieldSize 196612
Fieldsize [mm] of the Z Correction (3D Ext) dialog.
scComSAMLightClientCtrlDoubleValueTypeLookupZMMStart 196864

© 2022 SCAPS GmbH


Client Control Interface Manual - Option Optic3D 221

Optic 3D Settings Set


Get
Focus distance [mm] of the Z-Corr lookup table. Range of mm values: [0.0, 5000.0].
Up to 32 Z-Corr lookup control points can be used. Range of LookupZMM IDs:
[196864, 196895].
scComSAMLightClientCtrlDoubleValueTypeLookupZDacStart 229632
Z - value [bit] of the Z-Corr lookup table. Range of bit values: [-32768.0, 32767.0]. Up
to 32 Z-Corr lookup control points can be used. Range of LookupZDac IDs: [229632,
229663].
Parameter Type: double Unit: depends on constant
The corresponding value.
CCI_Return Type: int
CCI return number, see error list.
Notes -
C# Example: Set mirror distance to 20.0 mm:

int CCI_Return = cci.ScSetDoubleValue( ( int )


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlDoubleValueTypeDistanceMirrorsMM, 20.0 );
C# Example: Get current mirror distance:

int Distance_Mirrors = cci.ScGetLongValue( ( int )


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlDoubleValueTypeDistanceMirrorsMM );
C# Example: Set up a linear Z lookup table:

double[] Lookup_Z_MM = { 210.0, 270.0 };


double[] Lookup_Z_Dac = { -32768.0, 32767.0 };
int CCI_Return_00 = cci.ScSetDoubleValue( ( int )
ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlDoubleValueTypeZNumControlPoints, ( double )
Lookup_Z_MM.Length );
for (int i = 0; i < Lookup_Z_MM.Length; i++ )
{
int CCI_Return_01 = cci.ScSetDoubleValue( ( int )
ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlDoubleValueTypeLookupZMMStart + i, Lookup_Z_MM[i]
);
int CCI_Return_02 = cci.ScSetDoubleValue( ( int )
ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlDoubleValueTypeLookupZDacStart + i,
Lookup_Z_Dac[i] );
}

Table 290: Optic 3D Settings

11.1 3D Surfaces

· 3D Surface Enable
· 3D Surface Type
· Cylinder Properties
· Sphere Properties
· Tilted Surface Properties
· STL Projection Properties
· STL Path

© 2022 SCAPS GmbH


Client Control Interface Manual - Option Optic3D 222

3D Surface Enable Set


Get
DLL Function int CCI_Return = ScSetLongValue(int Value_Type, int Enable_3D_Surface)
int Enable_3D_Surface = ScGetLongValue(int Value_Type)
ASCII Function int CCI_Return = ScCciSetLongValue(int Value_Type, int Enable_3D_Surface)
int Enable_3D_Surface = ScCciGetLongValue(int Value_Type)
Description Set or get the 3D Surface enable state.
Value_Type Type: int ID:
Location: ScComSAMLightClientCtrlValueTypes
scComSAMLightClientCtrlLongValueTypeEnable3DSurface 87
Enable_3D_Surface Type: int Unit: none
· 0: 3D Surfaces disabled.
· 1: 3D Surfaces enabled.
CCI_Return Type: int
CCI return number, see error list.
Notes -
C# Example: Enable 3D Surface:

int CCI_Return = cci.ScSetLongValue( ( int )


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlLongValueTypeEnable3DSurface, 1 );
C# Example: Get current 3D Surface enable state:

int Enable_3D_Surface = cci.ScGetLongValue( ( int )


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlLongValueTypeEnable3DSurface );
Table 291: 3D Surface Enable

© 2022 SCAPS GmbH


Client Control Interface Manual - Option Optic3D 223

3D Surface Mode Set


Get
DLL Function int CCI_Return = ScSetLongValue(int Value_Type, int Mode_3D_Surface)
int Mode_3D_Surface = ScGetLongValue(int Value_Type)
ASCII Function int CCI_Return = ScCciSetLongValue(int Value_Type, int Mode_3D_Surface)
int Mode_3D_Surface = ScCciGetLongValue(int Value_Type)
Description Set or get the 3D Surface mode.
Value_Type Type: int ID:
Location: ScComSAMLightClientCtrlValueTypes
scComSAMLightClientCtrlLongValueType3DSurfaceSetType 86
Mode_3D_Surface Type: int Unit: none
· 0: Cylinder (Cylinder properties)
· 1: STL projection (STL projection properties, STL path)
· 2: Tilted surface (Tilted surface properties)
· 3: Sphere (Sphere properties)
CCI_Return Type: int
CCI return number, see error list.
Notes · 3D Surface enable must be set.
C# Example: Set the 3D Surface mode to sphere:

int CCI_Return = cci.ScSetLongValue( ( int )


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlLongValueType3DSurfaceSetType, 3 );
C# Example: Get current 3D Surface mode:

int Mode_3D_Surface = cci.ScGetLongValue( ( int )


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlLongValueType3DSurfaceSetType );
Table 292: 3D Surface Mode

Cylinder Properties Set


Get
DLL Function int CCI_Return = ScSetDoubleValue(int Value_Type, double Parameter)
double Parameter = ScGetDoubleValue(int Value_Type)
ASCII Function int CCI_Return = ScCciSetDoubleValue(int Value_Type, double Parameter)
double Parameter = ScCciGetDoubleValue(int Value_Type)
Description Set or get various cylinder parameter.
Value_Type Type: int ID:
Location: ScComSAMLightClientCtrlValueTypes
scComSAMLightClientCtrlDoubleValueType3DSurfaceValue1 96
X position [mm].
scComSAMLightClientCtrlDoubleValueType3DSurfaceValue2 97
Y position [mm].
scComSAMLightClientCtrlDoubleValueType3DSurfaceValue3 98
Z offset [mm].
scComSAMLightClientCtrlDoubleValueType3DSurfaceValue4 99
XY angle [deg].
scComSAMLightClientCtrlDoubleValueType3DSurfaceValue5 100
Diameter / 2 [mm].
scComSAMLightClientCtrlDoubleValueType3DSurfaceValue6 101

© 2022 SCAPS GmbH


Client Control Interface Manual - Option Optic3D 224

Cylinder Properties Set


Get
Line splitting length [mm].
scComSAMLightClientCtrlDoubleValueType3DSurfaceValue7 102
Tube angle [deg].
scComSAMLightClientCtrlDoubleValueType3DSurfaceValue8 103
Z tilt angle [deg].
Parameter Type: double Unit: depends on constant
The corresponding value.
CCI_Return Type: int
CCI return number, see error list.
Notes · 3D Surfaces type must be set to cylinder.
C# Example: Set cylinder X position to 0.0 mm:

int CCI_Return = cci.ScSetDoubleValue( ( int )


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlDoubleValueType3DSurfaceValue1, 0.0 );
C# Example: Get current cylinder X position:

double Cylinder_X_Position = cci.ScGetDoubleValue( ( int )


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlDoubleValueType3DSurfaceValue1 );
Table 293: Cylinder Properties

Sphere Properties Set


Get
DLL Function int CCI_Return = ScSetDoubleValue(int Value_Type, double Parameter)
double Parameter = ScGetDoubleValue(int Value_Type)
ASCII Function int CCI_Return = ScCciSetDoubleValue(int Value_Type, double Parameter)
double Parameter = ScCciGetDoubleValue(int Value_Type)
Description Set or get various sphere parameter.
Value_Type Type: int ID:
Location: ScComSAMLightClientCtrlValueTypes
scComSAMLightClientCtrlDoubleValueType3DSurfaceValue1 96
X position [mm].
scComSAMLightClientCtrlDoubleValueType3DSurfaceValue2 97
Y position [mm].
scComSAMLightClientCtrlDoubleValueType3DSurfaceValue3 98
Z offset [mm].
scComSAMLightClientCtrlDoubleValueType3DSurfaceValue4 99
Line splitting length [mm].
scComSAMLightClientCtrlDoubleValueType3DSurfaceValue5 100
Sphere angle [deg].
scComSAMLightClientCtrlDoubleValueType3DSurfaceValue6 101
Diameter [mm].
Parameter Type: double Unit: depends on constant
The corresponding value.
CCI_Return Type: int
CCI return number, see error list.

© 2022 SCAPS GmbH


Client Control Interface Manual - Option Optic3D 225

Sphere Properties Set


Get
Notes · 3D Surfaces type must be set to sphere.
C# Example: Set sphere X position to 0.0 mm:

int CCI_Return = cci.ScSetDoubleValue( ( int )


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlDoubleValueType3DSurfaceValue1, 0.0 );
C# Example: Get current sphere X position

double Sphere_X_Position = cci.ScGetDoubleValue( ( int )


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlDoubleValueType3DSurfaceValue1 );
Table 294: Sphere Properties

Tilted Surface Properties Set


Get
DLL Function int CCI_Return = ScSetDoubleValue(int Value_Type, double Parameter)
double Parameter = ScGetDoubleValue(int Value_Type)
ASCII Function int CCI_Return = ScCciSetDoubleValue(int Value_Type, double Parameter)
double Parameter = ScCciGetDoubleValue(int Value_Type)
Description Set or get various Tilted surface parameter.
Value_Type Type: int ID:
Location: ScComSAMLightClientCtrlValueTypes
scComSAMLightClientCtrlDoubleValueType3DSurfaceValue1 96
X position [mm].
scComSAMLightClientCtrlDoubleValueType3DSurfaceValue2 97
Y position [mm].
scComSAMLightClientCtrlDoubleValueType3DSurfaceValue3 98
Z offset [mm].
scComSAMLightClientCtrlDoubleValueType3DSurfaceValue4 99
XY angle [deg].
scComSAMLightClientCtrlDoubleValueType3DSurfaceValue5 100
Z tilt angle [deg].
scComSAMLightClientCtrlDoubleValueType3DSurfaceValue6 101
Width [mm]. Use '-1.0' for an infinite surface.
scComSAMLightClientCtrlDoubleValueType3DSurfaceValue7 102
Heigth [mm]. Use '-1.0' for an infinite surface.
Parameter Type: double Unit: depends on constant
The corresponding value.
CCI_Return Type: int
CCI return number, see error list.
Notes · 3D Surfaces type must be set to tilted surface.
C# Example: Set tilted surface X position to 0.0 mm:

int CCI_Return = cci.ScSetDoubleValue( ( int )


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlDoubleValueType3DSurfaceValue1, 0.0 );
C# Example: Get current tilted surface X position:

double Tilted_Surface_X_Position = cci.ScGetDoubleValue( ( int )


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlDoubleValueType3DSurfaceValue1 );

© 2022 SCAPS GmbH


Client Control Interface Manual - Option Optic3D 226

Table 295: Tilted Surface Properties

STL Projection Properties Set


Get
DLL Function int CCI_Return = ScSetDoubleValue(int Value_Type, double Parameter)
double Parameter = ScGetDoubleValue(int Value_Type)
ASCII Function int CCI_Return = ScCciSetDoubleValue(int Value_Type, double Parameter)
double Parameter = ScCciGetDoubleValue(int Value_Type)
Description Set or get various STL projection parameter.
Value_Type Type: int ID:
Location: ScComSAMLightClientCtrlValueTypes
scComSAMLightClientCtrlDoubleValueType3DSurfaceValue1 96
Center in field: ('0.0' for disabled, '1.0' for enabled).
scComSAMLightClientCtrlDoubleValueType3DSurfaceValue2 97
X offset [mm].
scComSAMLightClientCtrlDoubleValueType3DSurfaceValue3 98
Y offset [mm].
scComSAMLightClientCtrlDoubleValueType3DSurfaceValue4 99
Z offset [mm].
scComSAMLightClientCtrlDoubleValueType3DSurfaceValue5 100
XY rotation [deg].
scComSAMLightClientCtrlDoubleValueType3DSurfaceValue6 101
Line splitting length [mm].
scComSAMLightClientCtrlDoubleValueType3DSurfaceValue7 102
X scale.
scComSAMLightClientCtrlDoubleValueType3DSurfaceValue8 103
Y scale.
scComSAMLightClientCtrlDoubleValueType3DSurfaceValue9 104
Z scale.
scComSAMLightClientCtrlDoubleValueType3DSurfaceValue10 105
XZ rotaion [deg].
scComSAMLightClientCtrlDoubleValueType3DSurfaceValue11 106
YZ rotation [deg].
Parameter Type: double Unit: depends on constant
The corresponding value.
CCI_Return Type: int
CCI return number, see error list.
Notes · 3D Surfaces type must be set to STL projection.
C# Example: Enable center in field:

int CCI_Return = cci.ScSetDoubleValue( ( int )


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlDoubleValueType3DSurfaceValue1, 1.0 );
C# Example: Get current center in field enable state:

double Enable_Center_In_Field = cci.ScGetDoubleValue( ( int )


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlDoubleValueType3DSurfaceValue1 );
Table 296: STL Projection Properties

© 2022 SCAPS GmbH


Client Control Interface Manual - Option Optic3D 227

STL Path Set


Get
DLL Function int CCI_Return = ScSetStringValue(int Value_Type, string STL_File_Path)
int CCI_Return = ScGetStringValue(int Value_Type, ref string STL_File_Path)
ASCII Function int CCI_Return = ScCciSetStringValue(int Value_Type, string STL_File_Path)
string STL_File_Path = ScCciGetStringValue(int Value_Type)
Description Set or get the STL file path.
Value_Type Type: int ID:
Location: ScComSAMLightClientCtrlValueTypes
scComSAMLightClientCtrlStringValueTypeLoadStl 32
STL_File_Path Type: string Unit: none
Path to STL file.
CCI_Return Type: int
CCI return number, see error list.
Notes · 3D Surfaces type must be set to STL projection.
C# Example: Load a STL file:

int CCI_Return = cci.ScSetStringValue( ( int )


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlStringValueTypeLoadStl, @"F:\3d_surface.stl" );
C# Example: Get the STL file path:

string STL_File_Path = "";


int CCI_Return = cci.ScGetStringValue( ( int )
ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlStringValueTypeLoadStl, ref STL_File_Path );
Table 297: STL Path

12 Option SAM3D
The following commands can be used for SAM2D and SAM3D. Please find the detailed description linked in
the following table. Specific SAM3D information can be found in the corresponding notes line of each
command.

· Double User Value


· Entity Name
· Entity Outline
· Entity Type
· Exec Command
· Export File
· Import File
· Inputs and Outputs
· Job Execution Delay
· LastMessageInput
· Load Job
· Mark Entity by Name
· Relevant Times (Mark Times)
· SAMLight ShutDown()
· SAMLight Status
· SAMLight Window
· SaveView2DBitmapDPI
· SaveView2DVariableSize screenshot size
· Scale Entity

© 2022 SCAPS GmbH


Client Control Interface Manual - Option SAM3D 228

· SCAPS Dongle ID
· String User Value
· Translate Entity
· Working Area

12.1 Specific Commands


· Change View3D
· Check 2D/3D
· Entity Outline SAM3D
· Hatch Layer Solid Parameters
· Hatch Layer Solid Global Parameters
· Hatch Var Angle
· Layer
· Layer Count
· Outline 3D
· Pause Marking
· Prepare Layer
· Rotate Entity (3D)
· Screenshot of current 2D layer
· Screenshot of current View3D
· Slice
· Slice from text file

Change View3D Set


Get
DLL Function int CCI_Return = ScExecCommand(int Cmd_ID)

ASCII Function int CCI_Return = ScCciExecCommand(int Cmd_ID)

Description Set View3D to Standard 3D View.


Cmd_ID Type: int ID:
Location: ScComSAMLightClientCtrlExecCommandConstants
scComSAMLightClientCtrlExecCommandView3DViewIso 26
CCI_Return Type: int
CCI return number, see error list.
Notes · The current View3D can also be changed via FitViewToAllEntities and
FitViewToSelectedEntities.
C# Example: Set View3D to standard 3DView:

int CCI_Return = cci.ScExecCommand((int)


ScComSAMLightClientCtrlExecCommandConstants.scComSAMLightClientCtrlExecCommandView3DViewIso);
Table 298: Change View3D

© 2022 SCAPS GmbH


Client Control Interface Manual - Option SAM3D 229

Check 2D/3D Set


Get
DLL Function int SAM3D_Mode = ScGetLongValue(int Value_Type)

ASCII Function int SAM3D_Mode = ScCciGetLongValue(int Value_Type)

Description Check if SAMLight is running in SAM3D mode.


Value_Type Type: int ID:
Location: ScComSAMLightClientCtrlValueTypes
scComSAMLightClientCtrlLongValueType3D 71
SAM3D_Mode Type: int Unit: none
· 0: SAMLight runs in 2D Mode.
· 1: SAMLight runs in SAM3D mode.
Notes -
C# Example: Check if SAMLight is running in SAM3D mode:

int SAM3D_Mode = cci.ScGetLongValue( ( int )


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlLongValueType3D );
Table 299: Check 2D/3D

Entity Outline SAM3D Set


Get
DLL Function double Value = ScGetEntityOutline(string Entity_Name, int Index)

ASCII Function double Value = ScCciGetEntityOutline(string Entity_Name, int Index)

Description Returns the outline of the current slice of the ScLayerSolid specified by Entity_Name.
The following constants can be set for Index to specify which outline value has to be
returned.
Entity_Name Type: string Unit: none
If Entity_Name is an empty string, the function returns the job outline.
Index Type: int ID:
Location: ScComSAMLightClientCtrlExecCommandConstants
scComSAMLightClientCtrlOutlineSliceIndexMinX 6
The smallest x coordinate.
scComSAMLightClientCtrlOutlineSliceIndexMinY 7
The smallest y coordinate.
scComSAMLightClientCtrlOutlineSliceIndexMinZ 8
The smallest z coordinate.
scComSAMLightClientCtrlOutlineSliceIndexMaxX 9
The biggest x coordinate.
scComSAMLightClientCtrlOutlineSliceIndexMaxY 10
The biggest y coordinate.
scComSAMLightClientCtrlOutlineSliceIndexMaxZ 11
The biggest z coordinate.
Value Type: double Unit: [mm]*
The corresponding value.
Notes · The default unit is mm, but the user can select a different unit.
C# Example: Get the biggest x coordinate of the whole job:

double Max_X = cci.ScGetEntityOutline( "", 9 );

© 2022 SCAPS GmbH


Client Control Interface Manual - Option SAM3D 230

Table 300: Entity Outline SAM3D

Hatch Layer Solid Parameters Set


Get
DLL Function int CCI_Return = ScSetEntityDoubleData(string Entity_Name, int Data_ID, double Parameter)
int CCI_Return = ScGetEntityDoubleData(string Entity_Name, int Data_ID, ref double Parameter)
ASCII Function int CCI_Return = ScCciSetEntityDoubleData(string Entity_Name, int Data_ID, double Parameter)
double Parameter = ScCciGetEntityDoubleData(string Entity_Name, int Data_ID)
Description Set or get various values for the hatch solid layer.
Entity_Name Type: string Unit: none
Specify the entity based on the name.
Data_ID Type: int
Location: ScComSAMLightClientCtrlFlags
scComSAMLightClientCtrlDoubleDataIdHatchLayerSolidUpDownSkinBeamComp 101
Set the beam compensation value [mm].
scComSAMLightClientCtrlDoubleDataIdHatchLayerSolidMinUpSkinArea 102
Set the minimum upskin area [mm²].
scComSAMLightClientCtrlDoubleDataIdHatchLayerSolidMinDownSkinArea 103
Set the minimum downskin area [mm²].
scComSAMLightClientCtrlDoubleDataIdHatchLayerSolidReduceUp 104
Set the reduce up [mm].
scComSAMLightClientCtrlDoubleDataIdHatchLayerSolidReduceDown 105
Set the reduce down [mm].
Parameter Type: double Unit: depends on constant
Set the required value.
CCI_Return Type: int
CCI return number, see error list.
Notes · Styles have to be enabled first.
C# Example: Set the beam compensation value to 55.55:

int CCI_Return = cci.ScSetEntityDoubleData( "Any_Entity", ( int )


ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlDoubleDataIdHatchLayerSolidUpDownSkinBeamComp,
55.55 );
C# Example: Get the beam compensation value:

double comp = 0;
int CCI_Return = cci.ScGetEntityDoubleData("", (int)
ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlDoubleDataIdHatchLayerSolidUpDownSkinBeamComp, ref
comp);
Table 301: Hatch Layer Solid Parameters

© 2022 SCAPS GmbH


Client Control Interface Manual - Option SAM3D 231

Hatch Layer Solid Global Parameters Set


Get
DLL Function int CCI_Return = ScSetEntityLongData(string Entity_Name, int Data_ID, int Parameter)
int Parameter = ScGetEntityLongData(string Entity_Name, int Data_ID)
ASCII Function int CCI_Return = ScCciSetEntityLongData(string Entity_Name, int Data_ID, int Parameter)
int Parameter = ScCciGetEntityLongData(string Entity_Name, int Data_ID)
Description
Entity_Name Type: string Unit: none
Specify the entity based on the name.
Data_ID Type: int
Location: ScComSAMLightClientCtrlFlags
scComSAMLightClientCtrlLongDataIdHatchLayerSolidNumLoops 136
Set the num loops value.
scComSAMLightClientCtrlLongDataIdHatchLayerSolidPointOffset 137
Set the point offset value.
scComSAMLightClientCtrlLongDataIdHatchLayerSolidBeamCompOutToIn 139
Set the marking order for beam compensated lines.
Parameter Type: int Unit: none
Set the required value.
CCI_Return Type: int
CCI return number, see error list.
Notes -
C# Example: Set the num loops value to 55:

int CCI_Return = cci.ScSetEntityLongData("", (int)


ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlLongDataIdHatchLayerSolidNumLoops, 55);
C# Example: Get the num loops value:

int Num_Loops = cci.ScGetEntityLongData( "Any_Entity", ( int )


ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlLongDataIdHatchLayerSolidNumLoops );
Table 302: Hatch Layer Solid Global Parameters

© 2022 SCAPS GmbH


Client Control Interface Manual - Option SAM3D 232

Hatch Var Angle Set


Get
DLL Function int CCI_Return = ScSetEntityDoubleData(string Entity_Name, int Data_ID, double
Hatch_Var_Angle)
int CCI_Return = ScGetEntityDoubleData(string Entity_Name, int Data_ID, ref double
Hatch_Var_Angle)
ASCII Function int CCI_Return = ScCciSetEntityDoubleData(string Entity_Name, int Data_ID, double
Hatch_Var_Angle)
double Hatch_Var_Angle = ScCciGetEntityDoubleData(string Entity_Name, int Data_ID)
Description Set or get variable hatch angles of an entity of the selected hatch pair.
Entity_Name Type: string Unit: none
Specify the required entity based on the name.
Data_ID Type: int ID:
Location: ScComSAMLightClientCtrlFlags
scComSAMLightClientCtrlDoubleDataIdHatchVarAngle1 95
Variable hatch angle 1
scComSAMLightClientCtrlDoubleDataIdHatchVarAngle2 96
Variable hatch angle 2
Hatch_Var_Angle Type: int Unit: [deg]
Value of the variable hatch angle
CCI_Return Type: int
CCI return number, see error list.
Notes · HatchPair has to be set first.
C# Example: Set variable hatch angle 1 to 20.0:

int CCI_Return = cci.ScSetEntityDoubleData( "Sphere", ( int )


ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlDoubleDataIdHatchVarAngle1, 20.0 );
C# Example: Get current variable hatch angle 1:

double HatchVarAngle1 = 0.0;


int CCI_Return = cci.ScGetEntityDoubleData( "Sphere", ( int )
ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlDoubleDataIdHatchVarAngle1, ref HatchVarAngle1 );
Table 303: Hatch Var Angle

© 2022 SCAPS GmbH


Client Control Interface Manual - Option SAM3D 233

Layer Set
Get
DLL Function int CCI_Return = ScSetLongValue(int Value_Type, int Parameter)
int Parameter = ScGetLongValue(int Value_Type)
ASCII Function int CCI_Return = ScCciSetLongValue(int Value_Type, int Parameter)
int Parameter = ScCciGetLongValue(int Value_Type)
Description Set or get different layer numbers.
Value_Type Type: int ID:
Location: ScComSAMLightClientCtrlValueTypes
scComSAMLightClientCtrlLongValueTypeGetTotalSlices 44
Total number of layers in job. There is no set function.
scComSAMLightClientCtrlLongValueTypeSliceFrom 45
First layer to be marked
scComSAMLightClientCtrlLongValueTypeSliceTo 46
Last layer to be marked
scComSAMLightClientCtrlLongValueTypeCurrentSliceNum 47
Current layer
Parameter Type: int Unit: none
The corresponding value.
CCI_Return Type: int
CCI return number, see error list.
Notes -
C# Example: Set current layer to 3:

int CCI_Return = cci.ScSetLongValue( ( int )


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlLongValueTypeCurrentSliceNum, 3 );
C# Example: Get current layer:

int Current_Layer = cci.ScGetLongValue( ( int )


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlLongValueTypeCurrentSliceNum );
Table 304: Layer

© 2022 SCAPS GmbH


Client Control Interface Manual - Option SAM3D 234

Layer Count Set


Get
DLL Function int Layer_Count = ScGetEntityLongData(string Entity_Name, int Data_ID)

ASCII Function int Layer_Count = ScCciGetEntityLongData(string Entity_Name, int Data_ID)

Description Get the total number of layers from the LayerSolid.


Entity_Name Type: string Unit: none
Specify the entity based on the name.
Data_ID Type: int
Location: ScComSAMLightClientCtrlFlags
scComSAMLightClientCtrlLongDataIdEntityLayerCount 111
Layer_Count Type: int Unit: none
Layer counter.
CCI_Return Type: int
CCI return number, see error list.
Notes -
C# Example: Get layer counter:

int Layer_Count = cci.ScGetEntityLongData("", (int)


ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlLongDataIdEntityLayerCount);
Table 305: Layer Count

Outline 3D Set
Get
DLL Function int CCI_Return = ScSetEntityOutline3D(string Entity_Name, double Min_X, double Min_Y, double
Max_X, double Max_Y, double Min_Z, double Max_Z, int Flag)
int CCI_Return = ScGetEntityOutline3D(string Entity_Name, ref double Min_X, ref double Min_Y,
ref double Max_X, ref double Max_Y, ref double Max_Z, ref double Max_Z, int Flag)
ASCII Function int CCI_Return = ScCciSetEntityOutline3D(string Entity_Name, double Min_X, double Min_Y,
double Max_X, double Max_Y, double Min_Z, double Max_Z, int Flag)
double Min_X double Min_Y double Max_X double Max_Y double Min_Z double Max_Z =
ScCciGetEntityOutline3D(string Entity_Name)
Description Set or get the 3D outlines of all entities named Entity_Name.
Entity_Name Type: string Unit: none
If Entity_Name is an empty string, the function returns the outline of the whole job.
Min_X Type: double Unit: [mm]*
The smallest x coordinate.
Min_Y Type: double Unit: [mm]*
The smallest y coordinate.
Max_X Type: double Unit: [mm]*
The biggest x coordinate.
Max_Y Type: double Unit: [mm]*
The biggest y coordinate.
Min_Z Type: double Unit: [mm]*
The smallest z coordinate.
Max_Z Type: double Unit: [mm]*
The biggest z coordinate.
Flag Type: int Flag:
Location: ScComSAMLightClientCtrlFlags

© 2022 SCAPS GmbH


Client Control Interface Manual - Option SAM3D 235

Outline 3D Set
Get
scComSAMLightClientCtrlSetOutlineNoMove 0x1
Left down point will stay at current position and the rest is scaled.
scComSAMLightClientCtrlSetOutlineNoSize 0x2
All values should be the same value to define the new center
CCI_Return Type: int
CCI return number, see error list.
Note · The default unit is mm, but the user can select a different unit.
· ScSetEntityOutline3D does not work for ScLayerSolid entities.
· When 0 is used as Flag, the object will be scaled and positioned like defined.
· For this command the flags cannot be combined.
C# Example: Set new 3D outline for the ScTriaMesh3D entity "Sphere":

int CCI_Return = cci.ScSetEntityOutline3D( "Sphere", 0.0, 0.0, 10.0, 10.0, 0.0, 10.0, 0 );
C# Example: Get current 3D outline of entity "Sphere":

double Min_X, Min_Y, Max_X, Max_Y, Min_Z, Max_Z;


Min_X = Min_Y = Max_X = Max_Y = Min_Z = Max_Z = 0.0;
int CCI_Return = cci.ScGetEntityOutline3D( "Sphere", ref Min_X, ref Min_Y, ref Max_X, ref Max_Y, ref
Min_Z, ref Max_Z );
Table 306: Outline 3D

© 2022 SCAPS GmbH


Client Control Interface Manual - Option SAM3D 236

Pause Marking Set


Get
DLL Function int CCI_Return = ScSetLongValue(int Value_Type, int Pause)
int Pause = ScGetLongValue(int Value_Type)
ASCII Function int CCI_Return = ScCciSetLongValue(int Value_Type, int Pause)
int Pause = ScCciGetLongValue(int Value_Type)
Description Set function: Continue/Pause current job execution.
Get function: Get current pause state.
Value_Type Type: int ID:
Location: ScComSAMLightClientCtrlValueTypes
scComSAMLightClientCtrlLongValueTypePauseBuild 98
Pause Type: int Unit: none
· Set function:
o 0: Continue marking.
o 1: Pause marking.
· Get function:
o 0: Marking is not paused.
o 1: Marking will be paused. Current layer will be finished before.
o 2: Marking is paused.
CCI_Return Type: int
CCI return number, see error list.
Notes -
C# Example: Pause current job execution:

int CCI_Return = cci.ScSetLongValue( ( int )


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlLongValueTypePauseBuild, 1 );
C# Example: Get current pause state:

int Pause = cci.ScGetLongValue( ( int )


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlLongValueTypePauseBuild );
Table 307: Pause Marking

Prepare Layer Set


Get
DLL Function int CCI_Return = ScSetLongValue(int Value_Type, int Layer)

ASCII Function int CCI_Return = ScCciSetLongValue(int Value_Type, int Layer)

Description Prepare the selected layer for marking.


Value_Type Type: int ID:
Location: ScComSAMLightClientCtrlValueTypes
scComSAMLightClientCtrlLongValueTypePrepareLayer 67
Layer Type: int Unit: none
Set the layer number.
CCI_Return Type: int
CCI return number, see error list.
Notes -
C# Example: Prepare layer 4:

int CCI_Return = cci.ScSetLongValue((int)


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlLongValueTypePrepareLayer, 4);

© 2022 SCAPS GmbH


Client Control Interface Manual - Option SAM3D 237

Table 308: Prepare layer

Rotate Entity 3D Set


Get
DLL Function int CCI_Return = ScRotateEntity3D(string Entity_Name, double P_X, double P_Y, double P_Z,
double V_X, double V_Y, double V_Z, double Angle)
ASCII Function int CCI_Return = ScCciRotateEntity3D(string Entity_Name, double P_X, double P_Y, double P_Z,
double V_X, double V_Y, double V_Z, double Angle)
Description Rotates Entity_Name around the axis of rotation by the given Angle.
The axis of rotation is defined by two points:
· Point P (P_X, P_Y, P_Z)
· Point Q (P_X+V_X, P_Y+V_Y, P_Z+V_Z).
Entity_Name Type: string Unit: none
Specify the entity which should be rotated.
P_X Type: double Unit: [mm]*
X position of the start point of the rotation axis.
P_Y Type: double Unit: [mm]*
Y position of the start point of the rotation axis.
P_Z Type: double Unit: [mm]*
Z position of the start point of the rotation axis.
V_X Type: double Unit: [mm]*
X position of the end point of the rotation axis.
V_Y Type: double Unit: [mm]*
Y position of the end point of the rotation axis.
V_Z Type: double Unit: [mm]*
Z position of the end point of the rotation axis.
Angle Type: double Unit: [deg]
Rotation angle, counterclockwise around the rotation vector for positive angles.
CCI_Return Type: int
CCI return number, see error list.
Notes · The default unit is mm, but the user can select a different unit.
C# Example: Rotate entity Star in the XY plane around the center (X = 4, Y = 5) by 30 degrees:

int CCI_Return = cci.ScRotateEntity3D( "Star", 4.0, 5.0, 0.0, 0.0, 0.0, 1.0, 30.0 );
Table 309: Rotate Entity 3D

© 2022 SCAPS GmbH


Client Control Interface Manual - Option SAM3D 238

Screenshot of current 2D layer 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 Take a screenshot of current 2D layer.


Value_Type Type: int ID:
Location: ScComSAMLightClientCtrlValueTypes
scComSAMLightClientCtrlStringValueTypeSaveLayerAdjustableDPI 24
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 return number, see error list.
Notes · The pixel density of the screenshot must be defined with SaveView2DBitmapDPI.
· The screenshot contains a defined section of the View3D, 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 current 2D layer in SAM3D:

int CCI_Return = cci.ScSetStringValue( ( int )


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlStringValueTypeSaveLayerAdjustableDPI, @"F:
\screenshot.bmp" );
Table 310: Screenshot of current 2D layer

© 2022 SCAPS GmbH


Client Control Interface Manual - Option SAM3D 239

Screenshot of current View3D 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 Take a screenshot of the current View3D.


Value_Type Type: int ID:
Location: ScComSAMLightClientCtrlValueTypes
scComSAMLightClientCtrlStringValueTypeSaveView3DVariableSize 25
The width of the screenshot is defined by SaveView2DBitmapVariableSize.
The larger axis (usually x) is set to a fixed value, the aspect ratio is kept.
scComSAMLightClientCtrlStringValueTypeSaveView3DFull 26
Size of the screenshot is 1:1 from the current View3D.
Screenshot_Path Type: string Unit: none
Define the required file name.
CCI_Return Type: int
CCI return number, see error list.
Notes · The screenshot contains the section of the current View3D.
· The screenshot is colored.
· This CCI command only works if SAMLight is visible and not hidden by something
else.
· The current View3D can be changed via FitViewToAllEntities,
FitViewToSelectedEntities and View3DViewIso.
C# Example: Make a 1:1 screenshot of current View3D:

int CCI_Return = cci.ScSetStringValue( ( int )


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlStringValueTypeSaveView3DFull, @"F:
\screenshot_A.bmp" );
Table 311: Screenshot of current View3D

Slice Set
Get
DLL Function int CCI_Return = ScSlice(string Entity_Name, string Layer_Solid_Name, double Layer_Spacing,
int Only_Selected, int Slice_Reverse )
ASCII Function -

Description Slices a ScTriaMesh3D entity into a ScLayerSolid entity.


Entity_Name Type: string Unit: none
Entity name of the ScTriaMesh3D that is being sliced. Use "" for all ScTriaMesh3D
entities in job.
Layer_Solid_Name Type: string Unit: none
Entity name of the generated ScLayerSolid entity.
Layer_Spacing Type: double Unit: [mm]*
Layer spacing (aka Constant or Slice Thickness)
Only_Selected Type: int Unit: none
· 0: All ScTriaMesh3D entities named Entity_Name are being sliced.
· 1: All ScTriaMesh3D selected entities which are named Entity_Name are being
sliced.
Slice_Reverse Type: int Unit: none
· 0: The order of the sliced layers is from bottom to top (additive manufacturing).

© 2022 SCAPS GmbH


Client Control Interface Manual - Option SAM3D 240

Slice Set
Get
· 1: The order of the sliced layers is from top to bottom (subtractive manufacturing).
CCI_Return Type: int
CCI return number, see error list.
Notes · The default unit is mm, but the user can select a different unit.
C# Example: Slices a ScTriaMesh3D entity into a ScLayerSolid entity:

int CCI_Return = cci.ScSlice( "Sphere", "Layers", 0.05, 0, 0 );


Table 312: Slice

Slice from text file Set


Get
DLL Function int CCI_Return = ScSliceFromTxt(string File_Path, string Entity_Name, string Layer_Solid_Name,
int Only_Selected)
ASCII Function -

Description Slices a ScTriaMesh3D entity into a ScLayerSolid entity according to a text file
containing the slice information.
File_Path Type: string Unit: none
Path to the text file containing the slice information. The path must include the file
extension ".txt". The specification of the slice parameter in the text file can be found
here.
Entity_Name Type: string Unit: none
Entity name of the ScTriaMesh3D that is being sliced. Use "" for all ScTriaMesh3D
entities in job.
Layer_Solid_Name Type: string Unit: none
Entity name of the generated ScLayerSolid entity.
Only_Selected Type: int Unit: none
· 0: All ScTriaMesh3D entities named Entity_Name are being sliced.
· 1: All ScTriaMesh3D selected entities which are named Entity_Name are being
sliced.
CCI_Return Type: int
CCI return number, see error list.
Notes -
C# Example: Slice from text file:

int CCI_Return = cci.ScSliceFromTxt( @"F:\slice_info.txt", "Spehre", "Layers", 0 );


Table 313: Slice from text file

© 2022 SCAPS GmbH


Client Control Interface Manual - Other 241

13 Other
This chapter contains several diverse commands, which could not assigned to one of the previous
chapters.

· Background camera image


· Hardware Status
· RS-232
· RTC only commands
· Screenshot
· Scan Head
· sc_corr_table
· View2D

13.1 Background Camera Image


· Enable Background Image

Background Image Enable Set


Get
DLL Function, int CCI_Return = ScSetLongValue(int Value_Type, int BG_Img_Enable)
int BG_Img_Enable = ScGetLongValue(int Value_Type)
ASCII Function int CCI_Return = ScCciSetLongValue(int Value_Type, int BG_Img_Enable)
int BG_Img_Enable = ScCciGetLongValue(int Value_Type)
Description Set or get the background image enable state (checkbox in the background camera
toolbar).
Value_Type Type: int ID:
Location: ScComSAMLightClientCtrlValueTypes
scComSAMLightClientCtrlLongValueTypeEnableBackgroundImage 122
BG_Img_Enable Type: int Unit: none
· 0: Disable background image.
· 1: Enable background image.
CCI_Return Type: int
CCI error number, see error list.
Notes · Direct3D must be enabled.
C# Example: Disable background image:

int CCI_Return = cci.ScSetLongValue( ( int )


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlLongValueTypeEnableBackgroundImage, 0 );
C# Example: Get current background image enable state:

int BG_Img_Enable = cci.ScGetLongValue( ( int )


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlLongValueTypeEnableBackgroundImage );
Table 314: Background Image Enable

© 2022 SCAPS GmbH


Client Control Interface Manual - Other 242

Camera Frames per Second Set


Get
DLL Function int CCI_Return = ScSetDoubleValue(int Value_Type, double Frames)
double Frames = ScGetDoubleValue(int Value_Type)
ASCII Function int CCI_Return = ScCciSetDoubleValue(int Value_Type, double Frames)
double Frames = ScCciGetDoubleValue(int Value_Type)
Description Set or get the maximal frames per second for the background camera.
Value_Type Type: int
Location: ScComSAMLightClientCtrlValueTypes
scComSAMLightClientCtrlDoubleValueType 153
BackgroundImageWebcamMaxFramesPerSecond
Frames Type: double Unit: [1/s]
Frames per second value.
CCI_Return Type: int
CCI return number, see error list.
Notes -
C# Example: Set maximal frames per second to 15:

int CCI_Return = cci.ScSetDoubleValue( ( int )


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlDoubleValueTypeBackgroundImageWebcamMaxFramesPerS
econd, 15 );
C# Example: Get maximal frames per second:

int Frames = cci.ScSetDoubleValue( ( int )


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlDoubleValueTypeBackgroundImageWebcamMaxFramesPerS
econd);
Table 315: Camera Frames per Second

13.2 External Stop


· Enable external stop

Enable external stop Set


Get
DLL Function, int CCI_Return = ScSetLongValue(int Value_Type, int Ext_Stop)
int Ext_Stop = ScGetLongValue(int Value_Type)
ASCII Function int CCI_Return = ScCciSetLongValue(int Value_Type, int Ext_Stop)
int Ext_Stop = ScCciGetLongValue(int Value_Type)
Description Set or get the state of the external stop.
Value_Type Type: int ID:
Location: ScComSAMLightClientCtrlValueTypes
scComSAMLightClientCtrlLongValueTypeEnableExternStop 136
Ext_Stop Type: int Unit: none
· 0: Disable external stop.
· 1: Enable external stop.
CCI_Return Type: int
CCI error number, see error list.
Notes · Do not set during marking operation.
C# Example: Disable external stop:

© 2022 SCAPS GmbH


Client Control Interface Manual - Other 243

Enable external stop Set


Get

int CCI_Return = cci.ScSetLongValue((int)


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlLongValueTypeEnableExternStop, 0);
C# Example: Get current external stop enable state:

int State = cci.ScGetLongValue((int)


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlLongValueTypeEnableExternStop;
Table 316: Enable external stop

13.3 Hardware Status


· Hardware State
· Last Message Input
· SCAPS Dongle ID
· USC Firmware Status
· USC Server Status

Hardware State Set


Get
DLL Function int State = ScGetLongValue(int Value_Type)

ASCII Function int State = ScCciGetLongValue(int Value_Type)

Description Get the hardware state of the current selected head.


Value_Type Type: int
Location: ScComSAMLightClientCtrlValueTypes
scComSAMLightClientCtrlLongValueTypeHardwareState 41
State Type: int Unit: none
· 0: Error.
· 2: OK.
CCI_Return Type: int
CCI return number, see error list.
Notes -
C# Example: Get hardware state

int State = cci.ScGetLongValue((int)


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlLongValueTypeHardwareState);
Table 317: Hardware State

Last Message Input Set


Get
DLL Function int CCI_Return = ScGetStringValue(int Value_Type, ref string Last_Message_Input)

ASCII Function string Last_Message_Input = ScCciGetStringValue(int Value_Type)

Description Get last message input that is still active.


Value_Type Type: int ID:
Location: ScComSAMLightClientCtrlValueTypes
scComSAMLightClientCtrlStringValueTypeGetLastErrorMessageInput 14
Error message input.

© 2022 SCAPS GmbH


Client Control Interface Manual - Other 244

Last Message Input Set


Get
scComSAMLightClientCtrlStringValueTypeGetLastInfoMessageInput 15
Info message input.
Last_Message_Inpu Type: string Unit: none
t The corresponding last message input.
CCI_Return Type: int
CCI return number, see error list.
Notes -
C# Example: Get last message input:

string Last_Message_Input = "";


int CCI_Return = cci.ScGetStringValue( ( int )
ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlStringValueTypeGetLastErrorMessageInput, ref
Last_Message_Input );
Table 318: Last Message Input

SCAPS Dongle ID Set


Get
DLL Function int Dongle_ID = ScGetLongValue(int Value_Type)

ASCII Function int Dongle_ID = ScCciGetLongValue(int Value_Type)

Description Get customer or dongle ID.


Value_Type Type: int ID:
Location: ScComSAMLightClientCtrlValueTypes
scComSAMLightClientCtrlLongValueTypeDongleUserNumber 39
Customer ID (aka user number or user ID)
scComSAMLightClientCtrlLongValueTypeDongleSystemNumber 40
Dongle ID (aka system number, system ID or card ID)
Dongle_ID Type: int Unit: none
Get the required dongle ID
CCI_Return Type: int
CCI return number, see error list.
Notes · If a combination of USB-Dongle and Card is used, the USB-Dongle is shown.
C# Example: Get current SCAPS dongle ID:

int Dongle_ID = cci.ScGetLongValue( ( int )


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlLongValueTypeDongleSystemNumber );
Table 319: SCAPS Dongle ID

USC Firmware Status Set


Get
DLL Function int Firmware_Status = ScGetLongValue(int Value_Type)

ASCII Function int Firmware_Status = ScCciGetLongValue(int Value_Type)

Description Get the status of the USC firmware.


Value_Type Type: int ID:
Location: ScComSAMLightClientCtrlValueTypes
scComSAMLightClientCtrlLongValueTypeFirmwareStatus 123
Firmware_Status Type: int Unit: none

© 2022 SCAPS GmbH


Client Control Interface Manual - Other 245

USC Firmware Status Set


Get
· -1: Firmware on the USC card is newer than the software version.
· 0: Firmware on the USC card is up to date.
· 1: A newer firmware is available.
CCI Return Type: int
CCI return number, see error list.
Notes · This command is only for USC-2 and USC-3 cards.
C# Example: Get current USC firmware status:

int Firmware_Status = cci.ScGetLongValue( ( int )


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlLongValueTypeFirmwareStatus );
Table 320: USC Firmware Status

USC Server Status Set


Get
DLL Function int Server_Status = ScGetLongValue(int Value_Type)

ASCII Function int Server_Status = ScCciGetLongValue(int Value_Type)

Description Get the status of the usc server.


Value_Type Type: int ID:
Location: ScComSAMLightClientCtrlValueTypes
scComSAMLightClientCtrlLongValueTypeServerStatus 67
Server_Status Type: int Flag:
Location: None
Device Connected 0x1
Device OK 0x2
Device Missing 0x8
Device USC-1 0x10000
Device USC-2 0x20000
Device USC-3 0x80000
CCI_Return Type: int
CCI return number, see error list.
Notes · The flags can be combined by using logical operators. Please refer to the chapter
How to work with Flags for more information.
· There are further undocumented flags for internal use only.
C# Example: Get current USC server status:

int Server_Status = cci.ScGetLongValue( ( int )


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlLongValueTypeServerStatus );
Table 321: USC Server Status

13.4 RS-232

· USC RS-232 command


· USC RS-232 baud rate
· USC RS-232 mode

© 2022 SCAPS GmbH


Client Control Interface Manual - Other 246

USC RS-232 command Set


Get
DLL Function int CCI_Return = ScSetStringValue(int Value_Type, string RS232_String)
int CCI_Return = ScGetStringValue(int Value_Type, ref string RS232_String)
ASCII Function int CCI_Return = ScCciSetStringValue(int Value_Type, string RS232_String)
string RS232_String = ScCciGetStringValue(int Value_Type)
Description Send/Receive an output/input string via the USC RS-232 port.
Value_Type Type: int ID:
Location: ScComSAMLightClientCtrlValueTypes
scComSAMLightClientCtrlStringValueTypeRs232OutputString 2
RS232_String Type: string Unit: none
RS-232 output string
CCI_Return Type: int
CCI error number, see error list.
Notes · Only valid for USC cards.
· Rs232BaudRate has to be set first.
· Rs232Mode has to be set first
· Get command returns character, which were sent to the RS-232 input of USC
card. It also clears the input buffer.
C# Example: Send RS-232 string "hi":

int CCI_Return = cci.ScSetStringValue( ( int )


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlStringValueTypeRs232OutputString, "hi" );
C# Example: Receive RS-232 string:

string RS232_String = "";


int CCI_Return = cci.ScGetStringValue( ( int )
ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlStringValueTypeRs232OutputString, ref
RS232_String );
Table 322: USC RS-232 command

USC RS-232 baud rate Set


Get
DLL Function int CCI_Return = ScSetStringValue(int Value_Type, string RS232_Baud_Rate)
int CCI_Return = ScGetStringValue(int Value_Type, ref string RS232_Baud_Rate)
ASCII Function int CCI_Return = ScCciSetStringValue(int Value_Type, string RS232_Baud_Rate)
string RS232_Baud_Rate = ScCciGetStringValue(int Value_Type)
Description Set or get the baud rate for Rs232OutputString.
Value_Type Type: int ID:
Location: ScComSAMLightClientCtrlValueTypes
scComSAMLightClientCtrlStringValueTypeRs232BaudRate 1
RS232_Baud_Rate Type: string Unit: [Hz]
The RS-232 interface supports the following Baud rates:
· "2400"
· "4800"
· "9600"
· "19200"
· "28800"
· "38400"
· "57600"
· "115200" (USC-2/-3 only)

© 2022 SCAPS GmbH


Client Control Interface Manual - Other 247

USC RS-232 baud rate Set


Get
CCI_Return Type: int
CCI error number, see error list.
Notes -
C# Example: Set RS-232 baud rate to 9600:

int CCI_Return = cci.ScSetStringValue( ( int )


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlStringValueTypeRs232BaudRate, "9600" );
C# Example: Get RS-232 baud rate:

string RS232_Baud_Rate = "";


int CCI_Return = cci.ScGetStringValue( ( int )
ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlStringValueTypeRs232BaudRate, ref RS232_Baud_Rate
);
Table 323: USC RS-232 baud rate

USC RS-232 mode Set


Get
DLL Function int CCI_Return = ScSetStringValue(int Value_Type, string RS232_Mode)
int CCI_Return = ScGetStringValue(int Value_Type, ref string RS232_Mode)
ASCII Function int CCI_Return = ScCciSetStringValue(int Value_Type, string RS232_Mode)
string RS232_Mode = ScCciGetStringValue(int Value_Type)
Description Set or get the RS-232 mode for Rs232OutputString.
Value_Type Type: int ID:
Location: ScComSAMLightClientCtrlValueTypes
scComSAMLightClientCtrlStringValueTypeRs232Mode 3
RS232_Mode Type: string Unit: none
· "0": Parity not used
· "1": Parity odd
· "2": Parity even
· "3": Parity 1
· "4": Parity 0
CCI_Return Type: int
CCI error number, see error list.
Notes In all modes:
· DataLength is set to 8.
· StopBits is set to 1.
· Flow control is not used.
C# Example: Set RS-232 mode to parity not used:

int CCI_Return = cci.ScSetStringValue( ( int )


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlStringValueTypeRs232Mode, "0" );
C# Example: Get RS-232 mode:

string RS232_Mode = "";


int CCI_Return = cci.ScGetStringValue( ( int )
ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlStringValueTypeRs232Mode, ref RS232_Mode );
Table 324: USC RS-232 mode

© 2022 SCAPS GmbH


Client Control Interface Manual - Other 248

13.5 RTC only commands

· After Defocus Delay


· Automatic Self-Calibration
· Automatic Self-Calibration Result
· RTC3/4 AnalogOut
· RTC4 Scan Head Temperature
· RTC5 Scan Head Temperature

After Defocus Delay Set


Get
DLL Function int CCI_Return = ScSetLongValue(int Value_Type, int Defocus_Delay)
int Defocus_Delay = ScGetLongValue(int Value_Type)
ASCII Function int CCI_Return = ScCciSetLongValue(int Value_Type, int Defocus_Delay)
int Defocus_Delay = ScCciGetLongValue(int Value_Type)
Description Set or get the after defocus delay.
Value_Type Type: int ID:
Location: ScComSAMLightClientCtrlValueTypes
scComSAMLightClientCtrlLongValueTypeAfterDefocusDelay 106
Defocus_Delay Type: int Unit: [µs]
Delay used after changing defocus.
CCI_Return Type: int
CCI return number, see error list.
Notes · RTC-5/-6 only
C# Example: Set defocus delay to 1000 µs:

int CCI_Return = cci.ScSetLongValue( ( int )


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlLongValueTypeAfterDefocusDelay, 1000 );
C# Example: Get current after defocus delay:

int Defocus_Delay = cci.ScGetLongValue( ( int )


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlLongValueTypeAfterDefocusDelay );
Table 325: After Defocus Delay

© 2022 SCAPS GmbH


Client Control Interface Manual - Other 249

Automatic Self-Calibration Set


Get
DLL Function int CCI_Return = ScExecCommand(int Cmd_ID)

ASCII Function int CCI_Return = ScCciExecCommand(int Cmd_ID)

Description Scan head auto-calibration functionality for hardware supporting SCANLAB


automatic self-calibration.
Cmd_ID Type: int ID:
Location: ScComSAMLightClientCtrlExecCommandConstants
scComSAMLightClientCtrlExecCommandAutoCompensateOff 10
Turn auto calibration mode off.
scComSAMLightClientCtrlExecCommandAutoCompensateRef 11
Turn auto calibration mode on and go to reference position for initial calibration.
scComSAMLightClientCtrlExecCommandAutoCompensateCal 12
Recalibrate the scan head.
CCI_Return Type: int
CCI return number, see error list.
Notes · Works only with hardware supporting SCANLAB automatic self-calibration.
C# Example: Turn auto calibration mode off:

int CCI_Return = cci.ScExecCommand( ( int )


ScComSAMLightClientCtrlExecCommandConstants.scComSAMLightClientCtrlExecCommandAutoCompensateOff );
Table 326: Automatic Self-Calibration

Automatic Self-Calibration Result Set


Get
DLL Function int Error_Code = ScGetLongValue(int Value_Type)

ASCII Function int Error_Code = ScCciGetLongValue(int Value_Type)

Description Returns the error code of the last automatic self-calibration.


Value_Type Type: int ID:
Location: ScComSAMLightClientCtrlValueTypes
scComSAMLightClientCtrlLongValueTypeLastAutoCompensateResult 38
Error_Code Type: int Unit: none
Last result of automatic self-calibration.
CCI_Return Type: int
CCI return number, see error list.
Notes · Works only with hardware supporting SCANLAB automatic self-calibration.
C# Example: Get error code of last automatic self-calibration:

int Defocus_Delay = cci.ScGetLongValue( ( int )


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlLongValueTypeLastAutoCompensateResult );
Table 327: Automatic Self-Calibration Result

© 2022 SCAPS GmbH


Client Control Interface Manual - Other 250

RTC3/4 AnalogOut Set


Get
DLL Function int CCI_Return = ScSetLongValue(int Value_Type, int Analog_Out)

ASCII Function int CCI_Return = ScCciSetLongValue(int Value_Type, int Analog_Out)

Description Set the analog out values 3-6 at the RTC3/4 I/O extension board.
Value_Type Type: int ID:
Location: ScComSAMLightClientCtrlValueTypes
scComSAMLightClientCtrlLongValueTypeDA3 34
Set analog out 3.
scComSAMLightClientCtrlLongValueTypeDA4 35
Set analog out 4.
scComSAMLightClientCtrlLongValueTypeDA5 36
Set analog out 5.
scComSAMLightClientCtrlLongValueTypeDA6 37
Set analog out 6.
Analog_Out Type: int Unit: none

CCI_Return Type: int


CCI return number, see error list.
Notes · Command only for RTC3/4.
C# Example:

Table 328: RTC3/4 AnalogOut

RTC4 Scan Head Temperature Set


Get
DLL Function int Temp = ScGetLongValue(int Value_Type)

ASCII Function int Temp = ScCciGetLongValue(int Value_Type)

Description This commands return the temperature for an RTC4 for the galvanometer scanner
termperature for intelliSCAN, intelliSCANde, intelliDRILL, intellicube.
Value_Type Type: int ID:
Location: ScComSAMLightClientCtrlValueTypes
scComSAMLightClientCtrlLongValueTypeRTCTempX 72
Get the Temp X from RTC4.
scComSAMLightClientCtrlLongValueTypeRTCTempY 73
Get the Temp Y from RTC4.
scComSAMLightClientCtrlLongValueTypeRTCTempZ 80
Get the Temp Z from RTC4.
Temp Type: int Unit: [°C]
Return the temperature of the desired command.
Notes · Command only for RTC4
C# Example: Get X Temp:

int Temp = cci.ScGetLongValue( ( int )


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlLongValueTypeRTCTempX );
Table 329: RTC4 Scan Head Temperature

© 2022 SCAPS GmbH


Client Control Interface Manual - Other 251

RTC5 Scan Head Temperature Set


Get
DLL Function int Temp = ScGetLongValue(int Value_Type)

ASCII Function int Temp = ScCciGetLongValue(int Value_Type)

Description This commands return the servo board temperature of the scan head for an RTC5.
Value_Type Type: int ID:
Location: ScComSAMLightClientCtrlValueTypes
scComSAMLightClientCtrlLongValueTypeRTCServo2TempY 74
Get the Temp Y from Head 2.
scComSAMLightClientCtrlLongValueTypeRTCServoTempX 83
Get the Temp X from Head 1.
scComSAMLightClientCtrlLongValueTypeRTCServoTempY 84
Get the Temp Y from Head 1.
scComSAMLightClientCtrlLongValueTypeRTCServoTempZ 85
scComSAMLightClientCtrlLongValueTypeRTCServo2TempX
Get the Temp Z/Temp X from Head 1/2.
Temp Type: int Unit: [°C]
Return the temperature of the desired command.
Notes · Command only for RTC5
C# Example: Get Servo X Temp:

int Temp = cci.ScGetLongValue( ( int )


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlLongValueTypeRTCServoTempX );
Table 330: RTC5 Scan Head Temperature

13.6 Screenshot

This chapter deals with creating screenshots in SAMLight. There are two different possibilities:

· Screenshot of current View2D (SAMLicht must not be hidden, colored current View2D)
· Screenshot of entities (SAMLight can be hidden, only black and white)

13.6.1 Screenshot of current View2D


· Screenshot of current View2D
· SaveView2DVariableSize screenshot size

Screenshot of current View2D 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 the current View2D.


Value_Type Type: int ID:
Location: ScComSAMLightClientCtrlValueTypes

© 2022 SCAPS GmbH


Client Control Interface Manual - Other 252

Screenshot of current View2D Set


Get
scComSAMLightClientCtrlStringValueTypeSaveView2D160 6
The width of the screenshot is set to 160 pixel. [*]

scComSAMLightClientCtrlStringValueTypeSaveView2D320 7
The width of the screenshot is set to 320 pixel. [*]

scComSAMLightClientCtrlStringValueTypeSaveView2DVariableSize 8
The width of the screenshot is defined by SaveView2DBitmapVariableSize. [*]
scComSAMLightClientCtrlStringValueTypeSaveView2DFull 9
Size of the screenshot is 1:1 from the current View2D.
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 larger axis (usually x) is set to a fixed value, the aspect ratio is kept.
· The screenshot contains the section of the current View2D.
· The screenshot is colored.
· There are several possibilities to control the pixel size of the screenshot.
· This CCI command only works if SAMLight is visible and not hidden by something
else.
· The current View2D can be changed via CCI, see Change View2D.
C# Example: Make a 1:1 screenshot of current View2D:

int CCI_Return = cci.ScSetStringValue( ( int )


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlStringValueTypeSaveView2DFull, @"F:
\screenshot.bmp" );
Table 331: Screenshot of current View2D

SaveView2DVariableSize screenshot size Set


Get
DLL Function int CCI_Return = ScSetDoubleValue(int Value_Type, double Width)
double Width = ScGetDoubleValue(int Value_Type)
ASCII Function int CCI_Return = ScCciSetDoubleValue(int Value_Type, double Width)
double Width = ScCciGetDoubleValue(int Value_Type)
Description Set or get the screenshot width that is created with SaveView2DVariableSize.
Value_Type Type: int ID:
Location: ScComSAMLightClientCtrlValueTypes
scComSAMLightClientCtrlDoubleValueTypeSaveView2DBitmapVariableSize 81
Width Type: double Unit: [mm]
Width of the screenshot [pixel]
CCI_Return Type: int
CCI error number, see error list.
Notes The larger axis (usually x) is set to a fixed value, the aspect ratio is kept.
C# Example: Set screenshot width to 640 pixel:

int CCI_Return = cci.ScSetDoubleValue( ( int )


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlDoubleValueTypeSaveView2DBitmapVariableSize,
640.0 );

© 2022 SCAPS GmbH


Client Control Interface Manual - Other 253

SaveView2DVariableSize screenshot size Set


Get
C# Example: Get screenshot width:

double Screenshot_Size = cci.ScGetDoubleValue( ( int )


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlDoubleValueTypeSaveView2DBitmapVariableSize );
Table 332: SaveView2DBitmapVariableSize screenshot size

13.6.2 Screenshot of entities


· 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 333: 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.

© 2022 SCAPS GmbH


Client Control Interface Manual - Other 254

SaveView2DBitmapDPI Set
Get
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 334: 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:

© 2022 SCAPS GmbH


Client Control Interface Manual - Other 255

SaveView2DAdjustableDPI position and size Set


Get
double Screenshot_DPI = cci.ScGetDoubleValue( ( int )
ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlDoubleValueTypeSaveView2DBitmapX );
Table 335: 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 336: SaveView2DAdjustableDPI drawing width

13.7 Scan Head


· Get Scanner Position
· Head ID
· Head Status
· Head Count
· Redpointer for ScMoveAbs
· ScMoveAbs
· ScSwitchLaser
· Update Scanner Position
· XY Status

Get Scanner Position Set


Get
DLL Function double Scanner_Pos = ScGetDoubleValue(int Value_Type)

ASCII Function double Scanner_Pos = ScCciGetDoubleValue(int Value_Type)

Description Get the x, y or z position of the scanner.

© 2022 SCAPS GmbH


Client Control Interface Manual - Other 256

Get Scanner Position Set


Get
Value_Type Type: int ID:
Location: ScComSAMLightClientCtrlValueTypes
scComSAMLightClientCtrlDoubleValueTypeScannerXPos 12
Get the current x position of the scanner.
scComSAMLightClientCtrlDoubleValueTypeScannerYPos 13
Get the current position of the scanner.
scComSAMLightClientCtrlDoubleValueTypeScannerZPos 14
Get the current z position of the scanner.
Scanner_Pos Type: int Unit: none
Get the x, y or z position of the scanner.
CCI_Return Type: int
CCI return number, see error list.
Notes · Before requesting the scanner positions with these three constants, they must be
updated with Update scanner position
· Not recommended during marking.
C# Example: Get x position of the scanner:

double Scanner_X_Pos = cci.ScGetDoubleValue(( int)


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlDoubleValueTypeScannerXPos);
Table 337: Get Scanner Position

Head ID Set
Get
DLL Function int CCI_Return = ScSetHead (int Head_ID)
int CCI_Return = ScGetHead (int Head_ID)
ASCII Function int CCI_Return = ScCciSetHead(int Head_ID)
int Head_ID = ScCciGetHead()
Description This function is for MultiHead applications. It specifies a head that is used with the
commands that follow after ScSetHead or returns the number of the active head.
HeadID can have a number in range 0..n that is the number of the active head or -1
to apply commands for all heads.
Head_ID Type: int Unit: none
Enter the number of the head to select.
CCI_Return Type: int
CCI return number, see error list.
Notes · -1 is for all heads which are connected.
C# Example: Set head 2:

int CCI_Return = cci.ScSetHead(2);


C# Example: Get active head:

int Head_ID = 1;
int CCI_Return = cci.ScGetHead( ref Head_ID );
Table 338: Head ID

Head Status Set


Get
DLL Function int Flag = ScGetLongValue(int Value_Type)

© 2022 SCAPS GmbH


Client Control Interface Manual - Other 257

Head Status Set


Get
ASCII Function int Flag = ScCciGetLongValue(int Value_Type)

Description Returns the status of the primary or secondary head. For different card types (USC-
1, USC-2/3, RTC), different values can be returned, also a combination of them. If
you use more than one card, you have to select the card with ScSetHead first.
Value_Type Type: int ID:
Location: ScComSAMLightClientCtrlValueTypes
scComSAMLightClientCtrlLongValueTypeHeadStatus 2
Returns the status of the primary head.
scComSAMLightClientCtrlLongValueTypeHead2Status 75
Returns the status of the secondary head.
Flag Type: int Flag:
Location: none
Temperature OK 0x1
Only for RTC cards, the temperature status is available.
Power OK 0x2
Only for RTC cards, the power status is available.
Position OK 0x4
Only for RTC cards, the position status is available.
Out of data with laser on 0x1024
For all cards, the state out of data with laser on is available.
Notes · Depending on the specific type of card, different flags are available.
C# Example: Get head status:

int Head_Status = cci.ScGetLongValue((int)


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlLongValueTypeHeadStatus);
Table 339: Head Status

Head Count Set


Get
DLL Function int Head_Count = ScGetLongValue(int Value_Type)

ASCII Function int Head_Count = ScCciGetLongValue(int Value_Type)

Description Returns the total number of heads (cards).


Value_Type Type: int ID:
Location: ScComSAMLightClientCtrlValueTypes
scComSAMLightClientCtrlLongValueTypeGetHeadCount 61
Head_Count Type: int Unit: none
Get the number of heads.
Notes · Head count counts the number of cards which are present in the settings file, not
the number of heads which are selected for one card.
C# Example: Get the current head count:

int Head_Count = cci.ScGetLongValue((int)


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlLongValueTypeGetHeadCount);
Table 340: Head Count

© 2022 SCAPS GmbH


Client Control Interface Manual - Other 258

Redpointer for absolute scanner move Set


Get
DLL Function int CCI_Return = ScSetLongValue(int Value_Type, int RP_On_Off)

ASCII Function int CCI_Return = ScCciSetLongValue(int Value_Type, int RP_On_Off)

Description With this flag, the behaviour of the ScMoveAbs command is completely different.
The ScMoveAbs commands will be executed as a list.
The red pointer move list is
* started and cleared by setting SelectRedpointerForMoveAbs to '1'.
* filled by one or multiple ScMoveAbs commands.
* executed by setting SelectRedpointerForMoveAbs to '0'. After the execution the list
is cleared.
Value_Type Type: int ID:
Location: ScComSAMLightClientCtrlValueTypes
scComSAMLightClientCtrlLongValueTypeSelectRedpointerForMoveAbs 57
Use the red pointer move list.
RP_On_Off Type: int Unit: none
· 0: Redpointer selection for ScMoveAbs off
· 1: Redpointer selection for ScMoveAbs on
CCI Return Type: int
CCI return number, see error list.
Notes · Use this flag before ScMoveAbs.
C# Example:

CCI_Return = cci.ScSetLongValue((int)
ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlLongValueTypeSelectRedpointerForMoveAbs, 1 )
Table 341: Redpointer for absolute scanner move

Absolute scanner move Set


Get
DLL Function int CCI_Return = ScMoveAbs(double X_Position, double Y_Position, double Z_Position)

ASCII Function int CCI_Return = ScCciMoveAbs(double X_Position, double Y_Position, double Z_Position)

Description Jumps with the defined pen directly to the new position specified by x, y and z.
During the jump the laser emission is turned off by default and can be turned on with
ScSwitchLaser().
X_Position Type: double Unit: [mm]
X value of the target position.
Y_Position Type: double Unit: [mm]
Y value of the target position.
Z_Position Type: double Unit: [mm]
Z value of the target position.
CCI_Return Type: int
CCI return number, see error list.
Notes · Define the pen which should be used for the jump using ScSetPen().
· Without pen definition, pen #1 will be taken as default.
· The values will be affected by the correction file as well.
C# Example: Move the scanner to x = 10mm, y = 10mm and z = 22mm:

int CCI_Return = cci.ScMoveAbs( 10, 10, 22 );


Table 342: Absolute scanner move

© 2022 SCAPS GmbH


Client Control Interface Manual - Other 259

Switch laser on / off Set


Get
DLL Function int CCI_Return = ScSwitchLaser(int On_Off)

ASCII Function int CCI_Return = ScCciSwitchLaser(int On_Off)

Description Switches the laser_gate signal of a USC card on or off, depending on the On_Off
parameter.
On_Off Type: int Unit: none
· 0: Laser_Gate signal off
· 1: Laser_Gate signal on
CCI_Return Type: int
CCI return number, see error list.
Notes · The on or off switch of laser_gate will be done immediately.
· Can be used together with ScMoveAbs.
· Do not use this command together with regular job because ScSwitchLaser stops
the marking process.
C# Example: Switch the laser_gate signal on:

int CCI_Return = cci.ScSwitchLaser( 1 );


Table <%HMTABLECOUNTER%>: Switch laser on / off

Update Scanner Position Set


Get
DLL Function int CCI_Return = ScExecCommand(int Cmd_ID)

ASCII Function int CCI_Return = ScCciExecCommand(int Cmd_ID)

Description Updates the position information of the scanner.


Cmd_ID Type: int ID:
Location:ScComSAMLightClientCtrlExecCommandConstants
scComSAMLightClientCtrlExecCommandUpdateScannerPos 9
CCI_Return Type: int
CCI return number, see error list.
Notes -
C# Example: Create new job:

int CCI_Rerturn = cci.ScExecCommand((int)


ScComSAMLightClientCtrlExecCommandConstants.scComSAMLightClientCtrlExecCommandUpdateScannerPos);
Table 343: Update Scanner Position

XY Status Set
Get
DLL Function int XY_Status = ScGetLongValue(int Value_Type)

ASCII Function int XY_Status = ScCciGetLongValue(int Value_Type)

Description Returns the status of the scanner (head 0 or head 1) based on the status signal of
the XY2-100 interface of the selected USC-2 or USC-3 card. If you use more than
one USC-2 or USC-3 card, you have to select the card with ScSetHead first.
Value_Type Type: int ID:
Location: ScComSAMLightClientCtrlValueTypes
scComSAMLightClientCtrlLongValueTypeXYStatus 68
Get the status of head 0.

© 2022 SCAPS GmbH


Client Control Interface Manual - Other 260

XY Status Set
Get
scComSAMLightClientCtrlLongValueTypeXYStatus1 69
Get the status of head 1.
XY_Status Type: int Unit: none
Returns the status of the head.
Notes · The status will be updated every 100 ms (approximately).
· For the interpretation of this signal please refer to your scanner manual.
C# Example: Get XY status of the scanner connected to head 0:

int XY_Status = cci.ScGetLongValue((int)


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlLongValueTypeXYStatus);
Table 344: XY Status

13.8 sc_corr_table
· Correction Mode
· Correction Points
· 2D Fit Type
· Correct SamLight
· Send Cor Table Values

Correction Mode Set


Get
DLL Function int CCI_Return = ScSetLongValue(int Value_Type, int Parameter)

ASCII Function int CCI_Return = ScCciSetLongValue(int Value_Type, int Parameter)

Description Specifies the correction mode of CorrectSamLight


Value_Type Type: int ID:
Location: ScComSAMLightClientCtrlValueTypes
scComSAMLightClientCtrlLongValueTypeCorrectionMode 81
Parameter Type: int Unit: none
Location: none
scComSAMLightClientCtrlCorrectionModeOld 0
Old algorithm: The grid points of the UCF file will be mapped through a linear
interpolation of the 4 enclosing measure points. Finding the enclosing points could
fail and lead to single grid point distortions. Postfix: _YYYYMMDDOld.ucf
scComSAMLightClientCtrlCorrectionModeRTS 1
Rotation, Translation, Scale: Rotation, translation and scaling operations are used to
minimizes the sum of squared residuals of all calib points. Postfix:
_YYYYMMDDRts.ucf
scComSAMLightClientCtrlCorrectionModeIDW 2
Inverse Distance Weighting: The position of each grid point is influenced by the
closest x calib points weighted by their inverse distance. The number of influence
points can be chosen with CorrectionPoints. This algorithm tends to cause unwanted
oscillations. Postfix: _YYYYMMDDIdw#.ucf
scComSAMLightClientCtrlCorrectionMode2dFit 4
2D Fit: Minimizes the sum of squared residuals (distance between the fit and the
calibration points). The more points in sc_calib_points.txt, the better is the
compensation of measuring errors.

© 2022 SCAPS GmbH


Client Control Interface Manual - Other 261

Correction Mode Set


Get
It is possible to try different fit modes and to compare the results in *_fit_log.txt. The
fit order can be selected by 2dFitType. Postfix: _YYYYMMDDFit2D#.ucf
CCI_Return Type: int
CCI return number, see error list.
Notes
C# Example: Select Fit2D correction algorithm:

int CCI_Return = cci.ScSetLongValue((int)


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlLongValueTypeCorrectionMode, (int)
ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlCorrectionMode2dFit);
Table 345: Correction Mode

Correction Points Set


Get
DLL Function, int CCI_Return = ScSetLongValue(int Value_Type, int Parameter)

ASCII Function int CCI_Return = ScCciSetLongValue(int Value_Type, int Parameter)

Description Specifies the number of influence points for each grid point for inverse distance
weighting (IDW) mode. A value of '4' seems to lead to good results. IDW mode must
be enabled with CorrectionModeIDW.
Value_Type Type: int ID:
Location: ScComSAMLightClientCtrlValueTypes
scComSAMLightClientCtrlLongValueTypeCorrectionPoints 82
Parameter Type: int Unit: none
· 0: Disable.
· 1: Enable.
CCI_Return Type: int
CCI return number, see error list.
Notes -
C# Example: Correct points in Fit2D correction algorithm:

int CCI_Return = cci.ScSetLongValue((int)


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlLongValueTypeCorrectionPoints, (int)
ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlCorrectionMode2dFit);
Table 346: Correction Points

2D Fit Type Set


Get
DLL Function, int CCI_Return = ScSetLongValue(int Value_Type, int Fit_Mode)

ASCII Function int CCI_Return = ScCciSetLongValue(int Value_Type, int Fit_Mode)

Description Selects the 2D fit order to adjust a correction file (*.ucf) by


<SCAPS>\system\sc_calib_points.txt. 2D fit algorithm must be enabled with
CorrectionMode2dFit. Postfix: _YYYYMMDDFit2D#.ucf.
Value_Type Type: int ID:
Location: ScComSAMLightClientCtrlValueTypes
scComSAMLightClientCtrlLongValueType2dFitType 92
Fit_Mode Type: int Unit: none

© 2022 SCAPS GmbH


Client Control Interface Manual - Other 262

2D Fit Type Set


Get
· 1&2: 2D Fit Basic: Recommended for measurements with big errors. Improved
compensation of measurement errors. 1_Basic can only compensate linear
(trapezoid) distortions and should not be used for the neutral correction file
(cor_neutral.ucf).
· 3&4: 2D Fit Advanced: Recommended for most scenarios. 3_Advanced is the
default mode.
· 5&6: 2D Fit Expert: Only recommended for precise measurements which means
the measurement error is really small.
CCI_Return Type: int
CCI return number, see error list.
Notes -
C# Example: Select Fit2D order, for example 3_Advanced:

int CCI_Return = cci.ScSetLongValue((int)


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlLongValueType2dFitType, 3);
Table 347: 2D Fit Type

Correct SamLight Set


Get
DLL Function int CCI_Return = ScExecCommand(int Cmd_ID)

ASCII Function int CCI_Return = ScCciExecCommand(int Cmd_ID)

Description Executes the correction of the currently used correction file with
<SCAPS>\system\sc_calib_points.txt. The new correction file is applied in SAMLight
and it is saved in the same folder as the previous used one. The correction mode
can be chosen with CorrectionMode. An example can be found in the chapter
Correct UCF. In sc_corr_table, this function is called 'Correct UCF by calibration
points'.
Cmd_ID Type: int ID:
Location: ScComSAMLightClientCtrlExecCommandConstants
scComSAMLightClientCtrlExecCommandCorrectSamLight 50
CCI_Return Type: int
CCI return number, see error list.
Notes -
C# Example: Execute the correction with <SCAPS>\system\sc_calib_points.txt and apply the new
correction file in SAMLight:

int CCI_Return = cci.ScExecCommand((int)


ScComSAMLightClientCtrlExecCommandConstants.scComSAMLightClientCtrlExecCommandCorrectSamLight);
Table 348: Correct SamLight

Send Cor Table Values Set


Get
DLL Function int CCI_Return = ScSetDoubleValue(int Value_Type, double Parameter)

ASCII Function int CCI_Return = ScCciSetDoubleValue(int Value_Type, double Parameter)

Description Insert new head offset commands during the marking.


Value_Type Type: int ID:
Location: ScComSAMLightClientCtrlValueTypes
scComSAMLightClientCtrlDoubleValueTypeSendCorTableValues 65630

© 2022 SCAPS GmbH


Client Control Interface Manual - Other 263

Send Cor Table Values Set


Get
Parameter Type: int Unit: none
Set the desired values.
CCI_Return Type: int
CCI return number, see error list.
Notes
Table 349: Send Cor Table Values

13.9 View2D
· BackgroundColor
· MultiHeadSplit
· Show Coordinates/Working Area/Grid

Background Color Set


Get
DLL Function int CCI_Return = ScSetLongValue(int Value_Type, int Color)

ASCII Function int CCI_Return = ScCciSetLongValue(int Value_Type, int Color)

Description Set the background color in the View2D.


Value_Type Type: int ID:
Location: ScComSAMLightClientCtrlValueTypes
scComSAMLightClientCtrlLongValueTypeBackgroundColor 79
Set the background color in the View2D.
Color Type: int Unit: none
From hex value 0x000000 for black to hex value 0xffffff for white.
CCI_Return Type: int
CCI return number, see error list.
Notes · The color depth is 24 bit, which corresponds to 16.777.216 different colors.
C# Example: Set the background color to white:

int CCI_Return = cci.ScSetLongValue((int)


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlLongValueTypeBackgroundColor, 0xffffff);
Table 350: Background Color View2D

© 2022 SCAPS GmbH


Client Control Interface Manual - Other 264

MultiHeadSplit Set
Get
DLL Function int CCI_Return = ScExecCommand(int Cmd_ID)

ASCII Function -

Description Change the AutoSplit Mode for MultiHead.


Cmd_ID Type: int ID:
Location: ScComSAMLightClientCtrlExecCommandConstants
scComSAMLightClientCtrlExecCommandAutosplitOn 67
Activates the Autosplit Mode for MultiHead.
scComSAMLightClientCtrlExecCommandAutosplitOff 68
Deactivates the Autosplit Mode for MultiHead.
scComSAMLightClientCtrlExecCommandDoAutosplit 69
Performs the MultiHead split manually.
CCI_Return Type: int
CCI return number, see error list.
Notes -
C# Example: Activate the Autosplit Mode for MultiHead:

int CCI_Return = cci.ScExecCommand((int)


ScComSAMLightClientCtrlExecCommandConstants.scComSAMLightClientCtrlExecCommandAutosplitOn);
Table 351: MultiHeadSplit

© 2022 SCAPS GmbH


Client Control Interface Manual - Other 265

Show Coordinates/Working Area/Grid Set


Get
DLL Function int CCI_Return = ScSetLongValue(int Value_Type, int Mode)

ASCII Function int CCI_Return = ScCciSetLongValue(int Value_Type, int Mode)

Description Set the status of the Coordinates, Working Area and Grid in the View2D.
Value_Type Type: int ID:
Location: ScComSAMLightClientCtrlValueTypes
scComSAMLightClientCtrlLongValueTypeShowCoordinates 76
Hide or show the Coordinates in View2D.
scComSAMLightClientCtrlLongValueTypeShowWorkingArea 77
Hide or show the Working Area in View2D.
scComSAMLightClientCtrlLongValueTypeShowGrid 78
Hide or show the Grid in View2D.
Mode Type: int Unit: none
· 0: To hide.
· 1: To show.
CCI_Return Type: int
· CCI return number, see error list.
Notes -
C# Example: Hide the coordinates, working area and grid in View2D:

int CCI_Return_01 = cci.ScSetLongValue((int)


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlLongValueTypeShowCoordinates, 0);
int CCI_Return_02 = cci.ScSetLongValue((int)
ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlLongValueTypeShowWorkingArea, 0);
int CCI_Return_03 = cci.ScSetLongValue((int)
ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlLongValueTypeShowGrid, 0);
Table 352: Coordinates/Working Area/Grid View2D

14 List of Commands
14.1 ASCII Commands

· ScCciAutoCompensateCal
· ScCciAutoCompensateOff
· ScCciAutoCompensateRef
· ScCciChangeTextByName
· ScCciCreateEntity
· ScCciDecSerialNumbers
· ScCciDeleteEntity
· ScCciDuplicateEntity
· ScCciExecCommand
· ScCciFitViewToEntities
· ScCciFitViewToSelectedEntities
· ScCciFitViewToWorkingArea
· ScCciGetDoubleValue
· ScCciGetEntityDoubleData
· ScCciGetEntityLongData
· ScCciGetEntityOutline

© 2022 SCAPS GmbH


Client Control Interface Manual - List of Commands 266

· ScCciGetEntityOutline2D
· ScCciGetEntityOutline3D
· ScCciGetEntityStringData
· ScCciGetHead
· ScCciGetIDStringData
· ScCciGetInterfaceVersion
· ScCciGetLongValue
· ScCciGetMarkFlags
· ScCciGetMode
· ScCciGetOpticMatrix
· ScCciGetPen
· ScCciGetStringDoubleValue
· ScCciGetStringValue
· ScCciGetWorkingArea
· ScCciImport
· ScCciIncSerialNumbers
· ScCciIsMarking
· ScCciLoadJob
· ScCciMarkEntityByName
· ScCciMotionGo
· ScCciMotionHome
· ScCciMotionSendString
· ScCciMotionStopMove
· ScCciMotionUpdatePos
· ScCciMoveAbs
· ScCciNewJob
· ScCciOpticMatrixReset
· ScCciOpticMatrixRotate
· ScCciOpticMatrixScale
· ScCciOpticMatrixTranslate
· ScCciProcessFlashJob
· ScCciResetCounter
· ScCciResetSequence
· ScCciResetSerialNumbers
· ScCciResplitJob
· ScCciRotateEntity
· ScCciRotateEntity3D
· ScCciSaveJob
· ScCciSaveSplitsAsEntities
· ScCciScaleEntity
· ScCciScaleEntityCurPos
· ScCciSetDoubleValue
· ScCciSetEntityDoubleData
· ScCciSetEntityLongData
· ScCciSetEntityOutline2D
· ScCciSetEntityOutline3D
· ScCciSetEntityStringData
· ScCciSetFieldSizeAndWorkingArea
· ScCciSetHead
· ScCciSetIDStringData
· ScCciSetLongValue
· ScCciSetMarkFlags

© 2022 SCAPS GmbH


Client Control Interface Manual - List of Commands 267

· ScCciSetMode
· ScCciSetPen
· ScCciSetPixelMapForPen
· ScCciSetStringDoubleValue
· ScCciSetStringLongValue
· ScCciSetStringValue
· ScCciShowApp
· ScCciShutdown
· ScCciStopMarking
· ScCciSwitchLaser
· ScCciTest
· ScCciTranslateEntity
· ScCciUpdateScannerPos
· ScCciUpdateViewNow

14.2 DLL Commands


· ScChangeTextByName
· ScCloseEthernetConnection
· ScCreateEntity
· ScDeleteEntity
· ScDuplicateEntity
· ScExecCommand
· ScExport
· ScFlashCommand
· ScGetConnectionStatus
· ScGetDoubleValue
· ScGetEntityDoubleData
· ScGetEntityLongData
· ScGetEntityOutline
· ScGetEntityOutline2D
· ScGetEntityOutline3D
· ScGetEntityStringData
· ScGetHead
· ScGetIDStringData
· ScGetInterfaceVersion
· ScGetLongData
· ScGetLongValue
· ScGetMarkFlags
· ScGetMode
· ScGetOpticMatrix
· ScGetPen
· ScGetPenPathForPen
· ScGetPreviewImage
· ScGetStringDblValue
· ScGetStringValue
· ScGetWorkingArea
· ScImport
· ScIsMarking
· ScIsRunning
· ScLoadJob
· ScMarkEntityByName

© 2022 SCAPS GmbH


Client Control Interface Manual - List of Commands 268

· ScMoveAbs
· ScOpenEthernetConnection
· ScOpenTCPConnection
· ScOpenUDPConnection
· ScOpticMatrixReset
· ScOpticMatrixRotate
· ScOpticMatrixScale
· ScOpticMatrixTranslate
· ScProcessFlashJob
· ScRotateEntity
· ScRotateEntity3D
· ScSaveJob
· ScScaleEntity
· ScScaleEntityCurPos
· ScSetDoubleValue
· ScSetEntityDoubleData
· ScSetEntityLongData
· ScSetEntityOutline2D
· ScSetEntityOutline3D
· ScSetEntityStringData
· ScSetFieldSizeAndWorkingArea
· ScSetHead
· ScSetIDStringData
· ScSetLongData
· ScSetLongValue
· ScSetLongValue64
· ScSetMarkFlags
· ScSetMode
· ScSetPen
· ScSetPenPathForPen
· ScSetPixelMapForPen
· ScSetStringDblValue
· ScSetStringLongValue
· ScSetStringValue
· ScShowApp
· ScShutDown
· ScSlice
· ScSliceFromTxt
· ScStopMarking
· ScSwitchLaser
· ScTranslateEntity

15 List of Constants
15.1 Double Value Types
Double Value Types

Description: List of constants used by the Double Value Types function.


Type: int ID

© 2022 SCAPS GmbH


Client Control Interface Manual - List of Constants 269

Double Value Types

Location: ScComSAMLightClientCtrlValueTypes
scComSAMLightClientCtrlDoubleValueTypeOverrideSpeed 1
scComSAMLightClientCtrlDoubleValueTypeOverridePower 2
scComSAMLightClientCtrlDoubleValueTypeOverrideFrequency 3
scComSAMLightClientCtrlDoubleValueTypeMarkSpeed 4
scComSAMLightClientCtrlDoubleValueTypeJumpSpeed 5
scComSAMLightClientCtrlDoubleValueTypeFrequency 6
scComSAMLightClientCtrlDoubleValueTypeJumpDelay 7
scComSAMLightClientCtrlDoubleValueTypeMarkDelay 8
scComSAMLightClientCtrlDoubleValueTypePolyDelay 9
scComSAMLightClientCtrlDoubleValueTypeLaserOnDelay 10
scComSAMLightClientCtrlDoubleValueTypeLaserOffDelay 11
scComSAMLightClientCtrlDoubleValueTypeScannerXPos 12
scComSAMLightClientCtrlDoubleValueTypeScannerYPos 13
scComSAMLightClientCtrlDoubleValueTypeScannerZPos 14
scComSAMLightClientCtrlDoubleValueTypePulseLength 15
scComSAMLightClientCtrlDoubleValueTypeFirstPulseLength 16
scComSAMLightClientCtrlDoubleValueTypeLaserPower 17
scComSAMLightClientCtrlDoubleValueTypeSizePowerMap 18
scComSAMLightClientCtrlDoubleValueTypePowerMapStartId 19
scComSAMLightClientCtrlDoubleValueTypeMaxPower 20
scComSAMLightClientCtrlDoubleValueTypeLastMarkTime 21
scComSAMLightClientCtrlDoubleValueTypeOverridePower2 22
scComSAMLightClientCtrlDoubleValueTypeHomePosX 23
scComSAMLightClientCtrlDoubleValueTypeHomePosY 24
scComSAMLightClientCtrlDoubleValueTypeHomePosZ 25
scComSAMLightClientCtrlDoubleValueTypeLineRampingPowerStartRampValue 26
scComSAMLightClientCtrlDoubleValueTypeLineRampingPowerStartRampLength 27
scComSAMLightClientCtrlDoubleValueTypeLineRampingPowerEndRampValue 28
scComSAMLightClientCtrlDoubleValueTypeLineRampingPowerEndRampLength 29
scComSAMLightClientCtrlDoubleValueTypeLineRampingSpeedStartRampValue 30
scComSAMLightClientCtrlDoubleValueTypeLineRampingSpeedStartRampLength 31
scComSAMLightClientCtrlDoubleValueTypeLineRampingSpeedEndRampValue 32
scComSAMLightClientCtrlDoubleValueTypeLineRampingSpeedEndRampLength 33
scComSAMLightClientCtrlDoubleValueTypeLastExpectedMarkTime 34
scComSAMLightClientCtrlDoubleValueTypeSkyWritingStartLength 35
scComSAMLightClientCtrlDoubleValueTypeSkyWritingEndLength 36
scComSAMLightClientCtrlDoubleValueTypeSkyWritingBreakAngle 37
scComSAMLightClientCtrlDoubleValueTypeMotionAxisPosition 38
scComSAMLightClientCtrlDoubleValueTypeMotionAxisAngle 39
scComSAMLightClientCtrlDoubleValueTypeMotionAxisPositionRelative 40

© 2022 SCAPS GmbH


Client Control Interface Manual - List of Constants 270

Double Value Types

scComSAMLightClientCtrlDoubleValueTypeMotionAxisAngleRelative 41
scComSAMLightClientCtrlDoubleValueTypeMotionAxisSpeed 42
scComSAMLightClientCtrlDoubleValueTypeHalfPeriod 43
scComSAMLightClientCtrlDoubleValueTypeSaveView2DBitmapDPI 44
scComSAMLightClientCtrlDoubleValueTypeSpiLaserSimmer 45
scComSAMLightClientCtrlDoubleValueTypeGainX 46
scComSAMLightClientCtrlDoubleValueTypeGainY 47
scComSAMLightClientCtrlDoubleValueTypeLaserCo2Power1 48
scComSAMLightClientCtrlDoubleValueTypeLaserCo2Power2 49
scComSAMLightClientCtrlDoubleValueTypeAngularSplittingTotalDiameter 50
scComSAMLightClientCtrlDoubleValueTypeAngularSplittingAngle 51
scComSAMLightClientCtrlDoubleValueTypeHorizontalSplittingValue 52
scComSAMLightClientCtrlDoubleValueTypeVerticalSplittingValue 53
scComSAMLightClientCtrlDoubleValueTypeWobbleFrequency 54
scComSAMLightClientCtrlDoubleValueTypeWobbleAmplitude 55
scComSAMLightClientCtrlDoubleValueTypeStartSplittingPosX 56
scComSAMLightClientCtrlDoubleValueTypeStartSplittingPosY 57
scComSAMLightClientCtrlDoubleValueTypeOffsetX 58
scComSAMLightClientCtrlDoubleValueTypeOffsetY 59
scComSAMLightClientCtrlDoubleValueTypeLineRampingLengthenStart 60
scComSAMLightClientCtrlDoubleValueTypeLineRampingLengthenEnd 61
scComSAMLightClientCtrlDoubleValueTypeDefocus 62
scComSAMLightClientCtrlDoubleValueTypeAsyncModeResult 63
scComSAMLightClientCtrlDoubleValueTypeMotionAxisAddControl 64
scComSAMLightClientCtrlDoubleValueTypeMOFExtStartDelay 65
scComSAMLightClientCtrlDoubleValueTypeDoublePara1 66
scComSAMLightClientCtrlDoubleValueTypeDoublePara2 67
scComSAMLightClientCtrlDoubleValueTypeWorkingAreaMinX 68
scComSAMLightClientCtrlDoubleValueTypeWorkingAreaMinY 69
scComSAMLightClientCtrlDoubleValueTypeWorkingAreaMaxX 70
scComSAMLightClientCtrlDoubleValueTypeWorkingAreaMaxY 71
scComSAMLightClientCtrlDoubleValueTypeDrillPeriod 72
scComSAMLightClientCtrlDoubleValueTypeDrillDuration 73
scComSAMLightClientCtrlDoubleValueTypeDrillLength 74
scComSAMLightClientCtrlDoubleValueTypeDrillJumpSpeed 75
scComSAMLightClientCtrlDoubleValueTypeDrillJumpDelay 76
scComSAMLightClientCtrlDoubleValueTypeDrillDimension 78
scComSAMLightClientCtrlDoubleValueTypeDrillCo2HalfPeriod 79
scComSAMLightClientCtrlDoubleValueType3DVariHatchAngle 80
scComSAMLightClientCtrlDoubleValueTypeSaveView2DBitmapVariableSize 81
scComSAMLightClientCtrlDoubleValueTypeSaveView2DBitmapX 82

© 2022 SCAPS GmbH


Client Control Interface Manual - List of Constants 271

Double Value Types

scComSAMLightClientCtrlDoubleValueTypeSaveView2DBitmapY 83
scComSAMLightClientCtrlDoubleValueTypeSaveView2DBitmapXW 84
scComSAMLightClientCtrlDoubleValueTypeSaveView2DBitmapYW 85
scComSAMLightClientCtrlDoubleValueTypeSelPointXPos 86
scComSAMLightClientCtrlDoubleValueTypeSelPointYPos 87
scComSAMLightClientCtrlDoubleValueTypeSelPointZPos 88
scComSAMLightClientCtrlDoubleValueTypeLongDelay 89
scComSAMLightClientCtrlDoubleValueTypeOffsetZ 90
scComSAMLightClientCtrlDoubleValueTypeSpeedMotfEntityBasedSplitting 91
scComSAMLightClientCtrlDoubleValueTypeEntityArrayStepX 92
scComSAMLightClientCtrlDoubleValueTypeEntityArrayStepY 93
scComSAMLightClientCtrlDoubleValueTypeEntityBasedSplittingGroupedEntityWidth 94
scComSAMLightClientCtrlDoubleValueTypeDoublePara3 95
scComSAMLightClientCtrlDoubleValueType3DSurfaceValue1 96
scComSAMLightClientCtrlDoubleValueType3DSurfaceValue2 97
scComSAMLightClientCtrlDoubleValueType3DSurfaceValue3 98
scComSAMLightClientCtrlDoubleValueType3DSurfaceValue4 99
scComSAMLightClientCtrlDoubleValueType3DSurfaceValue5 100
scComSAMLightClientCtrlDoubleValueType3DSurfaceValue6 101
scComSAMLightClientCtrlDoubleValueType3DSurfaceValue7 102
scComSAMLightClientCtrlDoubleValueType3DSurfaceValue8 103
scComSAMLightClientCtrlDoubleValueType3DSurfaceValue9 104
scComSAMLightClientCtrlDoubleValueType3DSurfaceValue10 105
scComSAMLightClientCtrlDoubleValueType3DSurfaceValue11 106
scComSAMLightClientCtrlDoubleValueType3DSurfaceValue12 107
scComSAMLightClientCtrlDoubleValueType3DSurfaceValue13 108
scComSAMLightClientCtrlDoubleValueType3DSurfaceValue14 109
scComSAMLightClientCtrlDoubleValueType3DSurfaceValue15 110
scComSAMLightClientCtrlDoubleValueTypeOpticRotation 111
scComSAMLightClientCtrlDoubleValueTypeLastPreviewTime 112
scComSAMLightClientCtrlDoubleValueType2DSplitWidthValue 113
scComSAMLightClientCtrlDoubleValueType2DSplitHeightValue 114
scComSAMLightClientCtrlDoubleValueTypeRingSplittingZTiltAngle 115
scComSAMLightClientCtrlDoubleValueTypeRingSplittingZSpindleCenterHeight 116
scComSAMLightClientCtrlDoubleValueTypeRingSplittingSpindleRradius 117
scComSAMLightClientCtrlDoubleValueTypeRingSplittingZRingCenterHeight 118
scComSAMLightClientCtrlDoubleValueTypeFieldMinX 119
scComSAMLightClientCtrlDoubleValueTypeFieldMinY 120
scComSAMLightClientCtrlDoubleValueTypeFieldMaxX 121
scComSAMLightClientCtrlDoubleValueTypeFieldMaxY 122
scComSAMLightClientCtrlDoubleValueTypeIPGPulseLength 123

© 2022 SCAPS GmbH


Client Control Interface Manual - List of Constants 272

Double Value Types

scComSAMLightClientCtrlDoubleValueTypeMinFrequency 124
scComSAMLightClientCtrlDoubleValueTypeMaxFrequency 125
scComSAMLightClientCtrlDoubleValueTypeDrillMarkLineAsDotsGridX 126
scComSAMLightClientCtrlDoubleValueTypeDrillMarkLineAsDotsGridY 127
scComSAMLightClientCtrlDoubleValueTypeMinMarkSpeed 128
scComSAMLightClientCtrlDoubleValueTypeMaxMarkSpeed 129
scComSAMLightClientCtrlDoubleValueTypeMinJumpSpeed 130
scComSAMLightClientCtrlDoubleValueTypeMaxJumpSpeed 131
scComSAMLightClientCtrlDoubleValueTypeStepAndRepeatPlanarStartX 132
scComSAMLightClientCtrlDoubleValueTypeStepAndRepeatPlanarStartY 133
scComSAMLightClientCtrlDoubleValueTypeStepAndRepeatPlanarStepX 134
scComSAMLightClientCtrlDoubleValueTypeStepAndRepeatPlanarStepY 135
scComSAMLightClientCtrlDoubleValueTypeStepAndRepeatSpeed 136
scComSAMLightClientCtrlDoubleValueTypeBmpAlphaBlendPointXTo 137
scComSAMLightClientCtrlDoubleValueTypeBmpAlphaBlendPointYTo 138
scComSAMLightClientCtrlDoubleValueTypeBmpAlphaBlendDimXTo 139
scComSAMLightClientCtrlDoubleValueTypeBmpAlphaBlendDimYTo 140
scComSAMLightClientCtrlDoubleValueTypeBmpContinuousTotalDiameter 141
scComSAMLightClientCtrlDoubleValueTypeBmpContinuousAngle 142
scComSAMLightClientCtrlDoubleValueTypeProcessTime 143
scComSAMLightClientCtrlDoubleValueTypeTotalMarkingTime 144
scComSAMLightClientCtrlDoubleValueTypeProcessTime 143
scComSAMLightClientCtrlDoubleValueTypeTotalMarkingTime 144
scComSAMLightClientCtrlDoubleValueTypeSplitOverlap 145
scComSAMLightClientCtrlDoubleValueTypeSplitMotfDistanceBetweenSplits 147
scComSAMLightClientCtrlDoubleValueTypeDoublePara4 148
scComSAMLightClientCtrlDoubleValueTypeDoublePara5 149
scComSAMLightClientCtrlDoubleValueTypeDoublePara6 150
scComSAMLightClientCtrlDoubleValueTypeDoublePara7 151
scComSAMLightClientCtrlDoubleValueTypeDoublePara8 152
scComSAMLightClientCtrlDoubleValueTypeBackgroundImageWebcamMaxFramesPerSecond 153
scComSAMLightClientCtrlDoubleValueTypeRedPointerOffsetX 154
scComSAMLightClientCtrlDoubleValueTypeRedPointerOffsetY 155
scComSAMLightClientCtrlDoubleValueTypeRedPointerFactorX 156
scComSAMLightClientCtrlDoubleValueTypeRedPointerFactorY 157
scComSAMLightClientCtrlDoubleValueTypeStyleIdPixelMapZone 4096
scComSAMLightClientCtrlDoubleValueTypeUserValue 20000
scComSAMLightClientCtrlDoubleValueTypeUsc1MotfCh0Multiplier 65539
scComSAMLightClientCtrlDoubleValueTypeUsc1MotfCh1Multiplier 65540
scComSAMLightClientCtrlDoubleValueTypePrimaryHeadOffsetX 65546
scComSAMLightClientCtrlDoubleValueTypePrimaryHeadOffsetY 65547

© 2022 SCAPS GmbH


Client Control Interface Manual - List of Constants 273

Double Value Types

scComSAMLightClientCtrlDoubleValueTypePrimaryHeadGainX 65548
scComSAMLightClientCtrlDoubleValueTypePrimaryHeadGainY 65549
scComSAMLightClientCtrlDoubleValueTypePrimaryHeadRotate 65550
scComSAMLightClientCtrlDoubleValueTypePrimaryHeadEnable 65551
scComSAMLightClientCtrlDoubleValueTypeSecondaryHeadOffsetX 65552
scComSAMLightClientCtrlDoubleValueTypeSecondaryHeadOffsetY 65553
scComSAMLightClientCtrlDoubleValueTypeSecondaryHeadGainX 65556
scComSAMLightClientCtrlDoubleValueTypeSecondaryHeadGainY 65557
scComSAMLightClientCtrlDoubleValueTypeSecondaryHeadRotate 65558
scComSAMLightClientCtrlDoubleValueTypeSecondaryHeadEnable 65559
scComSAMLightClientCtrlDoubleValueTypeLaserType 65597
scComSAMLightClientCtrlDoubleValueTypeLaserTypeVersion 65598
scComSAMLightClientCtrlDoubleValueTypeSendCorTableValues 65630
scComSAMLightClientCtrlDoubleValueTypeUsc1MotfSimulate 65638
scComSAMLightClientCtrlDoubleValueTypeUsc1MotfUseYChannel 65640
scComSAMLightClientCtrlDoubleValueTypeUsc1MotfInvertOffset 65661
scComSAMLightClientCtrlDoubleValueTypeUsc2MotfCh0Enable 65662
scComSAMLightClientCtrlDoubleValueTypeUsc2MotfCh1Enable 65663
scComSAMLightClientCtrlDoubleValueTypeUsc2MotfCh0Simulate 65664
scComSAMLightClientCtrlDoubleValueTypeUsc2MotfCh1Simulate 65665
scComSAMLightClientCtrlDoubleValueTypeUsc2MotfCh0Multiplier 65670
scComSAMLightClientCtrlDoubleValueTypeUsc2MotfCh1Multiplier 65671
scComSAMLightClientCtrlDoubleValueTypeUsc2MotfCh0Counter 65718
scComSAMLightClientCtrlDoubleValueTypeUsc2MotfCh1Counter 65719
scComSAMLightClientCtrlDoubleValueTypeDistanceMirrorsMM 196608
scComSAMLightClientCtrlDoubleValueTypeRadiusSecondMirrorMM 196609
scComSAMLightClientCtrlDoubleValueTypeZNumControlPoints 196610
scComSAMLightClientCtrlDoubleValueTypeZCorrFieldSize 196612
scComSAMLightClientCtrlDoubleValueTypeLookupZMMStart 196864
scComSAMLightClientCtrlDoubleValueTypeLookupZDacStart 229632
Table 353: Double Value Types

15.2 Long Value Types


Long Value Types

Description: List of constants used by the Long Value Types function.


Constant Flag ID
Location: ScComSAMLightClientCtrlValueTypes
scComSAMLightClientCtrlLongValueTypeNumMarksCompleted 1
scComSAMLightClientCtrlLongValueTypeHeadStatus 2

© 2022 SCAPS GmbH


Client Control Interface Manual - List of Constants 274

Long Value Types

Temperature OK 0x1
Power OK 0x2
Position OK 0x4
scComSAMLightClientCtrlLongValueTypeExecutionStatus 3
scComSAMLightClientCtrlLongValueTypeOptoIO 4
scComSAMLightClientCtrlLongValueTypeQuantity 5
scComSAMLightClientCtrlLongValueTypeDA1 6
scComSAMLightClientCtrlLongValueTypeDA2 7
scComSAMLightClientCtrlLongValueTypeDeviceEnableFlagsSet 8
scComStandardDeviceEnableFlagGroupStyle 0x0
scComStandardDeviceEnableFlagGroupOptoOut 0x1
scComSAMLightClientCtrlLongValueTypeDeviceEnableFlagsValue 9
scComStandardDeviceStyleFlagEnableLongDelay 0x1
scComStandardDeviceStyleFlagEnablePortLaser 0x2
scComStandardDeviceStyleFlagEnablePort1 0x4
scComStandardDeviceStyleFlagEnableWobble 0x8
scComStandardDeviceStyleFlagEnableYAGStandBy 0x20
scComStandardDeviceStyleFlagEnablePixelOutput (deprecated, use 0x40
BitmapPixelHardwareMode)
scComStandardDeviceStyleFlagEnablePort2 0x80
scComStandardDeviceStyleFlagEnableDA1 0x200
scComStandardDeviceStyleFlagEnableDA2 0x400
scComStandardDeviceStyleFlagEnableSkyWriting 0x2000
scComStandardDeviceStyleFlagEnablePointUsePowerMap 0x400000
scComSAMLightClientCtrlLongValueTypeTotalEntityNum 10
scComSAMLightClientCtrlLongValueTypeToplevelEntityNum 11
scComSAMLightClientCtrlLongValueTypeJobExecutionDelay 12
scComSAMLightClientCtrlLongValueTypeGetMarkCount 13
scComSAMLightClientCtrlLongValueTypeQueueLength 14
scComSAMLightClientCtrlLongValueTypeMaxQuantity 15
scComSAMLightClientCtrlLongValueTypeOverridePen 16
scComSAMLightClientCtrlLongValueTypeMotionAxis 17
scComSAMLightClientCtrlLongValueTypeMotionWaitForEnd 18
scComSAMLightClientCtrlLongValueTypeMotionMoving 19
scComSAMLightClientCtrlLongValueTypeSpiWaveform 20
scComSAMLightClientCtrlLongValueTypeSpiCw 21
scComSAMLightClientCtrlLongValueTypeLineRampingPowerStartRampActive 22
scComSAMLightClientCtrlLongValueTypeLineRampingPowerEndRampActive 23
scComSAMLightClientCtrlLongValueTypeLineRampingSpeedStartRampActive 24
scComSAMLightClientCtrlLongValueTypeLineRampingSpeedEndRampActive 25
scComSAMLightClientCtrlLongValueTypeLineRampingLengthenStartActive 26

© 2022 SCAPS GmbH


Client Control Interface Manual - List of Constants 275

Long Value Types

scComSAMLightClientCtrlLongValueTypeLineRampingLengthenEndActive 27
scComSAMLightClientCtrlLongValueTypeClientCtrlAsyncMode 28
scComSAMLightClientCtrlLongValueTypeClientCtrlAsyncModeIsRunning 29
scComSAMLightClientCtrlLongValueTypeClientCtrlAsyncModeResult 30
scComSAMLightClientCtrlLongValueTypeGetOptoOut 31
scComSAMLightClientCtrlLongValueTypeStoreRestoreTransformation 32
scComSAMLightClientCtrlLongValueTypeAngularSplittingParts 33
scComSAMLightClientCtrlLongValueTypeDA3 34
scComSAMLightClientCtrlLongValueTypeDA4 35
scComSAMLightClientCtrlLongValueTypeDA5 36
scComSAMLightClientCtrlLongValueTypeDA6 37
scComSAMLightClientCtrlLongValueTypeLastAutoCompensateResult 38
scComSAMLightClientCtrlLongValueTypeDongleUserNumber 39
scComSAMLightClientCtrlLongValueTypeDongleSystemNumber 40
scComSAMLightClientCtrlLongValueTypeHardwareState 41
scComSAMLightClientCtrlLongValueTypeSizePixelMap 42
scComSAMLightClientCtrlLongValueTypeSwitchToPane 43
scComSAMLightClientCtrlLongValueTypeGetTotalSlices 44
scComSAMLightClientCtrlLongValueTypeSliceFrom 45
scComSAMLightClientCtrlLongValueTypeSliceTo 46
scComSAMLightClientCtrlLongValueTypeCurrentSliceNum 47
scComSAMLightClientCtrlLongValueTypePort2 48
scComSAMLightClientCtrlLongValueTypeBmpAlphaBlendSourceConstantAlpha 50
scComSAMLightClientCtrlLongValueTypeBmpAlphaBlendCenterPointX 51
scComSAMLightClientCtrlLongValueTypeBmpAlphaBlendUpperLeftPointX
scComSAMLightClientCtrlLongValueTypeBmpAlphaBlendCenterPointY 52
scComSAMLightClientCtrlLongValueTypeBmpAlphaBlendUpperLeftPointY
scComSAMLightClientCtrlLongValueTypeBmpAlphaBlendBmpDimX 53
scComSAMLightClientCtrlLongValueTypeBmpAlphaBlendBmpDimY 54
scComSAMLightClientCtrlLongValueTypeDrillEnable 55
scComSAMLightClientCtrlLongValueTypeDrillEnableCo2Power 56
scComSAMLightClientCtrlLongValueTypeSelectRedpointerForMoveAbs 57
scComSAMLightClientCtrlLongValueTypeEntityArrayCountX 58
scComSAMLightClientCtrlLongValueTypeEntityArrayCountY 59
scComSAMLightClientCtrlLongValueTypeEntityArrayOrderFlags 60
scComSAMLightClientCtrlEntityArrayOrderFlagNegX 0x100
scComSAMLightClientCtrlEntityArrayOrderFlagNegY 0x200
scComSAMLightClientCtrlEntityArrayOrderFlagMainDirX 0x400
scComSAMLightClientCtrlEntityArrayOrderFlagBiDir 0x800
scComSAMLightClientCtrlLongValueTypeGetHeadCount 61
scComSAMLightClientCtrlLongValueTypeSaveView2DBitmapMode 63

© 2022 SCAPS GmbH


Client Control Interface Manual - List of Constants 276

Long Value Types

scComSAMLightClientCtrlLongValueTypeSelectHatchPair 64
scComSAMLightClientCtrlLongValueTypeRedpointerMode 65
scComSAMLightClientCtrlLongValueTypeSetLockSjfToDongleFlags 66
scComSAMLightClientCtrlLockToDongleFlagLockLoadToSystemId 0x1
scComSAMLightClientCtrlLockToDongleFlagLockLoadToUserId 0x2
scComSAMLightClientCtrlLockToDongleFlagLockExport 0x4
(get only) scComSAMLightClientCtrlLongValueTypeServerStatus 67
SC_USC1_SERVER_STATUS_DEVICE_CONNECTED 0x1
SC_USC1_SERVER_STATUS_DEVICE_OK 0x2
SC_USC1_SERVER_STATUS_DEVICE_MISSING 0x8
SC_USC1_SERVER_STATUS_DEVICE_USC_1 0x10000
SC_USC1_SERVER_STATUS_DEVICE_USC_2 0x20000
SC_USC1_SERVER_STATUS_DEVICE_USC_3 0x80000
(set only) scComSAMLightClientCtrlLongValueTypePrepareLayer
scComSAMLightClientCtrlLongValueTypeXYStatus 68
scComSAMLightClientCtrlLongValueTypeXYStatus1 69
scComSAMLightClientCtrlLongValueTypeSimulationMode 70
scComSAMLightClientCtrlLongValueType3D 71
scComSAMLightClientCtrlLongValueTypeRTCTempX 72
scComSAMLightClientCtrlLongValueTypeRTCTempY 73
scComSAMLightClientCtrlLongValueTypeRTCServo2TempY 74
scComSAMLightClientCtrlLongValueTypeHead2Status 75
Temperature OK 0x1
Power OK 0x2
Position OK 0x4
scComSAMLightClientCtrlLongValueTypeShowCoordinates 76
scComSAMLightClientCtrlLongValueTypeShowWorkingArea 77
scComSAMLightClientCtrlLongValueTypeShowGrid 78
scComSAMLightClientCtrlLongValueTypeBackgroundColor 79
scComSAMLightClientCtrlLongValueTypeRTCTempZ 80
scComSAMLightClientCtrlLongValueTypeCorrectionMode 81
scComSAMLightClientCtrlCorrectionModeOld 0x0
scComSAMLightClientCtrlCorrectionModeRTS 0x1
scComSAMLightClientCtrlCorrectionModeIDW 0x2
scComSAMLightClientCtrlCorrectionMode2dFit 0x4
scComSAMLightClientCtrlLongValueTypeCorrectionPoints 82
scComSAMLightClientCtrlLongValueTypeRTCServoTempX 83
scComSAMLightClientCtrlLongValueTypeRTCServoTempY 84
scComSAMLightClientCtrlLongValueTypeRTCServoTempZ 85
scComSAMLightClientCtrlLongValueTypeRTCServo2TempX
scComSAMLightClientCtrlLongValueType3DSurfaceSetType 86

© 2022 SCAPS GmbH


Client Control Interface Manual - List of Constants 277

Long Value Types

scComSAMLightClientCtrlLongValueTypeEnable3DSurface 87
scComSAMLightClientCtrlLongValueTypeEnableJobToolbar 88
scComSAMLightClientCtrlLongValueTypeBitmapPixelHardwareMode 89
scComSAMLightClientCtrlLongValueTypeBitmapPenPowerAsMaxPower 90
scComSAMLightClientCtrlLongValueTypeEnableMotf 91
scComSAMLightClientCtrlLongValueType2dFitType 92
scComSAMLightClientCtrlLongValueTypeEnableBmpSplitting 93
scComSAMLightClientCtrlLongValueTypeAngularSplittingSplitAxis 94
scComSAMLightClientCtrlLongValueTypeEnableAllSerialNumbersInJob 95
scComSAMLightClientCtrlLongValueTypeRingSplittingEnableZTiltCompensation 96
scComSAMLightClientCtrlLongValueTypeRingSplittingZMotionAxis 97
scComSAMLightClientCtrlLongValueTypePauseBuild 98
scComSAMLightClientCtrlLongValueTypeShowEntityList 99
scComSAMLightClientCtrlLongValueTypeShowPropSheet 100
scComSAMLightClientCtrlLongValueTypeDrillMarkLineAsDotsActive 101
scComSAMLightClientCtrlLongValueTypeProtectedPen 102
scComSAMLightClientCtrlLongValueTypeShowToolBars 103
SC_SHOW_TOOLBAR_MAIN 0x1
SC_SHOW_TOOLBAR_CAMERA 0x2
SC_SHOW_TOOLBAR_VIEW_LEVEL 0x4
SC_SHOW_TOOLBAR_FUNC_OBJECTS 0x8
SC_SHOW_TOOLBAR_ALIGN 0x10
SC_SHOW_TOOLBAR_GEOM_OBJECTS 0x20
SC_SHOW_TOOLBAR_EXTRAS 0x40
SC_SHOW_TOOLBAR_STEPPER 0x80
SC_SHOW_TOOLBAR_SURFACE 0x100
SC_SHOW_TOOLBAR_ANALOG_IN 0x200
scComSAMLightClientCtrlLongValueType1dMotfReverse 104
scComSAMLightClientCtrlLongValueTypeNewCciErrorReturn 105
scComSAMLightClientCtrlLongValueTypeAfterDefocusDelay 106
scComSAMLightClientCtrlLongValueTypeMarkMode 107
scComStandardDeviceMiscPenPathsAndMarkModeFlagSkipContour 0x10000
scComStandardDeviceMiscPenPathsAndMarkModeFlagSkipHatch1 0x20000
scComStandardDeviceMiscPenPathsAndMarkModeFlagSkipHatch2 0x30000
scComSAMLightClientCtrlLongValueTypeReverseSplitOrder 108
scComSAMLightClientCtrlLongValueTypeDisableSimulationMode 109
scComSAMLightClientCtrlLongValueTypeOpticAxisState 110
X-axis inverted 0x1
Y-axis inverted 0x2
X- & Y-axes inverted 0x3
XY-axis flipped 0x4

© 2022 SCAPS GmbH


Client Control Interface Manual - List of Constants 278

Long Value Types

X-axis inverted & XY-axis flipped 0x5


Y-axis inverted & XY-axis flipped 0x6
X- & Y-axis inverted & XY-axis flipped 0x7
Z-axis inverted 0x8
X- & Z-axes inverted 0x9
Y- & Z-axes inverted 0xa
X-, Y- & Z-axes inverted 0xb
Z-axis inverted & XY-axis flipped 0xc
X- & Z-axes inverted & XY-axis flipped 0xd
Y- & Z-axes inverted & XY-axis flipped 0xe
X-, Y- & Z-axes inverted & XY-axis flipped 0xf
scComSAMLightClientCtrlLongValueType1DMotfCenter 111
scComSAMLightClientCtrlLongValueTypeIsCardAccesAllowed 112
scComSAMLightClientCtrlLongValueTypeMotionAxisType 113
scComSAMLightClientCtrlLongValueTypeStepAndRepeatTotalSteps 114
scComSAMLightClientCtrlLongValueTypeStepAndRepeatPlanarMode 115
scComSAMLightClientCtrlLongValueTypeStepAndRepeatPlanarModeSimulation 116
scComSAMLightClientCtrlLongValueTypeStepAndRepeatFirstMoveAxis 117
scComSAMLightClientCtrlLongValueTypeStepAndRepeatSecondMoveAxis 118
scComSAMLightClientCtrlLongValueTypeStepAndRepeatPlanarStepCountX 119
scComSAMLightClientCtrlLongValueTypeStepAndRepeatPlanarStepCountY 120
scComSAMLightClientCtrlLongValueTypeEnableStepAndRepeat 121
scComSAMLightClientCtrlLongValueTypeEnableBackgroundImage 122
scComSAMLightClientCtrlLongValueTypeFirmwareStatus 123
Firmware newer than the current software state 0xFFFF
Firmware is up to date 0x0
Newer firmware is available 0x1
scComSAMLightClientCtrlLongValueTypeOptoOutInvert 124
scComSAMLightClientCtrlLongValueTypeSplitMode 125
scComSAMLightClientCtrlLongValueTypeSplitMarkLoop 126
scComSAMLightClientCtrlLongValueTypeSplitKeepMarkFlag 127
scComSAMLightClientCtrlLongValueTypeSplitDoNotRecalculateSplitLines 128
scComSAMLightClientCtrlLongValueTypeSplitCogOverlappedLines 129
scComSAMLightClientCtrlLongValueTypeSplitEntityBasedOnlyTopLevel 130
scComSAMLightClientCtrlLongValueTypeSplitEntityBasedOnlyTopLevelSortAccordingToStartBorder 131
scComSAMLightClientCtrlLongValueTypeSplitEntityBasedOnlyTopLevelUngroupWinTextChars2D 132
scComSAMLightClientCtrlLongValueTypeSplitAllowPreSort 133
scComSAMLightClientCtrlLongValueTypeSplitMotfEndlessRepeat 134
scComSAMLightClientCtrlLongValueTypeIsMarkDialogOpen 135
scComSAMLightClientCtrlLongValueTypeEnableExternStop 136
scComSAMLightClientCtrlLongValueTypeEnableImprovedBeamCompensation 137

© 2022 SCAPS GmbH


Client Control Interface Manual - List of Constants 279

Long Value Types

scComSAMLightClientCtrlLongValueTypeGetCameraCount 138
scComSAMLightClientCtrlLongValueTypeBackgroundImageFromFileUpdateInMs 139
scComSAMLightClientCtrlLongValueTypeBackgroundImage 140
scComSAMLightClientCtrlLongValueTypeImageFromFileUpdate 141
scComSAMLightClientCtrlLongValueTypeBackgroundImageCrop 142
Table 354: Long Value Types

15.3 String Value Types


String Value Types

Description: List of String Value Types used by StringValue functions.


Type: int ID
Location: ScComSAMLightClientCtrlValueTypes
scComSAMLightClientCtrlStringValueTypeRs232BaudRate 1
scComSAMLightClientCtrlStringValueTypeRs232OutputString 2
scComSAMLightClientCtrlStringValueTypeRs232Mode 3
scComSAMLightClientCtrlStringValueTypeJobFileName 4
scComSAMLightClientCtrlStringValueTypeSaveView2D160 6
scComSAMLightClientCtrlStringValueTypeSaveView2D320 7
scComSAMLightClientCtrlStringValueTypeSaveView2DVariableSize 8
scComSAMLightClientCtrlStringValueTypeSaveView2DFull 9
scComSAMLightClientCtrlStringValueTypeEntityNameAtTopLevel 10
scComSAMLightClientCtrlStringValueTypeMotionString 11
scComSAMLightClientCtrlStringValueTypeSaveView2DAdjustableDPI 12
scComSAMLightClientCtrlStringValueTypeCorrectionFile 13
scComSAMLightClientCtrlStringValueTypeGetLastErrorMessageInput 14
scComSAMLightClientCtrlStringValueTypeGetLastInfoMessageInput 15
scComSAMLightClientCtrlStringValueTypeEntityNamesWithType 16
scComSAMLightClientCtrlStringValueTypeSetToTopLevelEntity 17
scComSAMLightClientCtrlStringValueTypeAsyncModeResult 18
scComSAMLightClientCtrlStringValueTypeStringPara1 19
scComSAMLightClientCtrlStringValueTypeStringPara2 20
scComSAMLightClientCtrlStringValueTypeSaveSplitsJobFileName 21
scComSAMLightClientCtrlStringValueTypeCurrentPenName 22
scComSAMLightClientCtrlStringValueTypeCorrectionFileHead2 23
scComSAMLightClientCtrlStringValueTypeSaveLayerAdjustableDPI 24
scComSAMLightClientCtrlStringValueTypeSaveView3DVariableSize 25
scComSAMLightClientCtrlStringValueTypeSaveView3DFull 26
scComSAMLightClientCtrlStringValueTypeBmpAlphaBlendPathBmp 27
scComSAMLightClientCtrlStringValueTypePenPixelMap 28

© 2022 SCAPS GmbH


Client Control Interface Manual - List of Constants 280

String Value Types

scComSAMLightClientCtrlStringValueTypeCorrectionFileLcf 29
scComSAMLightClientCtrlStringValueTypeCorrectionFileLcfLensInit 30
scComSAMLightClientCtrlStringValueTypeTrail 31
scComSAMLightClientCtrlStringValueTypeLoadStl 32
scComSAMLightClientCtrlStringValueTypeCurrentUserName 33
scComSAMLightClientCtrlStringValueTypeLanguage 34
scComSAMLightClientCtrlStringValueTypeEntityNamesWithTypeAsInSAMLight 35
scComSAMLightClientCtrlStringValueTypeCreateEntity 36
scComSAMLightClientCtrlStringValueTypeGroupingName 37
scComSAMLightClientCtrlStringValueTypeLoginUserAndPassword 38
scComSAMLightClientCtrlStringValueTypeControlCmdCW300 50
scComSAMLightClientCtrlStringValueTypeUserValue 20000
scComSAMLightClientCtrlStringValueTypeCameraName 40000-40099
Table 355: String Value Types

15.4 Double Data ID


Double Data ID

Description: List of String Data IDs used by EntityDoubleData functions.


Constant ID
Location: ScComSAMLightClientCtrlFlags
ScSetEntityDoubleData() -
scComSAMLightClientCtrlDoubleDataIdFlagDontUpdateView 0x10000
scComSAMLightClientCtrlDoubleDataIdFlagDontUpdateEntity 0x20000
scComSAMLightClientCtrlDoubleDataIdFlagToplevelOnly 0x40000
scComSAMLightClientCtrlDoubleDataIdTextSize 1
scComSAMLightClientCtrlDoubleDataIdTextCharSpacing 2
scComSAMLightClientCtrlDoubleDataIdTextLengthLimit 3
scComSAMLightClientCtrlDoubleDataIdTextHeightLimit 4
scComSAMLightClientCtrlDoubleDataIdTextRadius 5
scComSAMLightClientCtrlDoubleDataIdTextStartAngle 6
scComSAMLightClientCtrlDoubleDataIdTextPointResolution 7
scComSAMLightClientCtrlDoubleDataIdTextBaseline 8
scComSAMLightClientCtrlDoubleDataIdTextRadialCenterX 9
scComSAMLightClientCtrlDoubleDataIdTextRadialCenterY 10
scComSAMLightClientCtrlDoubleDataIdTextLineSpacing 11
scComSAMLightClientCtrlDoubleDataIdBitmapIntensity 33
scComSAMLightClientCtrlDoubleDataIdBitmapBrightness 34
scComSAMLightClientCtrlDoubleDataIdBitmapDitherstep 35
scComSAMLightClientCtrlDoubleDataIdTextOrientation 36

© 2022 SCAPS GmbH


Client Control Interface Manual - List of Constants 281

Double Data ID

scComSAMLightClientCtrlDoubleDataIdHatchDistance1 37
scComSAMLightClientCtrlDoubleDataIdHatchAngle1 38
scComSAMLightClientCtrlDoubleDataIdHatchMinjump1 39
scComSAMLightClientCtrlDoubleDataIdHatchStartoffset1 40
scComSAMLightClientCtrlDoubleDataIdHatchLinereduct1 41
scComSAMLightClientCtrlDoubleDataIdHatchEndoffset1 42
scComSAMLightClientCtrlDoubleDataIdHatchBeamcompensation1 43
scComSAMLightClientCtrlDoubleDataIdHatchNumloops1 44
scComSAMLightClientCtrlDoubleDataIdHatchDistance2 45
scComSAMLightClientCtrlDoubleDataIdHatchAngle2 46
scComSAMLightClientCtrlDoubleDataIdHatchMinjump2 47
scComSAMLightClientCtrlDoubleDataIdHatchStartoffset2 48
scComSAMLightClientCtrlDoubleDataIdHatchLinereduct2 49
scComSAMLightClientCtrlDoubleDataIdHatchEndoffset2 50
scComSAMLightClientCtrlDoubleDataIdHatchBeamcompensation2 51
scComSAMLightClientCtrlDoubleDataIdHatchNumloops2 52
scComSAMLightClientCtrlDoubleDataIdBarcodeLinereduction 69
scComSAMLightClientCtrlDoubleDataIdMotfOffset 70
scComSAMLightClientCtrlDoubleDataIdEntityRotationAngle 71
scComSAMLightClientCtrlDoubleDataIdDataMatrixCellSizeX 72
scComSAMLightClientCtrlDoubleDataIdDataMatrixCellSizeY 73
scComSAMLightClientCtrlDoubleDataIdSpiral2DInnerRadius 74
scComSAMLightClientCtrlDoubleDataIdSpiral2DOuterRadius 75
scComSAMLightClientCtrlDoubleDataIdSpiral2DRise 76
scComSAMLightClientCtrlDoubleDataIdEllipse2DRadiusX 77
scComSAMLightClientCtrlDoubleDataIdEllipse2DRadiusY 78
scComSAMLightClientCtrlDoubleDataIdEllipse2DCenterX 79
scComSAMLightClientCtrlDoubleDataIdEllipse2DCenterY 80
scComSAMLightClientCtrlDoubleDataIdDataMatrixQuietZoneX 81
scComSAMLightClientCtrlDoubleDataIdDataMatrixQuietZoneY 82
scComSAMLightClientCtrlDoubleDataIdHatchPointOffset1 83
scComSAMLightClientCtrlDoubleDataIdHatchMinLength1 84
scComSAMLightClientCtrlDoubleDataIdHatchPointOffset2 85
scComSAMLightClientCtrlDoubleDataIdHatchMinLength2 86
ScComSAMLightClientCtrlDoubleDataIdDataMatrixDistanceBetweenDots 87
ScComSAMLightClientCtrlDoubleDataIdSecondaryHeadTransformationOffsetX 88
ScComSAMLightClientCtrlDoubleDataIdSecondaryHeadTransformationOffsetY 89
ScComSAMLightClientCtrlDoubleDataIdSecondaryHeadTransformationScaleX 90
ScComSAMLightClientCtrlDoubleDataIdSecondaryHeadTransformationScaleY 91
ScComSAMLightClientCtrlDoubleDataIdSecondaryHeadTransformationRotation 92
ScComSAMLightClientCtrlDoubleDataIdHatchLineIndexStep1 93

© 2022 SCAPS GmbH


Client Control Interface Manual - List of Constants 282

Double Data ID

ScComSAMLightClientCtrlDoubleDataIdHatchLineIndexStep2 94
scComSAMLightClientCtrlDoubleDataIdHatchVarAngle1 95
scComSAMLightClientCtrlDoubleDataIdHatchVarAngle2 96
ScComSAMLightClientCtrlDoubleDataIdGetMotionCtrlPos 97
ScComSAMLIghtClientCtrlDoubleDataIdEllipse2DSegmentCount 98
scComSAMLightClientCtrlDoubleDataIdHatchLoopAngle1 99
scComSAMLightClientCtrlDoubleDataIdHatchLoopAngle2 100
scComSAMLightClientCtrlDoubleDataIdHatchLayerSolidUpDownSkinBeamComp 101
scComSAMLightClientCtrlDoubleDataIdHatchLayerSolidMinUpSkinArea 102
scComSAMLightClientCtrlDoubleDataIdHatchLayerSolidMinDownSkinArea 103
scComSAMLightClientCtrlDoubleDataIdHatchLayerSolidReduceUp 104
scComSAMLightClientCtrlDoubleDataIdHatchLayerSolidReduceDown 105
Table 356: Double Data ID

15.5 Long Data ID


Long Data ID

Description: List of String Data IDs used by EntityLongData functions.


Type: int ID
Location: ScComSAMLightClientCtrlFlags
scComSAMLightClientCtrlLongDataIdFlagDontUpdateView 0x10000 -
scComSAMLightClientCtrlLongDataIdFlagDontUpdateEntity 0x20000
scComSAMLightClientCtrlLongDataIdFlagToplevelOnly 0x200000
scComSAMLightClientCtrlLongDataIdFlagEnqueueCtrlCmd 0x80000
scComSAMLightClientCtrlLongDataIdFlagEnqueueLastCtrlCmd 0x100000
scComSAMLightClientCtrlLongDataIdUserData 1
scComSAMLightClientCtrlLongDataIdTextAlignment 2
scComSAMLightClientCtrlTextAlignmentCenter 0x1
scComSAMLightClientCtrlTextAlignmentLeft 0x2
scComSAMLightClientCtrlTextAlignmentRight 0x4
scComSAMLightClientCtrlTextAlignmentTop 0x8
scComSAMLightClientCtrlTextAlignmentBottom 0x10
scComSAMLightClientCtrlTextAlignmentMiddle 0x20
scComSAMLightClientCtrlTextAlignmentRadialCenter 0x40
scComSAMLightClientCtrlTextAlignmentRadialEnd 0x80
scComSAMLightClientCtrlTextAlignmentLineLeft 0x100
scComSAMLightClientCtrlTextAlignmentLineRight 0x200
scComSAMLightClientCtrlTextAlignmentLineCenter 0x400
scComSAMLightClientCtrlLongDataIdEntitySelected 3
scComSAMLightClientCtrlLongDataIdEntityArrayCountX 4

© 2022 SCAPS GmbH


Client Control Interface Manual - List of Constants 283

Long Data ID

scComSAMLightClientCtrlLongDataIdEntityArrayCountY 5
scComSAMLightClientCtrlLongDataIdEntityArrayStepX 6
scComSAMLightClientCtrlLongDataIdEntityArrayStepY 7
scComSAMLightClientCtrlLongDataIdEntityArrayOrderFlags 8
scComSAMLightClientCtrlEntityArrayOrderFlagNegX 0x100
scComSAMLightClientCtrlEntityArrayOrderFlagNegY 0x200
scComSAMLightClientCtrlEntityArrayOrderFlagMainDirX 0x400
scComSAMLightClientCtrlEntityArrayOrderFlagBiDir 0x800
scComSAMLightClientCtrlLongDataIdTextCharFlags 9
ScComSAMLightClientCtrlLongDataIdTextCharFlagMonoSpaced 0x3
scComSAMLightClientCtrlLongDataIdTextCharFlagItalic 0x10000
scComSAMLightClientCtrlLongDataIdTextCharFlagRadial 0x20000
scComSAMLightClientCtrlLongDataIdTextCharFlagRadialAlignToCharOutline 0x40000
scComSAMLightClientCtrlLongDataIdTextCharFlagReverseOrder 0x80000
scComSAMLightClientCtrlLongDataIdTextCharFlagMirrorCharOnXAxis 0x100000
scComSAMLightClientCtrlLongDataIdTextCharFlagMirrorCharOnYAxis 0x200000
scComSAMLightClientCtrlLongDataIdTextCharFlagSwapLines 0x400000
scComSAMLightClientCtrlLongDataIdTextCharFlagSetToLimitLength 0x800000
scComSAMLightClientCtrlLongDataIdTextCharFlagSetToLimitHeight 0x100000
0
scComSAMLightClientCtrlLongDataIdTextCharFlagSetToLimitKeepAspect 0x200000
0
scComSAMLightClientCtrlLongDataIdTextCharFlagOrderXDown 0x400000
0
scComSAMLightClientCtrlLongDataIdTextCharFlagOrderYUp 0x800000
0
scComSAMLightClientCtrlLongDataIdTextCharFlagOrderYMainUp 0x10000000

scComSAMLightClientCtrlLongDataIdTextCharFlagOrderBiDir 0x20000000

scComSAMLightClientCtrlLongDataIdTextCharFlagRadialCenterMode 0x40000000

scComSAMLightClientCtrlLongDataIdTextFontAvailable 10
scComSAMLightClientCtrlLongDataIdBitmapMode 49
scComSAMLightClientCtrlLongDataIdBitmapModeInvert 0x1
scComSAMLightClientCtrlLongDataIdBitmapModeGreyscale 0x2
scComSAMLightClientCtrlLongDataIdBitmapModeDrillmode 0x4
scComSAMLightClientCtrlLongDataIdBitmapModeBidirectional 0x8
scComSAMLightClientCtrlLongDataIdBitmapModeStartlastline 0x10
scComSAMLightClientCtrlLongDataIdBitmapModeNolineincr 0x20
scComSAMLightClientCtrlLongDataIdBitmapModeShowBitmap 0x100
scComSAMLightClientCtrlLongDataIdBitmapModeShowScanner 0x200
scComSAMLightClientCtrlLongDataIdBitmapModeScanXDir 0x400
scComSAMLightClientCtrlLongDataIdBitmapModePenFrequency 0x800
scComSAMLightClientCtrlLongDataIdBitmapModeJumpOverBlankPixels 0x1000
scComSAMLightClientCtrlLongDataIdBitmapModeDrillGreyscale 0x2000

© 2022 SCAPS GmbH


Client Control Interface Manual - List of Constants 284

Long Data ID

scComSAMLightClientCtrlLongDataIdTextWeight 50
scComCharWeightThin 0x64
scComCharWeightExtraLight 0xC8
scComCharWeightLight 0x12C
scComCharWeightNormal 0x190
scComCharWeightMedium 0x1F1
scComCharWeightSemiBold 0x258
scComCharWeightBold 0x2BC
scComCharWeightExtraBold 0x320
scComCharWeightHeavy 0x384
scComSAMLightClientCtrlLongDataIdEnableHatching1 51
scComSAMLightClientCtrlLongDataIdEnableHatching2 52
scComSAMLightClientCtrlLongDataIdEntityMarkLoopCount 55
scComSAMLightClientCtrlLongDataIdEntityMarkBeatCount 56
scComSAMLightClientCtrlLongDataIdEntityMarkStartCount 57
scComSAMLightClientCtrlLongDataIdEntityMarkFlags 58
scComSAMLightClientCtrlLongDataIdEntityMarkFlagMarkContour 0x1
scComSAMLightClientCtrlLongDataIdEntityMarkFlagMarkHatch 0x2
scComSAMLightClientCtrlLongDataIdEntitySetPen 60
scComSAMLightClientCtrlLongDataIdEntitySetTimerValue 61
scComSAMLightClientCtrlLongDataIdEntitySetInOutValue 62
scComSAMLightClientCtrlLongDataIdEntitySetOutputPulse 64
scComSAMLightClientCtrlLongDataIdEntitySetInOutLevel 65
scComSAMLightClientCtrlLongDataIdEntityGetTimerValue 66
scComSAMLightClientCtrlLongDataIdEntityGetInOutValue 67
scComSAMLightClientCtrlLongDataIdEntityGetOutputPulse 69
scComSAMLightClientCtrlLongDataIdEntityGetInOutLevel 70
scComSAMLightClientCtrlLongDataIdEntitySerialStartValue 71
scComSAMLightClientCtrlLongDataIdEntitySerialIncrValue 72
scComSAMLightClientCtrlLongDataIdEntitySerialCurrValue 73
scComSAMLightClientCtrlLongDataIdEntityGetPen 74
scComSAMLightClientCtrlLongDataIdEntityOpticFlags 75
scComSAMLightClientCtrlLongDataIdEntityOpticFlagContour 0x1
scComSAMLightClientCtrlLongDataIdEntityOpticFlagHatch 0x2
scComSAMLightClientCtrlLongDataIdEntitySplittable 76
scComSAMLightClientCtrlLongDataIdEntitySerialNumLines 77
scComSAMLightClientCtrlLongDataIdEntitySetAsBackgroundEntity 78
scComSAMLightClientCtrlLongDataIdEntitySerialBeatCount 79
scComSAMLightClientCtrlLongDataIdEntitySerialResetCount 80
scComSAMLightClientCtrlLongDataIdSetHatchFlags1 81
scComSAMLightClientCtrlLongDataIdSetHatchFlags2 82

© 2022 SCAPS GmbH


Client Control Interface Manual - List of Constants 285

Long Data ID

scComSAMLightClientCtrlLongDataIdClearHatchFlags1 91
scComSAMLightClientCtrlLongDataIdClearHatchFlags2 92
scComSAMLightClientCtrlLongDataIdHatchFlagNoSort 0x100
scComSAMLightClientCtrlLongDataIdHatchFlagAllLines 0x400
scComSAMLightClientCtrlLongDataIdHatchFlagPolyLineBeamComp 0x2000
scComSAMLightClientCtrlLongDataIdHatchFlagDontFillRest 0x4000
scComSAMLightClientCtrlLongDataIdHatchFlagKeepAngle 0x80000
scComSAMLightClientCtrlLongDataIdHatchFlagEqualizeDistance 0x100000
0
scComSAMLightClientCtrlLongDataIdHatchFlagBeamCompLoopReverseOrder 0x200000
0
scComSAMLightClientCtrlLongDataIdBarcodeSetFlags 101
scComSAMLightClientCtrlLongDataIdBarcodeClearFlags 102
scComSAMLightClientCtrlLongDataIdBarcodeFlagVariableLength 0x1
scComSAMLightClientCtrlLongDataIdBarcodeFlagInvert 0x2
scComSAMLightClientCtrlLongDataIdBarcodeFlagDisableAutoQuietZone 0x4
scComSAMLightClientCtrlLongDataIdBarcodeFlagQuietZoneAbsolute 0x8
scComSAMLightClientCtrlLongDataIdBarcodeFlagGenerateCheckCode 0x10
scComSAMLightClientCtrlLongDataIdBarcodeFlagInvertExceptText 0x20
scComSAMLightClientCtrlLongDataIdBarcodeFlagInvertCellMode 0x40
scComSAMLightClientCtrlLongDataIdBarcodeFlagCompactMode 0x80
scComSAMLightClientCtrlLongDataIdDataMatrixSetSymbolMode 103
scComSAMLightClientCtrlLongDataIdDataMatrixClearSymbolMode 104
scComSAMLightClientCtrlLongDataIdDataMatrixExSymbolModeRectangle 0x1
scComSAMLightClientCtrlLongDataIdDataMatrixExSymbolModeAutoSize 0x10000
scComSAMLightClientCtrlLongDataIdDataMatrixExSymbolModeAutoEncodatio 0x20000
n
scComSAMLightClientCtrlLongDataIdDataMatrixExSymbolModeDots 0x40000
scComSAMLightClientCtrlLongDataIdDataMatrixExSymbolModeTilde 0x80000
scComSAMLightClientCtrlLongDataIdDataMatrixExSymbolModeCells 0x100000
scComSAMLightClientCtrlLongDataIdDataMatrixExSymbolModeNoFinderCells 0x200000
scComSAMLightClientCtrlLongDataIdDataMatrixExSymbolModeEllipse 0x400000
scComSAMLightClientCtrlLongDataIdDataMatrixExSymbolModeTextFreelyEdita 0x800000
ble
scComSAMLightClientCtrlLongDataIdDataMatrixSymbolSize 105
scComSAMLightClientCtrlLongDataIdDataMatrixEncoding 106
scComSAMLightClientCtrlLongDataIdDataMatrixExEncodationAscii 0x1
scComSAMLightClientCtrlLongDataIdDataMatrixExEncodationBase256 0x2
scComSAMLightClientCtrlLongDataIdDataMatrixExEncodationC40 0x3
scComSAMLightClientCtrlLongDataIdDataMatrixExEncodationText 0x4
scComSAMLightClientCtrlLongDataIdDataMatrixExEncodationAnsiX12 0x5
scComSAMLightClientCtrlLongDataIdDataMatrixExEncodationEdifact 0x6
scComSAMLightClientCtrlLongDataIdDataBarcodeTextEnable 107

© 2022 SCAPS GmbH


Client Control Interface Manual - List of Constants 286

Long Data ID

scComSAMLightClientCtrlLongDataIdDataBarcodeLevel 108
scComSAMLightClientCtrlLongDataIdDataBarcodeMode 109
scComSAMLightClientCtrlLongDataIdDataBarcodeSize 110
scComSAMLightClientCtrlLongDataIdEntityLayerCount 111
scComSAMLightClientCtrlLongDataIdEntitySetAsHiddenEntity 112
scComSAMLightClientCtrlLongDataIdSpiralNumInnerRotations 113
scComSAMLightClientCtrlLongDataIdSpiralNumOuterRotations 114
scComSAMLightClientCtrlLongDataIdSpiralNumOuterSegments 115
scComSAMLightClientCtrlLongDataIdSpiralFlags 116
Clockwise 0x1
Start from Outer 0x2
Set Return Path 0x4
scComSAMLightClientCtrlLongDataIdEntitySerialNumModesFlags 117
scComSerialNumber2DModeText 0x1
scComSerialNumber2DModeBarCode 0x2
scComSerialNumber2DModeASCIIFile 0x4
scComSerialNumber2DModeDateTime 0x8
scComSerialNumber2DModeCustomFormat 0x10
scComSAMLightClientCtrlLongDataIdEntityGroupPenPaths 118
scComSAMLightClientCtrlLongDataIdEntityGroupCluster 119
scComSAMLightClientCtrlLongDataIdEntityMirrorOnPlane 120
scComSAMLightClientCtrlLongDataIdEntityOutputAsBitmap 121
scComSAMLightClientCtrlLongDataIdBitmapBlankThreshold 122
scComSAMLightClientCtrlLongDataIdBitmapLineIndexStep 123
scComSAMLightClientCtrlLongDataIdDataMatrixNumberOfDots 124
scComSAMLightClientCtrlLongDataIdEntityGenerate 125
scComSAMLightClientCtrlLongDataIdEnableControl 126
scComSAMLightClientCtrlLongDataIdQrCodeExSetMode 127
scComSAMLightClientCtrlLongDataIdQrCodeExClearMode 128
scComSAMLightClientCtrlLongDataIdQrCodeExModeDots 0x1
scComSAMLightClientCtrlLongDataIdQrCodeExModeCells 0x100000
scComSAMLightClientCtrlLongDataIdQrCodeExModeTextFreelyEditable 0x800000
scComSAMLightClientCtrlLongDataIdEntityCenter 129
scComSAMLightClientCtrlLongDataIdEntityChangeable 130
scComSAMLightClientCtrlLongDataIdEntityRedpointer 131
scComSAMLightClientCtrlLongDataIdEntityJump 132
scComSAMLightClientCtrlLongDataIdEntitySetToDefaultHatchPair 133
scComSAMLightClientCtrlLongDataIdHatchLoop1 134
scComSAMLightClientCtrlLongDataIdHatchLoop2 135
scComSAMLightClientCtrlLongDataIdHatchLayerSolidNumLoops 136
scComSAMLightClientCtrlLongDataIdHatchLayerSolidPointOffset 137

© 2022 SCAPS GmbH


Client Control Interface Manual - List of Constants 287

Long Data ID

scComSAMLightClientCtrlLongDataIdBarcodeFlagsHigh 138
scComSAMLightClientCtrlLongDataIdBarcodeFlagsHighLimitLength 0x1
scComSAMLightClientCtrlLongDataIdBarcodeFlagsHighLimitHeight 0x2
scComSAMLightClientCtrlLongDataIdBarcodeFlagsHighKeepAspect 0x4
scComSAMLightClientCtrlLongDataIdBarcodeFlagsHigh 0x8A
scComSAMLightClientCtrlLongDataIdHatchLayerSolidBeamCompOutToIn 139
scComSAMLightClientCtrlLongDataIdEntityNonMarkableEntity 140
scComSAMLightClientCtrlLongDataIdEntityNonEditableEntity 141
scComSAMLightClientCtrlLongDataIdEntityNonSplittablePre 142
scComSAMLightClientCtrlLongDataIdEntityNonSplittablePost 143
scComSAMLightClientCtrlLongDataIdUseMMForSpacing 144
scComSAMLightClientCtrlLongDataIdUseMMforLineSpacing 145
scComSAMLightClientCtrlLongDataIdEntityIoControlObjectMask 146
scComSAMLightClientCtrlLongDataIdEntityIoControlObjectStates 147
Table 357: Long Data ID

15.6 String Data ID


Entity String Data ID

Description: List of String Data IDs used by EntityStringData.


Type: int ID
Location: ScComSAMLightClientCtrlFlags
scComSAMLightClientCtrlStringDataIdFlagDontUpdateView 0x10000 -
scComSAMLightClientCtrlStringDataIdFlagDontUpdateEntity 0x20000
scComSAMLightClientCtrlStringDataIdFlagToplevelOnly 0x200000
scComSAMLightClientCtrlStringDataIdTextFontName 1
scComSAMLightClientCtrlStringDataIdTextText 2
scComSAMLightClientCtrlStringDataIdGetToplevelEntity 17
scComSAMLightClientCtrlStringDataIdFindEntityWithText 18
scComSAMLightClientCtrlStringDataIdSetBarcodeType 19
scComSAMLightClientCtrlStringDataIdGetBarcodeType 20
scComSAMLightClientCtrlStringDataIdGetEntityName 21
scComSAMLightClientCtrlStringDataIdGetEntityType 22
scComSAMLightClientCtrlStringDataIdSetEntityName 23
scComSAMLightClientCtrlStringDataIdEntitySerialASCIIFileName or 24
scComSAMLightClientCtrlStringDataIdEntitySerialExcelFileName
scComSAMLightClientCtrlStringDataIdSetToplevelEntity 25
scComSAMLightClientCtrlStringDataIdSetMotionCtrls 26
scComSAMLightClientCtrlStringDataIdSerialNumberFormatString 27
scComSAMLightClientCtrlStringDataIdArrayCopyHard 28

© 2022 SCAPS GmbH


Client Control Interface Manual - List of Constants 288

Entity String Data ID

scComSAMLightClientCtrlStringDataIdTranslate 29
scComSAMLightClientCtrlStringDataIdRotate 30
scComSAMLightClientCtrlStringDataIdOutlineAndRotate 31
scComSAMLightClientCtrlStringDataIdBarCodeFormatString 32
scComSAMLightClientCtrlStringDataIdSetMotionCtrlsString 33
scComSAMLightClientCtrlStringDataIdSpecialPenAndMore 34
scComSAMLightClientCtrlStringDataIdExportScannerBmp 36
Table 358: Entity String Data ID

ID String Data ID

Description: List of String Data IDs used by IDStringData.


Type: int ID
Location: ScComSAMLightClientCtrlFlags
scComSAMLightClientCtrlStringDataIdGetEntityName 21
scComSAMLightClientCtrlStringDataIdGetEntityType 22
scComSAMLightClientCtrlStringDataIdSetEntityName 23
scComSAMLightClientCtrlStringDataIdGetEntityTypeAsInSAMLight 35
Table 359: ID String Data ID

15.7 Cmd ID
Cmd ID

Description: List of Cmd IDs used by the Exec Command function.


Type: int ID
Location: ScComSAMLightClientCtrlExecCommandConstants
scComSAMLightClientCtrlExecCommandTest 1
scComSAMLightClientCtrlExecCommandResetSequence 2
scComSAMLightClientCtrlExecCommandNewJob 3
scComSAMLightClientCtrlExecCommandFitViewToWorkingArea 4
scComSAMLightClientCtrlExecCommandFitViewToAllEntities 5
scComSAMLightClientCtrlExecCommandFitViewToSelectedEntities 6
scComSAMLightClientCtrlExecCommandResetCounter 7
scComSAMLightClientCtrlExecCommandResetSerialNumber 8
scComSAMLightClientCtrlExecCommandUpdateScannerPos 9
scComSAMLightClientCtrlExecCommandAutoCompensateOff 10
scComSAMLightClientCtrlExecCommandAutoCompensateRef 11
scComSAMLightClientCtrlExecCommandAutoCompensateCal 12
scComSAMLightClientCtrlExecCommandResplitJob 13
scComSAMLightClientCtrlExecCommandMotionStopMove 14
scComSAMLightClientCtrlExecCommandMotionHome 15

© 2022 SCAPS GmbH


Client Control Interface Manual - List of Constants 289

Cmd ID

scComSAMLightClientCtrlExecCommandMotionGo 16
scComSAMLightClientCtrlExecCommandMotionSendString 17
scComSAMLightClientCtrlExecCommandMotionUpdatePos 18
scComSAMLightClientCtrlExecCommandStopExecution 19
scComSAMLightClientCtrlExecCommandRedPointerStart 20
scComSAMLightClientCtrlExecCommandRedPointerStop 21
scComSAMLightClientCtrlExecCommandUpdateViewNow 22
scComSAMLightClientCtrlExecCommandIncSerialNumber 23
scComSAMLightClientCtrlExecCommandDecSerialNumber 24
scComSAMLightClientCtrlExecCommandView3DViewIso 26
scComSAMLightClientCtrlExecCommandRehatchAll 28
scComSAMLightClientCtrlExecCommandWizardCreateSinglePenGroup 29
scComSAMLightClientCtrlExecCommandSaveSplitsAsOrigEntities 30
scComSAMLightClientCtrlExecCommandWizardDataReductionRedundantPoints 31
scComSAMLightClientCtrlExecCommandCreateBeamCompedCopy 37
scComSAMLightClientCtrlExecCommandSaveSplitsAsEntities 38
scComSAMLightClientCtrlExecCommandCheckIfJobIsInField 40
scComSAMLightClientCtrlExecCommandExitTriggerMode 41
scComSAMLightClientCtrlExecCommandWizardDataReductionShortLines 42
scComSAMLightClientCtrlExecCommandWizardClipper 43
scComSAMLightClientCtrlExecCommandDisableSplit 44
scComSAMLightClientCtrlExecCommandSetMotfFixed 45
scComSAMLightClientCtrlExecCommandSetMotfBmp 46
scComSAMLightClientCtrlExecCommandLogout 47
scComSAMLightClientCtrlExecCommandOpenMarkDialog 48
scComSAMLightClientCtrlExecCommandCloseMarkDialog 49
scComSAMLightClientCtrlExecCommandCorrectSamLight 50
scComSAMLightClientCtrlExecCommandSaveSettingsNow 51
scComSAMLightClientCtrlExecCommandSortJobByName 52
scComSAMLightClientCtrlExecCommandSetMotf 53
scComSAMLightClientCtrlExecCommandUndo 54
scComSAMLightClientCtrlExecCommandWizardOrder 55
scComSAMLightClientCtrlExecCommandWizardCreateOneGroup 57
scComSAMLightClientCtrlExecCommandStoreFlashSettings 58
scComSAMLightClientCtrlExecCommandGroupEntities 59
scComSAMLightClientCtrlExecCommandUngroupEntities 60
scComSAMLightClientCtrlExecCommandWizardClosePolylines 61
scComSAMLightClientCtrlExecCommandWizardOptimizeJumps 62
scComSAMLightClientCtrlExecCommandWizardCreatePenGroups 63
scComSAMLightClientCtrlExecCommandLoadHeadFromUSC3 64
scComSAMLightClientCtrlExecCommandAddPointToCreateEntityPolyline 65

© 2022 SCAPS GmbH


Client Control Interface Manual - List of Constants 290

Cmd ID

scComSAMLightClientCtrlExecCommandAddPolylineToCreateEntityPolyline 66
scComSAMLightClientCtrlExecCommandAutosplitOn 67
scComSAMLightClientCtrlExecCommandAutosplitOff 68
scComSAMLightClientCtrlExecCommandDoAutosplit 69
scComSAMLightClientCtrlExecCommandSetCrop 70
scComSAMLightClientCtrlExecCommandSetBackgroundPoints 71
scComSAMLightClientCtrlExecCommandGetCrop 72
scComSAMLightClientCtrlExecCommandGetBackgroundPoints 73
Table 360: Cmd ID

16 Implementation
In general, CCI can be used with any programming environment of your choice. SAMLight offers three
interfaces for remote control which differ in the configuration, communication and return value handling.

Always configure the remote settings in SAMLight (Settings - System - Remote) for the desired interface
(local function calls, remote TCP or remote ASCII) first. Then, proceed as follows depending on your chosen
interface.

1. OCX
a. Initialize COM
b. Instantiate ActiveX control SCAPS.ScSamlightClientCtrl (as needed by your chosen language)
c. (Optional) connect via ScOpenTCPConnection
d. Call desired functions
2. Plain COM
a. Initialize COM
b. Create instance of SCAPS.ScSamlightClientCtrlEx object
c. (Optional) connect via ScOpenTCPConnection
d. Call desired functions
3. ASCII
a. Connect to configured IP and Port
b. Send commands in the configured codepage, with correct end character
c. Wait for end character in return data, interpret return string

Please find examples for OCX integration in Microsoft Visual Studio and for plain COM integration in
Microsoft Visual Studio in the next chapters.
Further information on end characters for ASCII is also given.

16.1 OCX (ActiveX)


Figure 1 illustrates how to use SCAPS.ScSamlightClientCtrl with Microsoft Visual Studio: This SAMLight
Client Control implementation is simply linked via drag and drop of the SAMLight Client Control ocx onto the
form of the SAMLight Client Control application.
Please start at the Toolbox at the right hand side and follow the red arrows.

© 2022 SCAPS GmbH


Client Control Interface Manual - Implementation 291

Figure 1: CCI OCX implementation for C# in Microsoft Visual Studio

The possible return values of the SAMLight Client Control function calls are normally just 0 or 1, but can
also be a long, double or string value.

OCX CCI error Name Description


0 NOK Command did not work
1 OK Command did work
Table 361: OCX CCI function error return values

With the CCI command NewCciErrorReturn the extended error mode can be enabled. Possible function
error return values for more detailed error analysis are:

OCX CCI error Name Description


-10000 IDispatch error #17 no named entity found
-10001 IDispatch error #18 job is empty
-10002 IDispatch error #19 function returned 0 (not ok)
-10003 IDispatch error #20 not allowed in 3D mode
-10004 IDispatch error #22 no valid license
-10006 IDispatch error #24 object out of field
Table 362: OCX CCI function extended error return values

© 2022 SCAPS GmbH


Client Control Interface Manual - Implementation 292

Note on versions: sc_samlight_client_ctrl.ocx, since installer 3.3.5 Build 232 to 3.4.5 Build 148 also a 64 bit
version is available: sc_samlight_client_ctrl_x64.ocx. Because of a 8.3 filename convention problem with
sc_samlight_client_ctrl.ocx the name of the 64 bit version was changed to sc_x64_samlight_client_ctrl.ocx
with installer 3.4.5 Build 149.

16.2 COM (CCI Ex)


For the COM (CCI Ex) Mode, there will be no CCI_Return for set and get functions. The only return
are hresults in the case of any exceptions. If the return is needed we recommend to use the OCX
mode.

Figure 2 illustrates how to use SCAPS.ScSamlightClientCtrlEx with Microsoft Visual Studio: SAMLight Client
Control Ex is added via Reference.
The SAMLight Client Control Ex interface uses the same SAMLight Client Control commands and constants
but offers a more detailed error return value for each command.
Please start at the References at the left side and follow the red arrows.

Figure 2: CCI COM implementation for C# in Microsoft Visual Studio

The possible HRESULT function error return values for more detailed error analysis are:
COM CCI HRESULT Name Description
0x80040200 Unknown error please inform SCAPS by e-mail: [email protected]

© 2022 SCAPS GmbH


Client Control Interface Manual - Implementation 293

COM CCI HRESULT Name Description


0x80040201 IDispatch error #1 an event could not call a subscriber: Samlight unavailable
0x80040202 IDispatch error #2 tcp timed out
0x80040211 IDispatch error #17 no named entity found
0x80040212 IDispatch error #18 job is empty
0x80040213 IDispatch error #19 function returned 0 ( not ok )
0x80040214 IDispatch error #20 not allowed in 3D mode
0x80040215 IDispatch error #21 no outline because entities are empty
0x80040216 IDispatch error #22 no valid license
Table 363: COM CCI HRESULT function error return values

Under C#, if one of these HRESULT are returned by a ScSamlightClientCtrlEx function, the C# RCW
(runtime callable wrapper) of the function converts this error (facility ITF) into a corresponding .Net COM
Exception, containing the information above.
CCI COM cannot be used in combination with TCP ASCII Communication Mode.
Note on versions: SAMLight Client Control Ex with Ex for Extended, included since installer 3.5.5 Build
0002: 32 bit version sc_ex_samlight_client_ctrl.dll and 64 bit version sc_ex64_samlight_client_ctrl.dll.

16.3 ASCII (plain text)


ASCII character Name Dec Hex Description
<LF> Line Feed 10 0A The end character is the <LF> character. Example:
(one character) · Cmd to SAMLight: ScCciShowApp(1)<LF>

· Return from SAMLight: 1<LF>


, Comma 44 2C Commas are used as separator between
parameters. Example:
ScCciGetEntityStringData("a", 2)<LF>
" Quotation Mark 34 22 Strings must be enclosed by Quotation Marks. A
Quotation Mark in a string must be escaped by an
other Quotation Mark. Example:
ScCciSetEntityStringData("a", 2, "She said,
""Yes""!"<LF>
. Full Stop 46 2E Full Stop is used as decimal separator.
Example: ScCciRotateEntity(string "a", 0.0, 0.0,
12.733)<LF>
\n Backslash + n 92 110 5C 6E Sending \n as text in a non path string parameter to
(as text, two chars) SAMLight will be replaced with <LF>. Example:
ScCciSetEntityStringData("a", 2, "first
line\r\nsecond line")<LF>
\r Backslash + r 92 114 5C 72 Sending \r as text in a non path string parameter to
(as text, two chars) SAMLight will be replaced with <CR>. Example:
ScCciSetEntityStringData("a", 2, "first
line\r\nsecond line")<LF>
Table 364: Control characters for ASCII CCI

ASCII CCI
Command to SAMLight Return from SAMLight
New line End of command New line End of return
\r\n [a] <LF> <CR><LF> [b] <LF>
Table 365: ASCII CCI new line, end of command and end of return control characters.

© 2022 SCAPS GmbH


Client Control Interface Manual - Implementation 294

[a]: \r\n as text, four ASCII chars: 0x5C 0x72 0x5C 0x6E
[b]: For ASCII CCI: It is possible to receive multi-line strings, but only if you wait a certain time until all lines
are received.

16.4 cci.
In our program examples we start our commands always via "cci.". But this is no default setup and has to be
defined in the MS Visual Studio.
During the Implementation (see OCX) you drag and drop the OCX library into the Studio Form1. If you
choose this object and open the properties dialog you can define as name cci.

Figure 3: cci. setup

© 2022 SCAPS GmbH


Client Control Interface Manual - Programming Examples 295

17 Programming Examples
17.1 Create beam-compensated Copy of Entity
The following examples shows how to create a beam compensated copy of an entity.

Create beam compensated copy of entity (ScWinTextChars2D)

//define the original entity from which the copy should be created
cci.ScSetStringValue( ( int )
ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlStringValueTypeStringPara1, "OriginalEntity" );

//define the entity for the copy


cci.ScSetStringValue( ( int )
ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlStringValueTypeStringPara2,"BeamCompedEntity" );

//define the distance parameter for the beam compensation itself


cci.ScSetDoubleValue( ( int )
ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlDoubleValueTypeDoublePara1, 0.1 );

//create the beam compensated copy of the original entity


cci.ScExecCommand( ( int )
ScComSAMLightClientCtrlExecCommandConstants.scComSAMLightClientCtrlExecCommandCreateBeamCompedCopy )
Table 366: Create beam compensated copy

17.2 Create screenshot of SAMLight View2D


The following examples shows how to create a screenshot of the Viewo2D in SAMLight.

Create screenshot of View2D

// set path here, for example Environment.GetFolderPath( Environment.SpecialFolder.Desktop );


string path =

// generating fixed size colored View2D screenshots with SAMLight Windows opened in background
cci.ScSetStringValue( ( int )
ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlStringValueTypeSaveView2D160, path + "\
\ScreenshotView2D160.bmp" );
cci.ScSetStringValue( ( int )
ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlStringValueTypeSaveView2D320, path + "\
\ScreenshotView2D320.bmp" );
cci.ScSetStringValue( ( int )
ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlStringValueTypeSaveView2DFull, path + "\
\ScreenshotView2DFull.bmp" );

// generating variable size colored View2D screenshot with SAMLight Windows opened in background
cci.ScSetDoubleValue( ( int )
ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlDoubleValueTypeSaveView2DBitmapVariableSi
ze, 640 ); // set bitmap size in pixel
cci.ScSetStringValue( ( int )
ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlStringValueTypeSaveView2DVariableSize,
path + "\\ScreenshotView2DVariableSiz.bmp" );

// generating black and white View2D screenshot with just SAMLight running background
cci.ScSetDoubleValue( ( int )
ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlDoubleValueTypeSaveView2DBitmapX, 0 ); //
set center in X (like View2D coordinate system)
cci.ScSetDoubleValue( ( int )
ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlDoubleValueTypeSaveView2DBitmapY, 0 ); //
set center in Y (like View2D coordinate system)
cci.ScSetDoubleValue( ( int )
ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlDoubleValueTypeSaveView2DBitmapXW,
10 ); // set size in X in mm (like View2D coordinate system)

© 2022 SCAPS GmbH


Client Control Interface Manual - Programming Examples 296

Create screenshot of View2D

cci.ScSetDoubleValue( ( int )
ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlDoubleValueTypeSaveView2DBitmapYW,
10 ); // set size in Y in mm (like View2D coordinate system)
cci.ScSetDoubleValue( ( int )
ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlDoubleValueTypeSaveView2DBitmapDPI,
200 ); // set bitmap resolution in DPI
cci.ScSetLongValue( ( int )
ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlLongValueTypeSaveView2DBitmapMode,
0 ); // 0: lines and pixels are drawn normal
cci.ScSetStringValue( ( int )
ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlStringValueTypeSaveView2DAdjustableDPI,
path + "\\ScreenshotView2DAdjustableDPI_DrawnNormal.bmp" );

// define pixel and line thickness and save the screenshot with a new name
cci.ScSetLongValue( ( int )
ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlLongValueTypeSaveView2DBitmapMode,
1 ); // 1: lines and pixels are drawn thicker
cci.ScSetStringValue( ( int )
ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlStringValueTypeSaveView2DAdjustableDPI,
path + "\\ScreenshotView2DAdjustableDPI_DrawnThicker.bmp" );
Table 367: Create screenshot of SAMLight View2D

17.3 Create Entity


17.3.1 Text2D
Create Text Entity (ScWinTextChars2D)

//define the type of the new entity


cci.ScSetStringValue((int)
ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlStringValueTypeCreateEntity,"ScWinTextChars2D");

//specify entity properties, e.g.set the text in italic


cci.ScSetEntityLongData("ScCreateEntity", (int)
ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlLongDataIdTextCharFlags, 65536);

//fill the empty entity with content e.g.with "123"


cci.ScChangeTextByName("ScCreateEntity", "456");

//specify thetext size; this value will be taken, if dim_x = dim_y = 0 in ScCreateEntity,
//otherwise it will be ignored
cci.ScSetEntityDoubleData("ScCreateEntity", (int)
ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlDoubleDataIdTextSize, 9);

//create the entity of the type defined above, name it "MyEntity", "" for Father - group(no group),
//apply pen = 3, position its center at(x | y | z) = (0 | 0 | 0)
//in the coordinate system, definethe dimension dim_x = 20, dim_y = 10.The last two
cci.ScCreateEntity("MyEntity", "", 3, 0, 0, 0, 20, 10, 0, "");
Table 368: Create text entity (ScWinTextChars2D)

17.3.2 BarCode
Create barcode entity (ScBarCode12Chars2D)

//define the type of the new entity


cci.ScSetStringValue((int)
ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlStringValueTypeCreateEntity,
"ScBarCode12Chars2D");

//specify the exact barcode type

© 2022 SCAPS GmbH


Client Control Interface Manual - Programming Examples 297

Create barcode entity (ScBarCode12Chars2D)

cci.ScSetEntityStringData("ScCreateEntity", (int)
ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlStringDataIdSetBarcodeType, "QR Code");

//fill the empty entity with content e.g.with "123"


cci.ScChangeTextByName("ScCreateEntity", "123");

//define the desired mode of the barcode, if available; if this is not defined,
//the first level will be taken as default.Note, that your barcode might not be valid
//for every content in the default mode and will not be created in this case.
cci.ScSetEntityLongData("ScCreateEntity", (int)
ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlLongDataIdDataBarcodeMode, 2);

//define the desired level of the barcode, if avaiable; if this is not defined,
//the first level will be taken as default.Note, that your barcode might not be valid
//for every content with the default level and will not be created in this case.
cci.ScSetEntityLongData("ScCreateEntity", (int)
ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlLongDataIdDataBarcodeLevel, 1);

//create the entity of the type defined above, name it "MyEntity", apply pen = 3,
//position its center at(x | y | z) = (0 | 0 | 0) in the coordinate system,
//deactivate the definition of the dimension with dim_x = 0, dim_y = 0
cci.ScCreateEntity("MyEntity", "", 3, 0, 0, 0, 0, 0, 0, "");
Table 369: Create barcode entity (ScBarCode12Chars2D)

17.3.3 SerialNumber
Create serial number entity (ScSerialNumber2D)

//define the type of the new entity


cci.ScSetStringValue((int)
ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlStringValueTypeCreateEntity, "ScSerialNumber2D");

//specify the text size; this value will be taken, if dim_x = dim_y = 0 in ScCreateEntity,
//otherwise it will be ignored
cci.ScSetEntityDoubleData("ScCreateEntity", (int)
ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlDoubleDataIdTextSize, 9);

//specify the increment of the serial number


cci.ScSetEntityLongData("ScCreateEntity", (int)
ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlLongDataIdEntitySerialIncrValue, 3);

//specify the start value of the serial number


cci.ScSetEntityLongData("ScCreateEntity", (int)
ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlLongDataId

, 12);

//create the entity of the type defined above, name it "MyEntity", apply pen = 4, position its
//center at(x | y | z) = (10 | 50 | 0) in the coordinate system, deactivate the definition
//of the dimension with dim_x = 0, dim_y = 0
cci.ScCreateEntity("MyEntity", "", 4, 10, 50, 0, 0, 0, 0, "");
Table 370: Create serial number entity (ScSerialNumber2D)

17.3.4 Ellipse
Create ellipse/circle entity (ScEllipse 2D)

//define the type of the new entity

© 2022 SCAPS GmbH


Client Control Interface Manual - Programming Examples 298

Create ellipse/circle entity (ScEllipse 2D)

cci.ScSetStringValue((int)
ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlStringValueTypeCreateEntity,"ScEllipse2D");

//define radius in x direction


cci.ScSetEntityDoubleData("ScCreateEntity", (int)
ScComSAMLightClientCtrlFlags.scComSAMLIghtClientCtrlDoubleDataIdEllipse2DRadiusX, 40);

//define radius in x direction


cci.ScSetEntityDoubleData("ScCreateEntity", (int)
ScComSAMLightClientCtrlFlags.scComSAMLIghtClientCtrlDoubleDataIdEllipse2DRadiusY, 35);

//define x center coordinate


cci.ScSetEntityDoubleData("ScCreateEntity", (int)
ScComSAMLightClientCtrlFlags.scComSAMLIghtClientCtrlDoubleDataIdEllipse2DCenterX, -10);

//define y center coordinate


cci.ScSetEntityDoubleData("ScCreateEntity", (int)
ScComSAMLightClientCtrlFlags.scComSAMLIghtClientCtrlDoubleDataIdEllipse2DCenterY, -10);

//create the entity of the type defined above, name it "MyEntity", apply pen = 3,
//position its center at(x | y | z) = (0 | 0 | 0) in the coordinate system,
//deactivate the definition of the dimension with dim_x = 0, dim_y = 0
cci.ScCreateEntity("MyEntity", "", 3, 0, 0, 0, 25, 15, 0, "");
Table 371: Create ellipse/circle entity (ScEllipse 2D)

17.3.5 Rectangle
Create rectangle entity (ScRectangle 2D)

//define the type of the new entity


cci.ScSetStringValue((int)
ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlStringValueTypeCreateEntity, "ScRectangle2D");

//create the entity of the type defined above, name it "MyEntity", apply pen = 3,
//position its center at(x | y | z) = (0 | 0 | 0) in the coordinate system,
//deactivate the definition of the dimension with dim_x = 0, dim_y = 0
cci.ScCreateEntity("MyEntity", "", 3, 0, 0, 0, 25, 15, 0, "");
Table 372: Create rectangle entity (ScRectangle 2D)

17.3.6 PolyLine
Create polyline entity (ScPolyLine 2D)

//define the type of the new entity


cci.ScSetStringValue((int)
ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlStringValueTypeCreateEntity, "ScPolyLine2D");

//define start point at 0/0/0


cci.ScSetDoubleValue((int)
ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlDoubleValueTypeDoublePara1, 0); // x
cci.ScSetDoubleValue((int)
ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlDoubleValueTypeDoublePara2, 0); // y
cci.ScSetDoubleValue((int)
ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlDoubleValueTypeDoublePara3, 0); // z

//add point to polyline


cci.ScExecCommand((int)
ScComSAMLightClientCtrlExecCommandConstants.scComSAMLightClientCtrlExecCommandAddPointToCreateEntityPolyli
ne);

© 2022 SCAPS GmbH


Client Control Interface Manual - Programming Examples 299

Create polyline entity (ScPolyLine 2D)

//define end point at 100/0/0


cci.ScSetDoubleValue((int)
ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlDoubleValueTypeDoublePara1, 100); // x
cci.ScSetDoubleValue((int)
ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlDoubleValueTypeDoublePara2, 0); // y
cci.ScSetDoubleValue((int)
ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlDoubleValueTypeDoublePara3, 0); // z

//add point to polyline


cci.ScExecCommand((int)
ScComSAMLightClientCtrlExecCommandConstants.scComSAMLightClientCtrlExecCommandAddPointToCreateEntityPolyli
ne);

//add additional empty polyline in the polyline subchapter


cci.ScExecCommand((int)
ScComSAMLightClientCtrlExecCommandConstants.scComSAMLightClientCtrlExecCommandAddPolylineToCreateEntityPol
yline);

//create the entity of the type defined above, name it "MyEntity", apply pen = 3,
//position its center at(x | y | z) = (0 | 0 | 0) in the coordinate system,
//deactivate the definition of the dimension with dim_x = 0, dim_y = 0
cci.ScCreateEntity("MyEntity", "", 3, 0, 0, 0, 25, 15, 0, "");
Table 373: Create polyline entity (ScPolyLine 2D)

17.4 Correct UCF


The following examples shows how to correct an ucf file using sc_corr_table via CCI.

Correct ucf

// Select Fit2D correction algorithm


cci.ScSetLongValue( ( int )
ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlLongValueTypeCorrectionMode, ( int )
ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlCorrectionMode2dFit );

// Select Fit2D order, for example 3_Advanced


cci.ScSetLongValue( ( int )
ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlLongValueType2dFitType, 3 );

// Execute the correction with <SCAPS>\system\sc_calib_points.txt and apply the new correction file in
SAMLight.
cci.ScExecCommand( ( int )
ScComSAMLightClientCtrlExecCommandConstants.scComSAMLightClientCtrlExecCommandCorrectSamLight );
Table 374: Correct ucf

17.5 Fit to entity


The following examples shows how to fit the view to a specific entity.

Fit view to an entity

// set entity name here, for example "EntityName";


string EntityName =

// deselect all
cci.ScSetEntityLongData( "",
( int ) ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlLongDataIdEntitySelected |
( int ) ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlLongDataIdFlagDontUpdateView, 0 );

© 2022 SCAPS GmbH


Client Control Interface Manual - Programming Examples 300

Fit view to an entity

// select
cci.ScSetEntityLongData( EntityName,( int )
ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlLongDataIdEntitySelected, 1 );
cci.ScExecCommand( ( int )
ScComSAMLightClientCtrlExecCommandConstants.scComSAMLightClientCtrlExecCommandFitViewToSelectedEnt
ities );
Table 375: Fit view to an entity

17.6 Get / Set Inputs and Outputs


Get Single Input

bool Get_Input( int InputBit )


{
int Flag = 1 << ( InputBit - 1 );
int OptoIO = cci.ScGetLongValue(
( int )ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlLongValueTypeOptoIO );
if( ( OptoIO & Flag ) == Flag )
return true;
else
return false;
}
Table 376: Get Single Outputs

Get Single Outputs

bool Get_Output( int OutputBit ) // USC only


{
int Flag = 1 << ( OutputBit - 1 );
int GetOptoOut = cci.ScGetLongValue(
( int )ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlLongValueTypeGetOptoOut );
if( ( GetOptoOut & Flag ) == Flag )
return true;
else
return false;
}
Table 377: Get Single Outputs

Set Single Outputs

void Set_Output( int OutputBit, bool High )


{
int Flag = 1 << ( OutputBit - 1 );
int Mask = ( ~Flag ) << 16;
if( !High )
Flag = 0;
int OptoIO = Mask | Flag;
cci.ScSetLongValue(
( int )ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlLongValueTypeOptoIO,
OptoIO );
return;
}
Table 378: Get Single Outputs

© 2022 SCAPS GmbH


Client Control Interface Manual - Programming Examples 301

17.7 Get / Set text properties


The following examples shows how to manipulate the properties of a text object.

Create text entity

int dontupdate = ( int )ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlLongDataIdFlagDontUpdateView |


( int )ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlLongDataIdFlagDontUpdateEntity;
string EntityName = // set entity name here, for example "TextEnity";

// set the text properties of the entity with name EntityName


cci.ScSetEntityStringData( EntityName, dontupdate | ( int )
ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlStringDataIdTextText, "NewText" );
cci.ScSetEntityStringData( EntityName, dontupdate | ( int )
ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlStringDataIdTextFontName, "Arial" );
cci.ScSetEntityDoubleData( EntityName, dontupdate | ( int )
ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlDoubleDataIdTextSize, 2 );
cci.ScSetEntityDoubleData( EntityName, dontupdate | ( int )
ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlDoubleDataIdTextCharSpacing, 0.95 );
cci.ScSetEntityDoubleData( EntityName, dontupdate | ( int )
ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlDoubleDataIdTextLengthLimit, 4.5 );
cci.ScSetEntityDoubleData( EntityName, dontupdate | ( int )
ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlDoubleDataIdTextHeightLimit, 1.5 );
cci.ScSetEntityDoubleData( EntityName, dontupdate | ( int )
ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlDoubleDataIdTextRadius, 11.5 );
cci.ScSetEntityDoubleData( EntityName, dontupdate | ( int )
ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlDoubleDataIdTextStartAngle, Math.PI / 2 );

int flags = cci.ScGetEntityLongData( EntityName, ( int )


ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlLongDataIdTextCharFlags );

// force to radial text


flags = flags | ( int ) ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlLongDataIdTextCharFlagRadial;
cci.ScSetEntityLongData( EntityName, ( int )
ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlLongDataIdTextCharFlags, flags );

// get the text properties of the entity with name EntityName


string str = "";
double val = 0;

cci.ScGetEntityStringData( EntityName, ( int )


ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlStringDataIdTextText, ref str );
MessageBox.Show( "Text: " + str, "Text" );

cci.ScGetEntityStringData( EntityName, ( int )


ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlStringDataIdTextFontName, ref str );
MessageBox.Show( "FontName: " + str, "FontName" );

cci.ScGetEntityDoubleData( EntityName, ( int )


ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlDoubleDataIdTextSize, ref val );
MessageBox.Show( "TextSize: " + val.ToString(), "TextSize" );
Table 379: Get / Set text properties

17.8 Get Server Status with Mask


The following examples shows how to get the status of the USC server and explains how to use masks for
this purpose.

Get Server Status with Mask

// Get the over all server status


cci.ScGetLongValue((int)
ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlLongValueTypeServerStatus )

© 2022 SCAPS GmbH


Client Control Interface Manual - Programming Examples 302

Get Server Status with Mask

//Only ask for the documented server stati using a mask combined with & at the end
cci.ScGetLongValue( (int)
ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlLongValueTypeServerStatus ) & 0x3000B

// Here, the mask 0x3000B ensures only to look for the bits at the position x in binary representation:
00xx 0000 0000 0000 x0xx, which are the documented parameters (1, 2, 8, 65536 and 131072 in decimal
representation) for scComSAMLightClientCtrlLongValueTypeServerStatus.

cci.ScGetLongValue( (int)
ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlLongValueTypeServerStatus ) & 0x30000
//If you only want to know if the connected device is a USC-1 or USC-2 card, use a mask for the
corresponding values (x in binary representation 00xx 0000 0000 0000 0000, 65536 and 131072 in decimal
representation) which would be 0x30000 in hexadecimal representation.

Table 380: Get Server Status with Mask

17.9 Handle texts


The following examples shows how to uses the ASCII protocol to modify a text, rotate it by 45° and evaluate
its total width. The creation of the socket connection, that is completely operating system and programming
environment dependent, is not shown here. Also sending and receiving of the data is not part of that
example. Here the assumption is made that the function DoSend() sends the command line while
DoReceive() performs the reception of the answer.

Handle texts with ASCII protocol

// a buffer for the ASCII command lines that have to be sent, the its maximum size is defined in
ScCciCommands.h
char msgStr[ SC_CCI_MAX_COMMANDLENGTH ];

// open the socket connection here


...

// send the initialization string to set up the interface for the ASCII protocol
DoSend( SC_CCI_INITSTRING );

// create the command line that has to be sent, that function call results in a command
"ScCciChangeTextByName("MyEntity", "NewText")\n" that is stored in msgStr
sprintf( msgStr, SC_CCI_CMD_CHANGE_TEXT_BY_NAME, "MyEntity", "NewText" );

// send the message via the already opened socket


DoSend( msgStr );

// receive the answer and display it within a MessageBox


MessageBox( DoReceive() );

// creates the command "ScCciRotateEntity("MyEntity", 100, 100, 45)\n"


sprintf( msgStr, SC_CCI_CMD_ROTATE_ENTITY, "MyEntity", 100, 100, 45 );

// execute that command...


DoSend( msgStr );

// ...and receive the handshake answer


DoReceive();

// send the command to get the minimum horizontal position of the entities outline
sprintf( msgStr, SC_CCI_CMD_GET_ENTITY_OUTLINE, "MyEntity", 0 );
DoSend( msgStr );

© 2022 SCAPS GmbH


Client Control Interface Manual - Programming Examples 303

Handle texts with ASCII protocol

// convert the returned string into a double value; please note: if fetching of the outline value failed,
the returned string is "NaN" (=not a number)
outline_min_x = atof( DoReceive() );

// an alternative possibility to send a command, here all values are statically so that it is not
necessary to "construct" the command using sprintf()
DoSend( "ScCciGetEntityOutline(\"MyEntity\", 3)\n" );

// calculate the width of the entity "MyEntity"


outline_max_x = atof( DoReceive() );
width = outline_max_x - outline_min_x;
Table 381: Handle texts with ASCII protocol

17.10 How to work with Flags


Some commands give a possibility to set multiple flag values at once. These are for example:
DeviceEnableFlagsValue, MarkFlags, and a lot of others.
There are simple procedures which allow you to operate with the flag values very easily. We will consider an
example of Mark Flags being set with MarkFlags function.

Set Flag Values


The complete set of all available Mark Flags you can find in the corresponding command description. Here
we just pick a few flags and use them for demonstration.
Assume we want to set following flag values:
WaitForTrigger With this flag you activate the Trigger Mode.
Selected When this flag is activated, only selected entities will be marked.
We do not know initially, which flags are already set and we do not want to overwrite them. That is why we
call the current state of Mark Flags as first. To set the above flags, we need to combine them with the
current flags state. We can do it by using the logical OR operator. In the last step, we "send" the modified
flags value to SAMLight. In the table below you can see the example code for the described procedure.

Set Flag Values

// Save the current mark flags value to the markFlags variable


int Mark_Flags = cci.New.ScGetMarkFlags();
// Modify the vlaue of markFlags by adding the new flags
markFlags |= (int)ScComSAMLightClientCtrlMarkFlags.scComSAMLightClientCtrlMarkFlagWaitForTrigger;
markFlags |= (int)ScComSAMLightClientCtrlMarkFlags.scComSAMLightClientCtrlMarkFlagSelected;
// Define the new Flags Value to the SAMLight
int CCI_Return = cci.ScSetMarkFlags(Mark_Flags);
Table 382: Example Set Flag Values

© 2022 SCAPS GmbH


Client Control Interface Manual - Programming Examples 304

Get Flag Status


If we want to check, if the Wait For trigger Flag is already activated, we proceed as follows. As first get the
current state of the mark flags. Than we save the value of the WaitForTrigger flag to the constant
TriggerFlag. Using logical AND operator, we can now compare the current flag state with the Trigger flag.

· If the condition markFlags & TriggerFlag == markFlags is satisfied, the WaitForTrigger flag is already
active.

· If the above condition does not hold, the flag is not active.

In the table below the example code for this case.

Get Flag Status

// Save the current mark flags value to the markFlags variable


int Mark_Flags = cci.ScGetMarkFlags();

// Define the value of the flag to be compared


int Some_Flag = (int)ScComSAMLightClientCtrlMarkFlags.scComSAMLightClientCtrlMarkFlagWaitForTrigger;
// Check, if the flag is already activated
bool Flag_Status = (markFlags & someFlag) == markFlags ? true : false;
Table 383: Example Get Flag Status

Deactivate a particular Flag


If you want to deactivate any particular flag, the work flow is very similar to the first example, where you
activate some flags, but here we must use the logical AND NOT instead of logical OR.
Below is the coding example of deactivating the WaitForTrigger flag.

Deactivate Flag

// Save the current mark flags value to the markFlags variable


int Mark_Flags = cci.ScGetMarkFlags();

// Define the value of the flag to be deactivated


int Deactivate_Flag = (int)ScComSAMLightClientCtrlMarkFlags.scComSAMLightClientCtrlMarkFlagWaitForTrigger;
// Deactivate the flag using AND NOT operator
Mark_Flags = Mark_Flags & (~Deactivate_Flag);
// Define the updated flags value to SAMLight
int CCI_Return = cci.ScSetMarkFlags(Mark_Flags);
Table 384: Example Deactivate Flag

17.11 Mirror Entity on Y Axis


The following examples shows how to mirror an entity on the Y axis. To mirror on X axis, just switch the -1,1
to 1,-1 in the ScScaleEntity command. The Entity has the name "A" in this example.

Mirror Entity on Y Axis

//define the type of the new entity


cci.ScSetStringValue((int)
ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlStringValueTypeCreateEntity,"ScWinTextChars2D");
string EntityName = "A";

// Get Co-ordinates of the center point of the entity


double Xmin, Ymin, Xmax, Ymax, Xc, Yc;
Xmin = cci.ScGetEntityOutline( EntityName, 0 );
Ymin = cci.ScGetEntityOutline( EntityName, 1 );
Xmax = cci.ScGetEntityOutline( EntityName, 3 );

© 2022 SCAPS GmbH


Client Control Interface Manual - Programming Examples 305

Mirror Entity on Y Axis

Ymax = cci.ScGetEntityOutline( EntityName, 4 );


Xc = ( Xmin + Xmax ) / 2;
Yc = ( Ymin + Ymax ) / 2;

// Translate entity to the center of the working field


cci.ScTranslateEntity( EntityName, -Xc, -Yc, 0 );

// Mirror Entity
cci.ScScaleEntity( EntityName, -1, 1, 1 );

// Translate entity back to its original position


cci.ScTranslateEntity( EntityName, Xc, Yc, 0 );
Table 385: Mirror Entity on Y Axis

17.12 Motion Control


The following examples shows for MDrive motors (Type=5) how to set the absolute/relative position/angle
and speed of two drives, execute the starting command and retrieve a message that both drives (1. part) and
the first/second (2. part) drive has stopped respectively. In this context it is important to wait until the last
drive has stopped before sending a new starting command (MotionGo; therefore the stop messages).
Otherwise the motion control would not work correctly. If one drive reaches its position limit given in the
motion settings file or has already reached its new position before, it does not move any more.

Motion Control - MDrive - type 5

// the application comes back immediately


cci.ScSetLongValue( ( int )
ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlLongValueTypeMotionWaitForEnd, 0 );

// 1. part: check if all MDrive motors have stopped


cci.ScSetLongValue( ( int )
ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlLongValueTypeMotionAxis, 0 );
cci.ScSetDoubleValue( ( int )
ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlDoubleValueTypeMotionAxisPosition, 100 );
cci.ScSetDoubleValue( ( int )
ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlDoubleValueTypeMotionAxisSpeed, 4 );
cci.ScSetLongValue( ( int )
ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlLongValueTypeMotionAxis, 1 );
cci.ScSetDoubleValue( ( int )
ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlDoubleValueTypeMotionAxisAngleRelative, 720 );
cci.ScSetDoubleValue( ( int )
ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlDoubleValueTypeMotionAxisSpeed, 1 );

cci.ScExecCommand( ( int )
ScComSAMLightClientCtrlExecCommandConstants.scComSAMLightClientCtrlExecCommandMotionGo );

// -1 means all axes


cci.ScSetLongValue( ( int )
ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlLongValueTypeMotionAxis, -1 );
do
{ cci.ScSetLongValue( ( int )
ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlLongValueTypeMotionAxis, -1 );
}
while( cci.ScGetLongValue( ( int )
ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlLongValueTypeMotionMoving ) == 1 );

MessageBox.Show( "All motors have stopped." );

// 2. part: check if single MDrive motor has stopped


cci.ScSetLongValue( ( int )
ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlLongValueTypeMotionAxis, 0 );

© 2022 SCAPS GmbH


Client Control Interface Manual - Programming Examples 306

Motion Control - MDrive - type 5

cci.ScSetDoubleValue( ( int )
ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlDoubleValueTypeMotionAxisPositionRelative, 100 );

cci.ScSetLongValue( ( int )
ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlLongValueTypeMotionAxis, 1 );
cci.ScSetDoubleValue( ( int )
ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlDoubleValueTypeMotionAxisAngle, 720 );
cci.ScExecCommand( ( int )
ScComSAMLightClientCtrlExecCommandConstants.scComSAMLightClientCtrlExecCommandMotionGo );

int axis0 = 1;
int axis1 = 1;

do
{
if( axis0 == 1 )
{
cci.ScSetLongValue( ( int )
ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlLongValueTypeMotionAxis, 0 );
if( cci.ScGetLongValue( ( int )
ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlLongValueTypeMotionMoving ) == 0 )
{
MessageBox.Show( "Motor with axis 0 has stopped." );
axis0 = 0;
}
}

if( axis1 == 1 )
{
cci.ScSetLongValue( ( int )
ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlLongValueTypeMotionAxis, 1 );
if( cci.ScGetLongValue( ( int )
ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlLongValueTypeMotionMoving ) == 0 )
{
MessageBox.Show( "Motor with axis 1 has stopped." );
axis1 = 0;
}
}
} while ( ( axis0 == 1 ) || ( axis1 == 1 ) ) ;
Table 386: Motion Control type 5

17.13 Precalculating Marking Time


The following examples shows how to precalculate the marking time.

Precalculate Marking Time

// Get expected mark time of complete job


double LastExpectedMarkTime = cci.ScGetDoubleValue(
( int )
SAMLIGHT_CLIENT_CTRL_OCXLib.ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlDoubleValueTy
peLastExpectedMarkTime );

// Alternative: Get process time of chosen entities


// Enable MarkFlagPreview
int MarkFlags = cci.ScGetMarkFlags();
MarkFlags = MarkFlags | ( int )
SAMLIGHT_CLIENT_CTRL_OCXLib.ScComSAMLightClientCtrlMarkFlags.scComSAMLightClientCtrlMarkFlagPrevie
w;
int CciReturn1 = cci.ScSetMarkFlags( MarkFlags );

// Enable ModeFlagEntityNamesSeparatedBySemicolon
int ModeFlags = 0;
int CciReturn2 = cci.ScGetMode( ref ModeFlags );

© 2022 SCAPS GmbH


Client Control Interface Manual - Programming Examples 307

Precalculate Marking Time

ModeFlags = MarkFlags | ( int )


SAMLIGHT_CLIENT_CTRL_OCXLib.ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlModeFlagEntityName
sSeparatedBySemicolon;
int CciReturn3 = cci.ScSetMode( ModeFlags );

// Preview of entities 'a and 'b'


int CciReturn4 = cci.ScMarkEntityByName( "a;b", 1 );

// Get process time of last preview


double LastPreviewTime = cci.ScGetDoubleValue(
( int )
SAMLIGHT_CLIENT_CTRL_OCXLib.ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlDoubleValueTy
peLastPreviewTime );
Table 387: Precalculate Marking Time

17.14 Retrieve Entities


The following C# code uses SAMLight Client Control first to list all toplevel entities and then all entities
including their possible entity names by message box. If further parameters of all entities like the set pen
number or the Mark Loop Count should be requested, empty entities have to be renamed to a unique entity
name first. Then parameter has to be requested by entity settings command and entity name has to be reset
again. To speed up an automatic entity scan the command ScSetMode can be used similar as in Optimize
Performance Example 2.

Retrieve Entities

// important: the BSTR-pointer has to be initialized, otherwise the COM -interface may crash!
string name = "", type = "";
int i, count;
// step through all available toplevel entities
cci.ScSetMode( ( int )ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlModeFlagTopLevelOnly );
count = cci.ScGetLongValue( ( int )
ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlLongValueTypeTopLevelEntityNum );
if( count > 0 )
{
for( i = 0; i < count; i++ )
{
// get the name of the entity at the index position "i"
cci.ScGetIDStringData( ( int )
ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlStringDataIdGetToplevelEntity, i, ref name );
if( name == "" )
name = "'empty'";
cci.ScGetIDStringData( ( int )
ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlStringDataIdGetEntityType, i, ref type );
MessageBox.Show( "entity number: " + ( i + 1 ) + ", entity name: " + name + ",entity type: " +
type, "total number of toplevel entities: " + count.ToString() );
}
}
else
MessageBox.Show( "No top level entities found", "total number of toplevel entities: 0" );
// step through all available entities
cci.ScSetMode( 0 );
count = cci.ScGetLongValue( ( int )
ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlLongValueTypeTotalEntityNum );
if( count > 0 )
{
for( i = 0; i < count; i++ )
{
// get the name and type of the entity at the index position "i"
cci.ScGetIDStringData( ( int )
ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlStringDataIdGetEntity_Name, i, ref name );
if( name == "" )
name = "'empty'";
cci.ScGetIDStringData( ( int )

© 2022 SCAPS GmbH


Client Control Interface Manual - Programming Examples 308

Retrieve Entities

ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlStringDataIdGetEntityType, i, ref type );


MessageBox.Show( "entity number: " + ( i + 1 ) + ", entity name: " + name + ", entity type: " +
type, "total number of entities: " + count.ToString() );
}
}
else
MessageBox.Show( "No entities found", "total number of entities: 0" );
Table 388: Retrieve Entities

17.15 Rotate Output Matrix


The following examples shows how to mark an entity with the name RotateEntity.

Rotate Output Matrix

// Rotate the output matrix for 20 degrees around the middle of the entity center and marks again.
This step will be repeated 19 times.

if( cci.ScIsRunning() == 0 )
{
MessageBox.Show( "SAMLight not found", "Warning" );
return;
}

double min_x, min_y, max_x, max_y;


double center_x, center_y;
long i;
double ang_inc;
double act_angle;
string entity_name = // set entity name here, for example "RotateEntity";

// calculate the center of the entity


min_x = cci.ScGetEntityOutline( entity_name, 0 );
min_y = cci.ScGetEntityOutline( entity_name, 1 );
max_x = cci.ScGetEntityOutline( entity_name, 3 );
max_y = cci.ScGetEntityOutline( entity_name, 4 );
center_x = ( min_x + max_x ) / 2;
center_y = ( min_y + max_y ) / 2;

// Repeat the rotation and marking


ang_inc = 20 * 2 * Math.PI / 360;
act_angle = 0;
for( i = 0; i < 19; i++ )
{
cci.ScOpticMatrixReset();
cci.ScOpticMatrixRotate( center_x, center_y, act_angle );
cci.ScMarkEntityByName( entity_name, 1 );
act_angle = act_angle + ang_inc;
}
Table 389: Rotate Output Matrix

17.16 Save Splitted Job as Tiles


The following examples shows how to split a job file and save it as an entity list of single split tiles with full
access, which can be used as a basis to manually setup a split job file according to own needs (motion
entities have to be added manually). To use this example a splitting mode with reasonable splitting
parameters and motion axes has to be defined in SAMLight before.

Save Splitted Job as Tiles

cci.ScExecCommand( ( int)
ScComSAMLightClientCtrlExecCommandConstants.scComSAMLightClientCtrlExecCommandNewJob );

© 2022 SCAPS GmbH


Client Control Interface Manual - Programming Examples 309

Save Splitted Job as Tiles

cci.ScLoadJob( Environment.ExpandEnvironmentVariables( @"%SCAPS_SAM%" ) + "\\jobfiles\\demo.sjf",


1, 1, 0 );
ScCenterEntityByEntityName( "" );

cci.ScExecCommand( ( int )
ScComSAMLightClientCtrlExecCommandConstants.scComSAMLightClientCtrlExecCommandResplitJob ); //
scComSAMLightClientCtrlExecCommandResplitJob = 13

cci.ScSetStringValue( ( int )
ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlStringValueTypeSaveSplitsJobFileName,
Environment.ExpandEnvironmentVariables( @"%SCAPS_SAM%" ) + "\\jobfiles\
\demo_splitted_as_tiles.sjf" );

cci.ScExecCommand( ( int )
ScComSAMLightClientCtrlExecCommandConstants.scComSAMLightClientCtrlExecCommandSaveSplitsAsEntities
); // scComSAMLightClientCtrlExecCommandSaveSplitsAsEntities = 38

cci.ScLoadJob( Environment.ExpandEnvironmentVariables( @"%SCAPS_SAM%" ) + "\\jobfiles\


\demo_splitted_as_tiles.sjf", 1, 1, 0 );
ScCenterEntityByEntityName( "" );
}

private long ScCenterEntityByEntityName( string entityname )


{
double MIN_X = cci.ScGetWorkingArea( 0 ); // SC_SAMLIGHT_OUTLINE_INDEX_MIN_X = 0
double MIN_Y = cci.ScGetWorkingArea( 1 ); // SC_SAMLIGHT_OUTLINE_INDEX_MIN_Y = 1
double MAX_X = cci.ScGetWorkingArea( 3 ); // SC_SAMLIGHT_OUTLINE_INDEX_MAX_X = 3
double MAX_Y = cci.ScGetWorkingArea( 4 ); // SC_SAMLIGHT_OUTLINE_INDEX_MAX_Y = 4

double CENTER_WORKING_AREA_X = ( MAX_X + MIN_X ) / 2;


double CENTER_WORKING_AREA_Y = ( MAX_Y + MIN_Y ) / 2;

double min_x = cci.ScGetEntityOutline( entityname, 0 ); //


scComSAMLightClientCtrlOutlineIndexMinX = 0
double min_y = cci.ScGetEntityOutline( entityname, 1 ); //
scComSAMLightClientCtrlOutlineIndexMinY = 1
double max_x = cci.ScGetEntityOutline( entityname, 3 ); //
scComSAMLightClientCtrlOutlineIndexMaxX = 3
double max_y = cci.ScGetEntityOutline( entityname, 4 ); //
scComSAMLightClientCtrlOutlineIndexMaxY = 4

double center_entity_outline_x = ( max_x + min_x ) / 2;


double center_entity_outline_y = ( max_y + min_y ) / 2;

return cci.ScTranslateEntity( entityname, CENTER_WORKING_AREA_X - center_entity_outline_x,


CENTER_WORKING_AREA_Y - center_entity_outline_y, 0 );
}
Table 390: Save Splitted Job as Tiles

17.17 Set Array


The following examples shows how to change the array parameters of an entity. It creates an array 2 x 2 with
a step size of 9.0 mm in x and y direction.
There are two different array copies in SAMLight, the virtual and the hard, which have their corresponding
CCI commands:
· Hard array copy
· Virtual array copy

With hard array copy (Menu > Edit > ArrayCopy), the new generated copies are added in entity list.
Hard Array Copy

int CCI_Return_01 = cci.ScSetLongValue( ( int )


ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlLongValueTypeEntityArrayOrderFlags, ( int )

© 2022 SCAPS GmbH


Client Control Interface Manual - Programming Examples 310

Hard Array Copy

ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlEntityArrayOrderFlagNegX | ( int )
ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlEntityArrayOrderFlagNegY | ( int )
ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlEntityArrayOrderFlagMainDirX );
int CCI_Return_02 = cci.ScSetLongValue( ( int )
ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlLongValueTypeEntityArrayCountX, 2 );
int CCI_Return_03 = cci.ScSetLongValue( ( int )
ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlLongValueTypeEntityArrayCountY, 2 );
int CCI_Return_04 = cci.ScSetDoubleValue( ( int )
ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlDoubleValueTypeEntityArrayStepX, 9.0 );
int CCI_Return_05 = cci.ScSetDoubleValue( ( int )
ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlDoubleValueTypeEntityArrayStepY, 9.0 );
int CCI_Return_06 = cci.ScSetEntityStringData( "circle", (int)
ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlStringDataIdArrayCopyHard, "circle copy" );
Table 391: Hard Array Copy

With virtual array copy (EntityInfo > Array), the generated copies are not added in entity list, but still will be
marked in sequence. Please pay attention that the unit of the commands for step is [um].
Virtual Array Copy

int CCI_Return_01 = cci.ScSetEntityLongData( "circle", ( int )


ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlLongDataIdEntityArrayCountX, 2 );
int CCI_Return_02 = cci.ScSetEntityLongData( "circle", ( int )
ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlLongDataIdEntityArrayCountY, 2 );
int CCI_Return_03 = cci.ScSetEntityLongData( "circle", ( int )
ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlLongDataIdEntityArrayStepX, 9000 );
int CCI_Return_04 = cci.ScSetEntityLongData( "circle", ( int )
ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlLongDataIdEntityArrayStepY, 9000 );
int CCI_Return_05 = cci.ScSetEntityLongData( "circle", ( int )
ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlLongDataIdEntityArrayOrderFlags, ( int )
ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlEntityArrayOrderFlagNegX | ( int )
ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlEntityArrayOrderFlagNegY | ( int )
ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlEntityArrayOrderFlagMainDirX );
Table 392: Virtual Array Copy

17.18 Optimize Performance


The performance of SAMLight and thus your client control application can often be optimized by
suppressing time consuming and unnecessary actions of the program. If a property of an entity (like the text
or the size) has been changed by client control the entity will be regenerated and updated. Furthermore the
View2D in SAMLight will be updated as well. Usually these updates of the entity or the View2D are not
necessary after every client control call. Here are some examples how the performance can be increased.

Only the top level entities:


If it is not necessary to execute a SAMLight Client Control command for all subentities of a top level entity,
the iteration through all subentities can be globally suppressed and the SAMLight Client Control command is
executed for the top level entity only. Use the FlagToplevelOnly flag:

Only top level entities

//Get the current mode


int current_mode = 0;
cci.ScGetMode(ref current_mode);
//update the current mode by adding an additional TopLevelEntity Flag
current_mode |= (int)ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlDoubleDataIdFlagToplevelOnly;
//Set the new mode value
cci.ScSetMode(current_mode);

© 2022 SCAPS GmbH


Client Control Interface Manual - Programming Examples 311

Table 393: Only top level entities

Disable automatic View2D update of SAMLight:


If you are not using the View2D of SAMLight because you launch SAMLight in hidden mode or your
application is automatized without needing a visual view, you can disable the View2D completely. Use the
FlagDontUpdateView flag:

Disable the View2D update

//Get the current mode


int current_mode = 0;
cci.ScGetMode(ref current_mode);
//update the current mode by adding an additional DontUpdateView Flag
current_mode |= (int)ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlDoubleDataIdFlagDontUpdateView;
//Set the new mode value
cci.ScSetMode(current_mode);
Table 394: Disable the View2D update

If there's a need to update the view, you can do it by executiong the UpdateViewNow command:

Manual view update

cci.ScExecCommand((int)
ScComSAMLightClientCtrlExecCommandConstants.scComSAMLightClientCtrlExecCommandUpdateViewNow);
Table 395: Manual view update

Execute SAMLight Client Control command for several entities:


The time consuming part of a client control application can be the COM call itself. The processing time for
the client interface application can be reduced if you want to use the same CI call for several entities. An
example is changing the text of several entities with just one COM call. This can be done by using
semicolon separated entity names which has to be activated by: ScSetMode() with the flag
NamesSeparatedBySemicolon:

Disable the View2D update

//Get the current mode


int current_mode = 0;
cci.ScGetMode(ref current_mode);
//update the current mode by adding an additional DontUpdateView Flag
current_mode |= (int)ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlDoubleDataIdFlagDontUpdateView;
//Set the new mode value
cci.ScSetMode(current_mode);
Table 396: Disable the View2D update

© 2022 SCAPS GmbH


Client Control Interface Manual - Programming Examples 312

Suppress View2D update if you change more than one property of the same entity
at once:
Like mentioned above every entity change will be shown in View2D after any change of its properties. If you
want to change more than one property of the same entity, you can suppress View2D update of the entity.
Then the change of the entity will not be shown after after every call. To do so use:

· ScSetEntityLongData() with flag FlagDontUpdateView


· ScSetEntityDoubleData() with flag FlagDontUpdateView
· ScSetEntityStringData() with flag FlagDontUpdateView

You will find a detailed example in the chapter Optimize performance: Example 1.

Suppress entity update if you change more than one property of the same entity at
once:
Like mentioned above every entity will be regenerated and updated after any change of its properties. If you
want to change more than one property of the same entity you can suppress this behavior so that the entity
will not be regenerated and updated after after every call.

· ScSetEntityLongData() with flag FlagDontUpdateEntity


· ScSetEntityDoubleData() with flag FlagDontUpdateEntity
· ScSetEntityStringData() with flag FlagDontUpdateEntity

Please make sure that you are not using this flag at the last change of an entity. Otherwise this
entity will not be regenerated and updated at all.

You will find a detailed example in the chapter Programming Examples:

Address top level entities only:


For many CI calls you address an entity by its name or ID to set or get its parameters. To find this entity
SAMLight is looking for the name or ID in every group or subgroup of the entire entity hierarchy. To
decrease the time which is necessary to find the corresponding entity you want to address the search can
be limited to top level entities:

· ScSetEntityLongData() with flag FlagToplevelOnly


· ScSetEntityDoubleData() with flag FlagToplevelOnly
· ScSetEntityStringData() with flag FlagToplevelOnly

Use trigger mode:


In this mode the next job to be marked is prepared and sent to the controller card before the mark call has
been sent. As soon as the external trigger is recognized by the controller card the marking process will start.
If this mode is not enabled the job will be prepared and sent to the controller card after the external trigger
was recognized.

· ScSetMarkFlags() with flag MarkFlagWaitForTrigger

© 2022 SCAPS GmbH


Client Control Interface Manual - Programming Examples 313

17.18.1 Example 1
To demonstrate how to use the CI calls properly we want to give an example code.
Consider you have 20 barcode entities in SAMLight with the entity names barcode1, barcode2, ...,
barcode20. We want to change for each barcode:
1. Enable Hatch1 with style 'wavy line without marking the jumps'
2. Enable Hatch2 with style 'zigzag'
A common way to program this changes in C# would be:

Enable Hatching ("slow" method)

for (int i = 1; i <= 20; i++)


{
//generate the entity name and the entity text for each of the 20 barcodes
string entity_name = "barcode" + Convert.ToString(i);
string entity_text = "This is the text of " + entity_name;
//change the text of each entity
cci.ScChangeTextByName(entity_name, entity_text);
//enable Hatching1
cci.ScSetEntityLongData(entity_name, (int)
ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlLongDataIdEnableHatching1, 1);
//enable Hatching2
cci.ScSetEntityLongData(entity_name, (int)
ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlLongDataIdEnableHatching2, 6);
}
Table 397: Enable Hatching ("slow" method)

This looks fine and will work properly but after every of the 60 CI calls the corresponding entity will get
regenerated and the View2D of SAMLight will be updated. This needs a lot of time.
We will now demonstrate how the same goal can be reached by using 3 CI calls instead of 60. To do so we
create two strings: containing all the entity names and the text for each of them. But we separate every entry
in the string by semicolon and will use the NamesSeparatedBySemicolon flag to change the properties at
once. Furthermore every entity will be regenerated only once and the View2D of SAMLight will only be
updated after the last entity change was completed. This is achieved by using DontUpdateView and
TopLevelOnly flags.

Enable Hatching (optimized performance)

//Generate one string 'all_entity_names' with all entity names separated by ";"
//and generate one string 'all_entity_texts' with all entity textes separated by "\v"
string all_entity_names = "barcode1";
string all_entity_texts = "This is the text of barcode 1";
for (int i = 2; i <= 20; i++)
{
all_entity_names = all_entity_names + ";" + "barcode" + Convert.ToString(i);
all_entity_texts = all_entity_texts + "\v" + "This is the text of barcode" +
Convert.ToString(i);
}
//enable entity name separated by semicolon mode
//disable View2D
//enable top level entities only
cci.ScSetMode((int)
ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlModeFlagEntity_NamesSeparatedBySemicolon |
(int)ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlModeFlagDontUpdateView |
(int)ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlModeFlagTopLevelOnly);
//change all texts of all entities
cci.ScChangeTextByName(all_entity_names, all_entity_texts);
//enable Hatching1 and Hatching2 for all entities, suppress entity update after enabling Hatching 1
//so the entities will be updated after the enabling of Hatching 2 (second call)

© 2022 SCAPS GmbH


Client Control Interface Manual - Programming Examples 314

Enable Hatching (optimized performance)

cci.ScSetEntityLongData(all_entity_names,
(int)ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlLongDataIdEnableHatching1 |
(int)ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlDoubleDataIdFlagDontUpdateEntity, 1);
cci.ScSetEntityLongData(all_entity_names,
(int)ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlLongDataIdEnableHatching2, 6);
//reset ScSetMode
cci.ScSetMode(0);
//manually update View2D
cci.ScExecCommand((int)
ScComSAMLightClientCtrlExecCommandConstants.scComSAMLightClientCtrlExecCommandUpdateViewNow);

Table 398: Enable Hatching (optimized performance)

17.18.2 Example 2
The following C# example shows and measures how much SAMLight Client Control performance constants
can accelerate the executed SAMLight Client Control commands.
In this case the cursive font, text size, font type and the text content of a Text2D entity with entity name "text
entity" are set 100 times as substitute for 100 different text entities to show how SAMLight Client Control
performance constants can be used.

Import necessary namespaces

using SAMLIGHT_CLIENT_CTRL_OCXLib;
using System.Diagnostics;
Table 399: Import necessary namespaces

As first we will change the text entities without introducing the performance increasing flags. We will make
the text in the text entities to be italic and of Arial type, change the size to 20 and change the text of the
entities.

Simple example without performance increase

//SAMLight Client Control commands to change a text entities: cursive font,


//text size, font type; then text content is set
//Standard commands without acceleration
Stopwatch stopWatch = new Stopwatch();
stopWatch.Start();
for (int i = 1; i <= 100; ++i)
{
cci.ScSetEntityLongData("text entity",
(int)ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlLongDataIdTextCharFlags,
(int)ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlLongDataIdTextCharFlagItalic);
cci.ScSetEntityDoubleData("text entity",
(int)ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlDoubleDataIdTextSize, 20);
cci.ScSetEntityStringData("text entity",
(int)ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlStringDataIdTextFontName,"Arial");
cci.ScChangeTextByName("text entity", "new text");
}
stopWatch.Stop();
TimeSpan mt = stopWatch.Elapsed;
string MeasuredTime = String.Format("{0:00}.{1:00}", mt.Seconds, mt.Milliseconds);
MessageBox.Show("measured time without acceleration: " + MeasuredTime + " s");
stopWatch.Reset();
Table 400: Simple example without performance increase

© 2022 SCAPS GmbH


Client Control Interface Manual - Programming Examples 315

As next we switch on TopLevelOnly and DontUpdateView flags, so that the view is not updated while we
change the entity properties and update the view using UpdateViewNow. It decreases the computation
time approximately by factor 1.5 - 2.0.

First example with performance increase (~ 2 x faster)

//General possibility to accelerate SAMLight Client Control commands by ScSetMode(),


//execution speed: ~ 1,5 - 2 0 x faster
//We switch on the DontUpdateView and ToplevelOnly modes and do the same, as in the previous step.
cci.ScSetMode(
(int)ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlModeFlagTopLevelOnly |
(int)ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlModeFlagDontUpdateView);
stopWatch.Start();
for (int i = 1; i <= 100; ++i)
{
cci.ScSetEntityLongData("text entity",
(int)ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlLongDataIdTextCharFlags,
(int)ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlLongDataIdTextCharFlagItalic);
cci.ScSetEntityDoubleData("text entity",
(int)ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlDoubleDataIdTextSize,20);
cci.ScSetEntityStringData("text entity",
(int)ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlStringDataIdTextFontName,"Arial");
cci.ScChangeTextByName("text entity", "new text");
}
cci.ScSetMode(0);
cci.ScExecCommand((int)
ScComSAMLightClientCtrlExecCommandConstants.scComSAMLightClientCtrlExecCommandUpdateViewNow);
stopWatch.Stop();
mt = stopWatch.Elapsed;
MeasuredTime = String.Format("{0:00}.{1:00}", mt.Seconds, mt.Milliseconds);
MessageBox.Show("measured time with medium acceleration: " + MeasuredTime + " s");
stopWatch.Reset();
Table 401: First example with performance increase (~ 2 x faster)

We can do even better by suppressing the entity update and the view update, while executing each
particular entity update command. We can do so by accelerating ScSetEntityLongData,
ScSetEntityDoubleData, ScSetEntityStringData directly by using additional flags.

© 2022 SCAPS GmbH


Client Control Interface Manual - Programming Examples 316

Second example with performance increase (~ 3.5 x faster)

//Special possibility to accelerate ScSetEntityLongData, ScSetEntityDoubleData or


//ScSetEntityStringData commands, execution speed: ~ 3,5 x faster in this example
stopWatch.Start();
for (int i = 1; i <= 100; ++i)
{
cci.ScSetEntityLongData("text entity",
(int) ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlLongDataIdTextCharFlags |
(int)ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlLongDataIdFlagDontUpdateView |
(int)ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlLongDataIdFlagDontUpdateEntity |
(int)ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlLongDataIdFlagToplevelOnly,
(int)ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlLongDataIdTextCharFlagItalic);
cci.ScSetEntityDoubleData("text entity",
(int)ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlDoubleDataIdTextSize |
(int)ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlLongDataIdFlagDontUpdateView |
(int)ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlLongDataIdFlagDontUpdateEntity |
(int)ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlLongDataIdFlagToplevelOnly, 20);
cci.ScSetEntityStringData("text entity",
(int)ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlStringDataIdTextFontName|
(int)ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlLongDataIdFlagDontUpdateView |
(int)ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlLongDataIdFlagDontUpdateEntity |
(int)ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlLongDataIdFlagToplevelOnly, "Arial");
cci.ScChangeTextByName("text entity", "new text");
}
stopWatch.Stop();
mt = stopWatch.Elapsed;
MeasuredTime = String.Format("{0:00}.{1:00}", mt.Seconds, mt.Milliseconds);
MessageBox.Show("measured time with high acceleration: " + MeasuredTime + " s");
stopWatch.Reset();
Table 402: <Short Description>

The last command (here: cci.ScChangeTextByName("text entity", "new text")) should not contain
DontUpdateEntity or DontUpdateview flags, otherwise the entity will not be updated at all.

18 Error Codes
The possible return values of the SAMLight Client Control function calls are normally just 0 or 1, but can
also be a long, double or string value. With the CCI command NewCciErrorReturn, more error return values
are activated. The possible function error return values for more detailed error analysis are:

Client Control Error Codes

Error Code
Command implemented wrong 0
Command run succesful 1
IDispatch error #17: no named entity found -10000
IDispatch error #18: job is empty -10001
IDispatch error #19: function returned 0 ( not ok ) -10002
IDispatch error #20: not allowed in 3D mode -10003
IDispatch error #22: no valid license -10004
IDispatch error #24: Object Out of Field -10006
Table 403: Error Codes

© 2022 SCAPS GmbH


Client Control Interface Manual - Deprecated commands 317

19 Deprecated commands
This chapter contains all deprecated commands. Some of them should not be used anymore, others have
been replaced.

Entity Array Step

Reason Replaced by ArrayCount & ArrayStep.


Command scComSAMLightClientCtrlDoubleValueTypeEntityArrayStepX
scComSAMLightClientCtrlDoubleValueTypeEntityArrayStepY
Table 404: Deprecated Entity Array Step

3D Vari Hatch Angle

Reason Now use Hatch Angle.


Command scComSAMLightClientCtrlDoubleValueType3DVariHatchAngle
Table 405: Deprecated 3D Vari Hatch Angle

Get Top Level Entity Name

Reason Renamed SetToTopLevelEntity.


Command scComSAMLightClientCtrlGetIdStringDataGetTopLevelEntityName
Table 406: Deprecated Get Top Level Entity Name

Entity Name with Type

Reason Use GetEntityTypeAsInSAMLight.


Command scComSAMLightClientCtrlStringValueTypeEntityNamesWithType
Table 407: Deprecated Entity Name with Type

Data Barcode Size

Reason Do not use!


Command scComSAMLightClientCtrlLongDataIdDataBarcodeSize
Table 408: Deprecated Data Barcode Size

Drill Dimension

Reason Do not use!


Command scComSAMLightClientCtrlDoubleValueTypeDrillDimension
Table 409: Deprecated Drill Dimension

Get Mark Count

Reason Use Number Marks Completed.


Command scComSAMLightClientCtrlLongValueTypeGetMarkCount
Table 410: Deprecated Get Mark Count

Entity Name at Top Level

Reason Do not use!


Command scComSAMLightClientCtrlStringValueTypeEntityNameAtTopLevel

© 2022 SCAPS GmbH


Client Control Interface Manual - Deprecated commands 318

Table 411: Deprecated Entity Name at Top Level

Deprecated Motion Go

Reason Use exec command MotionGo.


Command ScCciMotionGo
Table 412: Deprecated Motion Go

Deprecated New Job

Reason Use exec command NewJob.


Command ScCciNewJob
Table 413: Deprecated New Job

Deprecated CW 300

Reason Do not use!


Command scComSAMLightClientCtrlStringValueTypeControlCmdCW300
Table 414: Deprecated CW 300

Deprecated Simulation Mode

Reason Now use DisableSimulationMode


Command scComSAMLightClientCtrlLongValueTypeSimulationMode
Table 415: Deprecated Simulation Mode

Deprecated Auto Compensate

Reason Available but not recommended.


Command ScCciAutoCompensateCal (use:AutoCompensateCal)
ScCciAutoCompensateRef (use:AutoCompensateRef)
ScCciAutoCompensateOff (use:AutoCompensateOff)
Table 416: Deprecated Auto Compensate

Deprecated Buffer Trigger Mode

Reason Available but not recommended.


Command scComSAMLightClientCtrlLongValueTypeQueueLength
scComSAMLightClientCtrlStringDataIdFlagEnqueueCtrlCmd
scComSAMLightClientCtrlStringDataIdFlagEnqueueLastCtrlCmd
Table 417: Deprecated Buffer Trigger Mode

Deprecated Device Style Flag

Reason Do not use!


Command scComSAMLightClientCtrlLongValueTypeDeviceEnableFlagsValue
scComStandardDeviceStyleFlagEnablePort1
scComStandardDeviceStyleFlagEnablePort2
scComStandardDeviceStyleFlagEnableDA1
scComStandardDeviceStyleFlagEnableDA2
Table 418: Deprecated Device Style Flag

© 2022 SCAPS GmbH


Client Control Interface Manual - Deprecated commands 319

Deprecated Enable Motf

Reason Renamed Enable Motf.


Command scComSAMLightClientCtrlLongValueTypeEnableUsc2Motf
Table 419: Deprecated Enable Motf

Deprecated Top Level Entity

Reason Now us Set/GetEntityName with FlagToplevelOnly.


Command scComSAMLightClientCtrlStringDataIdFlagSelected
scComSAMLightClientCtrlStringDataIdGetToplevelEntity
scComSAMLightClientCtrlStringDataIdSetToplevelEntity
Table 420: Deprecated Top Level Entity

Deprecated Fit View

Reason Now use Change View 2D.


Command ScCciFitViewToEntities
ScCciFitViewToSelectedEntities
ScCciFitViewToWorkingArea
Table 421: Deprecated Fit View

Deprecated Optic Matrix

Reason Do not use! Now use Transformations.


Command ScCciGetOpticMatrix
ScCciOpticMatrixReset
ScCciOpticMatrixRotate
ScCciOpticMatrixScale
ScCciOpticMatrixTranslate
ScGetOpticMatrix
ScOpticMatrixReset
ScOpticMatrixRotate
ScOpticMatrixScale
ScOpticMatrixTranslate
Table 422: Deprecated Optic Matrix

Deprecated Base Functions

Reason Do not use!


Command ScCciGetStringDoubleValue
ScCciSetStringDoubleValue
ScCciSetStringLongValue
ScGetLongData
ScGetStringDblValue
ScSetLongData
ScSetLongValue64
ScSetStringDblValue

© 2022 SCAPS GmbH


Client Control Interface Manual - Deprecated commands 320

Deprecated Base Functions

ScSetStringLongValue
ScSetStringLongValue
Table 423: Deprecated Base Functions

Deprecated Entity Changeable


Reason Do not use!
Command scComSAMLightClientCtrlLongDataIdEntityChangeable
Use: NonEditableEntity
Table 424: Deprecated Entity Changeable

Deprecated 3D Surface Value

Reason Commands not used yet!


Command scComSAMLightClientCtrlDoubleValueType3DSurfaceValue12
scComSAMLightClientCtrlDoubleValueType3DSurfaceValue13
scComSAMLightClientCtrlDoubleValueType3DSurfaceValue14
scComSAMLightClientCtrlDoubleValueType3DSurfaceValue15
Table 425: Deprecated 3D Surface Value

Deprecated Remote

Reason Do not use/renamed!


Command ScCloseEthernetConnection
ScOpenEthernetConnection
Use: ScOpenTCPConnection
ScOpenUDPConnection
Table 426: Deprecated Remote

Deprecated Save View 3D Bitmap

Reason Renamed.
Command scComSAMLightClientCtrlDoubleValueTypeSaveView3DBitmapDPI
Use: SaveView2DBitmapDPI
scComSAMLightClientCtrlDoubleValueTypeSaveView3DBitmapVariableSize
Use: SaveView2DBitmapVariableSiz
scComSAMLightClientCtrlDoubleValueTypeSaveView3DBitmapX
Use: SaveView2DBitmapX
scComSAMLightClientCtrlDoubleValueTypeSaveView3DBitmapY
Use: SaveView2DBitmapY
scComSAMLightClientCtrlDoubleValueTypeSaveView3DBitmapXW
Use: SaveView2DBitmapXW
scComSAMLightClientCtrlDoubleValueTypeSaveView3DBitmapYW
Use: SaveView2DBitmapYW
Table 427: Deprecated Save View 3D Bitmap

Deprecated Alpha Blend

Reason Replaced by Screenshot.


Command scComSAMLightClientCtrlDoubleValueTypeBmpAlphaBlendDimXTo

© 2022 SCAPS GmbH


Client Control Interface Manual - Deprecated commands 321

Deprecated Alpha Blend

scComSAMLightClientCtrlDoubleValueTypeBmpAlphaBlendDimYTo
scComSAMLightClientCtrlDoubleValueTypeBmpAlphaBlendPointXTo
scComSAMLightClientCtrlDoubleValueTypeBmpAlphaBlendPointYTo
scComSAMLightClientCtrlLongValueTypeBmpAlphaBlendBmpDimX
scComSAMLightClientCtrlLongValueTypeBmpAlphaBlendBmpDimY
scComSAMLightClientCtrlLongValueTypeBmpAlphaBlendCenterPointX
scComSAMLightClientCtrlLongValueTypeBmpAlphaBlendCenterPointY
scComSAMLightClientCtrlLongValueTypeBmpAlphaBlendSourceConstantAlpha
scComSAMLightClientCtrlLongValueTypeBmpAlphaBlendUpperLeftPointX
scComSAMLightClientCtrlLongValueTypeBmpAlphaBlendUpperLeftPointY
scComSAMLightClientCtrlStringValueTypeBmpAlphaBlendPathBmp
Table 428: Deprecated Alpha Blend

Deprecated Entity Mark Flags

Reason Replaced by EntityOpticFlags


Command scComSAMLightClientCtrlLongDataIdEntityMarkFlags
scComSAMLightClientCtrlLongDataIdEntityMarkFlagMarkContour
scComSAMLightClientCtrlLongDataIdEntityMarkFlagMarkHatch
Table 429: Deprecated Entity Mark Flags

Deprecated Interface Version


Reason Do not use!
Command ScGetInterfaceVersion
ScCciGetInterfaceVersion
Table 430: Deprecated Interface Version

Deprecated SPI laser specials

Reason Renamed.
Command scComSAMLightClientCtrlLongValueTypeSpiG3Cw
Use: SpiCw
scComSAMLightClientCtrlLongValueTypeSpiG3Waveform
Use: SpiWaveform
Table 431: Deprecated SPI laser specials

Deprecated IO Control Object Parameter

Reason Replaced by IoControlObjectMask and IoControlObjectStates.


Command scComSAMLightClientCtrlLongDataIdEntitySetInOutValue
scComSAMLightClientCtrlLongDataIdEntitySetInOutLevel
scComSAMLightClientCtrlLongDataIdEntityGetInOutValue
scComSAMLightClientCtrlLongDataIdEntityGetInOutLevel
Table 432: Deprecated IO Control Object Parameter

© 2022 SCAPS GmbH

You might also like