Scaps Programming PDF
Scaps Programming PDF
Programmers Guide
Working with Entities
04.02.2009
SCAPS GmbH
Scanner Application Software
Bahnhofstrasse 17, D-82041 Deisenhofen, Germany
Phone: ++49 - 89 452290 0
Fax:
++49 - 89 - 452290 29
URL:
www.scaps.com
e-mail:
info@scaps.com
Contents
1 Introduction..................................................................................................................4
1.1 Version History.........................................................................................................4
1.2 Safety.......................................................................................................................4
1.3 Overview..................................................................................................................4
2 Description....................................................................................................................5
2.1 Basic Types...............................................................................................................5
2.2 Class Hierarchy........................................................................................................6
3 Generation....................................................................................................................7
4 Groups............................................................................................................................9
4.1 Adding and Removing of Entities............................................................................10
4.2 Iteration...................................................................................................................11
4.3 Index and Order......................................................................................................13
4.4 Clusters...................................................................................................................15
5 Containers...................................................................................................................16
6 Elements......................................................................................................................18
6.1 PolyLine...................................................................................................................19
6.1.1 Adding,Setting and Getting Points.............................................................................................19
6.2 LineArray.................................................................................................................22
6.3 Example..................................................................................................................23
6.4 PixelArray................................................................................................................25
7 Property Assignment..................................................................................................29
7.1 General Properties..................................................................................................29
7.1.1 VariantProperties.......................................................................................................................29
7.1.1.1 ExposureProperty................................................................................................................30
7.1.1.2 HatchProperty......................................................................................................................32
7.1.1.2.1 Beamcompensation......................................................................................................36
7.1.1.3 EntityProperty......................................................................................................................38
7.1.1.4 RenderProperty...................................................................................................................39
7.1.2 FixedProperties..........................................................................................................................40
11.1.1.2.2 ScEntity3DContainer................................................................................................117
11.1.1.2.3 ScGroup3D..............................................................................................................117
11.1.1.2.3.1 ScEntities3D......................................................................................................118
11.1.2 ScControlMotion....................................................................................................................118
11.1.3 ScControlAdIo.......................................................................................................................121
12 Function Reference................................................................................................123
12.1 Interface Functions of sc_kernel.dll...................................................................123
12.2 Interface Functions of sc_tria_slicer.dll..............................................................130
13 Index........................................................................................................................132
1 Introduction
Changes
Author
16.12.2008
michael.pfeiffer@scaps.com
04.02.2009
michael.pfeiffer@scaps.com
12.02.2009
michael.pfeiffer@scaps.com
1.2 Safety
The goods delivered by SCAPS are designed to control a laser scanner system. Laser radiation may
effect a person's health or may otherwise cause damage. Prior to installation and operation compliance
with all relevant laser safety regulations has to be secured. The client shall solely be responsible to strictly
comply with all applicable and relevant safety regulations regarding installation and operation of the
system at any time.
The goods will be delivered without housing. The client shall be solely responsible to strictly comply with
all relevant safety regulations for integration and operation of the goods delivered.
1.3 Overview
The main intention of this paper is to cover the frequently used principles and commands for working with
entities. The scope is restricted to 2D entities only. Future releases will also cover the 3D entities or they
are described in a separate document. This paper should give the SAM2D user a compact overview about
the main manipulation possibilities for entities and should show on practical examples how specific tasks
can be programmed. It will be extended in future in respect to customer needs. The syntax of the function
calls and programming examples are similar to the VB- Basic Syntax. For other programming languages
the calling conventions may differ. Please contact SCAPS GmbH for further information about that.
2 Description
2.1Basic Types
There are 3 main types of entities.
Groups
Containers
Elements
Groups and Containers can be thought as structuring entities. Elements keep the real data like points,
lines and pixels.
Inside this manual all entities are of the basic type ScEntity2D. So, when referring to a group, container or
element a Group2D,Container2D or Element2D can be substituted.
ScObject
ScEntity
ScEntity2D:
ScEditGroup2D
ScElement2D
ScLineArray2D:
ScHatch:
ScPixelArray2D:
ScScannerPixelArray2D:
ScPointCloud2D
ScPolyLine2D:
ScEllipse2D:
ScRectangle2D:
ScSpline2D
ScTriangle2D:
ScSpiral2D
ScSingleLine2D (deprecated)
ScEntity2DContainer:
ScBarCode12Chars2D:
ScLayer:
ScChar2D
ScBarCode:
ScBarCode12:
ScBarCode39:
ScWinText2D:
6 Elements
6 Elements
6 Elements
6.4 PixelArray
6 Elements
6 Elements
6 Elements
6 Elements
6.3 Example
3 Generation, 5 Containers
5 Containers
7.2.2 BarCodeProperties
5 Containers
5 Containers
5 Containers
ScVarEntity2D
ScSequence2D
ScSerialNumber2D:
ScGroup2D:
ScEntities2D
5 Containers
4 Groups
ScJobRoot
ScChars2D
ScBarCodeChars2D
ScBarCode39Chars2D
ScWinTextChars2D:
ScEntities2D:
ScJobRoot:
ScLineArrays2D:
ScPixelArrays2D:
ScPolyLines2D:
3 Generation, 4 Groups
3 Generation, 4 Groups
7.2.3 SerialNumberProperties
4 Groups
4 Groups
4 Groups
ScChain2D
ScControl
ScEvent
ScControlMotion
ScControlAdIo
The 3D-entities have to be used like their two-dimensional pendants and therefore are not described
separately, please refer to the description of the 2D-entities too:
ScObject
ScEntity
SC_Entity3D
SC_EditGroup3D
SC_Element3D
SC_LayerSolid
SC_LineArray3D:
6 Elements
SC_LineBox3D
SC_PixelArray3D:
6 Elements
6
SC_PointCloud3D
SC_PolyLine3D:
SC_TriaMesh3D
6 Elements
SC_TriaSolid
SC_TriaBox
SC_TriaCone
SC_TriaCylinder
SC_TriaSphere
SC_Entity3DContainer:
SC_Group3D:
SC_Entities3D:
SC_LineArrays3D:
SC_PolyLines3D:
6.3 Example
4 Groups
3 Generation, 4 Groups
4 Groups
4 Groups
3 Generation
construction
the main job
the properties
the view to display
TextGroup.ScUpdateProperties
gGroupView2d.ScAdd TextGroup
'
'
'
'
the next line is only necessary if working with the view to display
gV2dCtrl.ScGetView2D.ScNewVisual TextGroup, 0
4Groups
Index
Entity0
Entity1
Entity2
Entity3
HOF
Iteration,
Marking
TOL
HOF
TOL
The single entities inside a group are referenced by an index, name or can be retrieved by an iteration
process.
The iteration process and also the marking process starts always on HOL and goes towards the TOL
'
'
'
'
'
'
'
'
The removing of an entity from a group is performed by ScGroup2D.ScRemove(). This method is also
available for the ScGroup2D type, because there is no type checking necessary.
Dim Group As ScGroup2D
Dim Text As ScWinTextChars2D
Set Group = Job
Set Text = new ScWinTextChars2D
Job.ScAdd Text
Group.ScRemove Text
' this line will work, because ScGroup2D offers the
' ScRemove method
When adding an entity to a group which is already inside another group the entity will automatically be
removed from the other group before adding to the new group.
Dim G1 As ScEntities2D
Dim G2 As ScEntities2D
Dim Text As ScWinTextChars2D
Set G1 =
Set G2 =
Set Text
G1.ScAdd
G2.ScAdd
new ScEntities2D
new ScEntities2D
= new ScWinTextChars2D
Text
' now the text is added to the group G1
Text
' the entity text will automatically be removed from G1 and
' added to G2
10
4.2Iteration
The main steps to iterate through a group are:
1. Call ScIterationStart() with the flags of entities to iterate
2. .. n. Call the ScGetNext() function subsequently
n+1. Call ScIterationEnd() at the end of the iteration
Dim Entity As ScEntity2D
Job.ScIterationStart scComEntityUsed
As constants for the ScIterationStart() call the following values are allowed. These constants are
defined in ScapsSamKernel type library:
scComEntityUsed returns used entities this is also the default and should be used normally
scComEntitySelected returns all selected entities
The statement
Job.ScIterationStart 0
will return all entities inside the group regardless whether they are marked as used and/or selected.
Please note: Inside an iteration loop calls to ScRemove(), ScAdd() and ScMoveEntity() are not
allowed and may lead to undefined results because they destroy the iteration context.
Dim Entity As ScEntity2D
Job.ScIterationStart scComEntityUsed
Set Entity = Job.ScGetNext
While Not Entity Is Nothing
Job.ScRemove Entity
' not allowed
Job.ScAdd Entity
' not allowed
Job.ScMoveEntity 0,4
' not allowed
Set Entity = Job.ScGetNext
Wend
Job.ScIterationEnd
Instead use a similar code as described under Entity.ScUsed() in chapter FixedProperties
The ScIterationEnd() statement must be set after a ScIterationStart() statement otherwise
the group remains in the iteration state.
Public Function GetFirstSelectedEntity(Group As ScGroup2D) As ScEntity2D
11
G1 As
G2 As
Text1
Text2
ScEntities2D
ScEntities2D
As ScWinTextChars2D
As ScWinTextChars2D
12
Entity
Index
Text1
0
Text2
1
The entities inside G1
Entity
Index
Text1
Text2
Text3
Text4
Entity
Index
Text3
Text1
Text2
Text4
G1.ScMoveEntity 2,0
A swap function for exchanging two entity locations could be implemented as follows:
Public Sub Swap(Group As ScGroup2D,I1 As long,I2 As long)
if I1=I2 then exit sub
if I1 > I2 then
Group.ScMoveEntity I1, I2
Group.ScMoveEntity I2+1, I1
else
Group.ScMoveEntity I1, I2
Group.ScMoveEntity I2-1, I1
end if
End Sub
13
The ScGetEntityByName() and ScGetNameCount() methods allow to retrieve entities by their name.
If there are more entities with the same name inside the group the entity with the lowest index is returned
by the method ScGetEntityByName().
Dim
Dim
Dim
Dim
Dim
G1 As
Text1
Text2
Text3
Text4
ScEntities2D
As ScWinTextChars2D
As ScWinTextChars2D
As ScWinTextChars2D
As ScWinTextChars2D
Text1
Text2
Text3
Text4
'
'
'
'
'
'
returns 2
returns 1
returns the entity Text1
returns the entity Text3
because Text3 was first
added to the
14
4.4Clusters
Clustering a group has it main influence regarding hatching. The example below is a group of the letter 0
and of a rectangle.
not clustered
clustered
When the group is clustered than the hatcher treats it as one entity with the result that overlapping areas
will be handle as intersections. With a non clustered group the 0 and the rectangle will be treated as two
independent entities.
The clustering can be switched on and off with
ScClusterID(ID as long)
ID = 0 , switch clustering off
ID = 1 , switch clustering on
15
5 Containers
Containers keep a clear defined number and type of sub entities. This sub entities can not be removed
and also no new sub entity can be added. The sub entities itself are mainly of group type. To/From that
groups of course entities can be added, removed etc.
Containers are the ScLayer, ScSerialNumber2D, ScWinText2D, and the ScBarCode12Chars2D
entity.
Entity
Index
Entity0
Entity1
Entity2
.......
......
Iteration,
Marking
SubEntityType
Comment
ScPolyLines2D
ScLineArrays2D
16
SubEntityType
Comment
ScEntities2D
ScBarCode12
SubEntityType
Comment
ScEntity2D
17
6Elements
Basic element types are ScLineArray, ScPolyLine and ScPixelArray. They keep items of the
corresponding kind in sequential order. For ScLineArray the item is a line with p0,p1 as start and end
point. For ScPolyLine the item is a point p.
For ScPixelArray the item is a pixel with gray value
18
The items inside an element are organized in a zero based array and the marking order goes from 0 to
(item count -1)
Item
0
Marking order
1
2
3
All elements have the read only properties ScItemCount, ScItemSelectCount and
ScItemUsedCount.
ScItemCount returns the total number of items inside the element.
ScItemSelectCount returns the number of selected items inside the element and ScItemUsedCount
the number of used items. This both methods are only used in special application context.
In the standard applications ScItemUsedCount is equal ScItemCount and ScItemSelectCount is 0.
The user should mainly use the ScItemCount property.
6.1PolyLine
6.1.1Adding,Setting and Getting Points
Exchanging data between a ScPolyLine2D entity is done over the methods:
long ScAddPointsInProc(sc_com_point_tag* Array,long Size,long Count)
for adding points starting at location ScItemCount
long ScGetPointsInProc(sc_com_point:tag* Array,long Size,long Start,long
Count)
for getting points starting at a defined index
long ScSetPointsInProc(sc_com_point_tag* Array,long Size,long Start,long
Count)
for settings points on valid index locations
The parameter Count specifies the number of items to transfer.
The parameter Size has historical reasons. Set it equal to Count.
The parameter Start should be a valid item index.
19
All 3 methods are using the type sc_com_point_tag which is defined in the ScapsSamLines2D type
library.
Type sc_com_point_tag
X As Double
Y AsDouble
Status As Long
End Type
The member Status should be always set to 0 in the current release.
' Generating a rectangle with (0,0),(0,100),(100,100),(100,0)
Dim PolyLine As ScPolyLine2D
Set PolyLine = New ScPolyLine2D
Job.ScAdd PolyLine
PolyLine.ScUpdateProperties
Dim points(10) As sc_com_point_tag
points(0).status = 0
points(0).x = 0
points(0).y = 0
points(1).status = 0
points(1).x = 0
points(1).y = 100
points(2).status = 0
points(2).x = 100
points(2).y = 100
points(3).status = 0
points(3).x = 100
points(3).y = 0
points(4)= points(0)
set it to zero
1
0,4
set it to zero
20
points(0).status = 0
set it to zero
points(0).x = 0
points(0).y = 0
PolyLine.ScAddPointsInProc points(0), 1, 1
21
6.2LineArray
The working with linearrays is similar than that for polylines
long ScAddLinesInProc(sc_com_line_tag* Array,long Size,long Count)
long ScGetLinesInProc(sc_com_line_tag* Array,long Size,long Start,long Count)
long ScSetLinesInProc(sc_com_line_tag* Array,long Size,long Start,long Count)
All parameters have similar meanings than for the corresponding methods of the polyline
The type sc_com_line_tag is defined as follows:
Type sc_com_line_tag
X0 As Double
' start of the line
Y0 AsDouble
X1 As Double
Y1 AsDouble ' end of the line
Status As Long
End Type
The member Status should be always set to 0 in the current release.
22
6.3Example
' this function shows all vectors from ScPolyLines and ScLineArray
' inside the entity
' the vectors are displayed in a MessageBox
Public Sub show_all_vectors(entity As ScEntity2D)
' case switch to the different kind of entities
If entity.ScIsTypeOf(scComObjectGroup2D) Then
' iterate through group and call show_all_vectors for each entity
Dim group As ScGroup2D
Set group = entity
group.ScIterationStart 1
Dim ent As ScEntity2D
Dim Cont As Boolean
Cont = True
While Cont = True
Set ent = group.ScGetNext
If ent Is Nothing Then
Cont = False
Else
show_all_vectors ent
End If
Wend
group.ScIterationEnd
ElseIf entity.ScIsTypeOf(scComObjectEntity2DContainer) Then
' iterate through container (ScLayer is a container) and call
' show_all_vectors for each entity
Dim container As ScEntity2DContainer
Set container = entity
Dim i, num_entities As Long
num_entities = container.ScGetNumEntities
Dim cont_entity As ScEntity2D
For i = 0 To num_entities - 1
Set cont_entity = container.ScGetEntity(i)
show_all_vectors cont_entity
Next i
' the next are elments really keeping data
ElseIf entity.ScIsTypeOf(scComObjectPolyLine2D) Then
Dim poly_line As ScPolyLine2D
Set poly_line = entity
Dim item_count As Long
item_count = poly_line.ScItemCount
If item_count > 0 Then
Dim point As sc_com_point_tag
' read back the points into sc_com_point_tag
poly_line.ScGetPointsInProc point, 1, 0, 1
Dim s As String
s = "PolyStart at "
s = s + str(point.x)
s = s + " , "
s = s + str(point.y)
MsgBox s
For i = 1 To (item_count - 2)
poly_line.ScGetPointsInProc point, 1, i, 1
s = "PolyPoint at "
23
s = s + str(point.x)
s = s + " , "
s = s + str(point.y)
MsgBox s
Next i
poly_line.ScGetPointsInProc point, 1, item_count - 1, 1
s = "PolyEnd at "
s = s + str(point.x)
s = s + " , "
s = s + str(point.y)
MsgBox s
End If
ElseIf entity.ScIsTypeOf(scComObjectLineArray2D) Then
Dim line_array As ScLineArray2D
Set line_array = entity
Dim line_count As Long
line_count = line_array.ScItemCount
If line_count > 0 Then
Dim line As sc_com_line_tag
For i = 0 To (line_count - 1)
line_array.ScGetLinesInProc line, 1, i, 1
s = "Line From x = "
s = s + str(line.x0)
s = s + " , y = "
s = s + str(line.y0)
s = s + " To x = "
s = s + str(line.X1)
s = s + " , y = "
s = s + str(line.Y1)
MsgBox s
Next i
End If
End If
End Sub
24
6.4PixelArray
The pixel array entity is mainly used to handle rasterized data.
The ScPixelArray2D entity provides all functionality to allocate and modify a 2-dimensional array of
pixels. The entity ScScannerPixelArray2D is derived from the ScPixelArray2D and provides some
special conversion functions.
The output process can only handle entities of type ScScannerPixelArray2D.
For allocation of a pixel array 2 steps are necessary.
1.)Define the pixel format
Define the array size.
The pixel format is defined with the ScPixelFormat property.
Constant definition
scComPixelFormatUChar1
Value
Meaning
scComPixelFormatDouble
1 pixel
allocates 1
Byte. This
format is
typical used
for gray
scale
bitmaps
scComPixelFormatBit
1 pixel
allocates 8
Byte. Only
used in rare
cases for
special
applications
.
1 pixel
allocates 1
Bit. For
large
monochrom
e bitmaps
this format
reduces
allocated
memory
size.
With the above values the size of one pixel is 1 field unit (for example 1 mm) which is normally too large
for the practical use. So the user may use the ScScale() method to scale the pixel array to the wanted
size.
An other commonly used definition is DPI to get the field unit size of 1 pixel. This value is often provided in
rasterized input data. Therefore the Xstep, YStep and Xdim, YDim can be directly set to the correct
value.
The pixel value can be get and set with the methods:
ScSetAt(XIndex as long, YIndex as long, Value as double)
ScGetAt(XIndex as long, YIndex as long) as double
XIndex and YIndex are zero based indices into the pixel array.
The actual array size will be returned by the methods ScGetXSize , ScGetYSize
26
as
Value
Meaning
scComPixelConvertMethodErrorDiffusion
scComPixelConvertMethodGrayScale
Before calling the method, the ScScannerPixelArray2D must be initialized with the desired pixels size
in X, Y. This pixels size is also called dither step.
When the scComPixelConvertMethodGrayScale method is used the scComPixelFormatUChar
format must be set.
During the generation the dither step and generation method is stored in the pixel array transferred to the
method.
This properties can be read with the ScGetPropertyVariant methods for later reuse.
For the pixel array property the property idents are as follows:
Const PAP1= &H54b9ccc2
Const PAP2= &Hf4b411d1
Const PAP3= &H8e180080
Const PAP4= &H48e1ad3f
The dither step has variant id 0 , the generation method variant id 1. The param id parameter is always 0
for both properties.
Dim pa As ScPixelArray2D
Dim l As ScLayer
Dim pas As ScPixelArrays2D
Set pa= New ScPixelArray2D
Set l= New ScLayer
Set pas= l.ScGetPixelArrays
pas.ScAdd pa
l.ScUpdateProperties
gView2DCtrl.ScGetView2D.ScEntityGroup.ScAdd l
' alloc the bitmap size
pa.ScPixelFormat=scComPixelFormatUchar
pa.ScAlloc 0,0,2,2,0.1,0.1
27
Dim
Dim
Dim
Dim
i As Long
k As Long
xs As Long
ys As Long
xs=pa.ScGetXSize
ys=pa.ScGetYSize
For i=0 To xs
For k=0 To ys
pa.ScSetAt i,k,i/xs*255
Next k
Next i
pa.ScUpdate
l.ScUpdate
Dim sc As ScScannerPixelArray2D
Set sc= New ScScannerPixelArray2D
pas.ScAdd sc
l.ScUpdateProperties
' set the dither step
' NOTE: the step of the original bitmap and the scanner bitmap must not be the
' same.
' But it is recommended that the x and y dither step is the same
sc.ScSetStep(1,1)
' The Format must be scComPixelFormatUchar For Gray scale
sc.ScPixelFormat=scComPixelFormatUchar
' make the conversion
sc.ScGenerate pa,scComPixelConvertMethodGrayScale
' During that generation the dither step and the generation method are stored
' in pixelarray property of entity pa for later reuse display the values for
' dither step and generation method
MsgBox "Dither step " + Str(pa.ScGetPropertyVariant(PAP1,PAP2,PAP3,PAP4,0,0))
MsgBox "Generation Method " +
Str(pa.ScGetPropertyVariant(PAP1,PAP2,PAP3,PAP4,1,0))
gView2DCtrl.ScGetView2D.ScNewVisual(l,1)
gView2DCtrl.ScGetView2D.ScSetVisible pa,1
gView2DCtrl.ScGetView2D.ScSetVisible sc,1
' this is a special call for the ScScannerPixelArray2D entity to become
' visible
gView2DCtrl.ScGetView2D.ScSetDisplay sc,4,0
l.ScSelected=1
gView2DCtrl.ScGetView2D.ScFitToSelected
gView2DCtrl.ScGetView2D.ScUpdate 1
28
7Property Assignment
7.1General Properties
The general properties are common to all entities derived from the basic Entity2D.
7.1.1VariantProperties
The main intention of the variant properties approach, is to allow attachable property definitions to entities.
Each property is organized in an array of variable size of type Variant and is identified by four long
Numbers P0 - P3 and one additional called ParamId.
In the current state there are 3 standard properties which are defined by SCAPS. Additional SCAPS
properties and user definable properties will be attached in future releases. The properties attached to the
entity will also be copied, saved and loaded if the corresponding entity functions are called.
29
The access to the variant properties are done over the two functions
OldValue = Entity.ScGetPropertyVariant(P1, P2, P3, P4, VariantId, ParamId)
Entity.ScSetPropertyVariant P1, P2,P3, P4, VariantId, ParamId, NewValue
VariantId, ParamId are also from type long.
The VaraintId keeps the array index.
With the ParamId it is possible to access more than one property of the same type. The ScLayer entity
for example keeps 5 different Exposure property Variant Tables.
The type and range of OldValue and NewValue depends on how the Variant is defined inside the
variant array. The current supported types are long, double and String.
7.1.1.1ExposureProperty
Const EP1 = &H113F7A
Const EP2 = &HCC8211D1
Const EP3 = &H8C6C0080
Const EP4 = &H48EEDCB8
VariantId
Type
Range
Function
Long
>0
Pen ID
String
long
Long
Double
Meaning
-1
30
Example:
Dim
Dim
Dim
Dim
orgpen As Long
newpen As Long
VariantId As long
ParamId As long
VariantId=0
ParamId=0
newpen=2
orgpen = Entity2D.ScGetPropertyVariant(EP1, EP2, EP3, EP4, VariantId, ParamId)
ParamId=-1
to all entities inside
Entity2D.ScSetPropertyVariant EP1, EP2, EP3, EP4, VariantId,ParamId, newpen
' next line is only necessary if you want the view to display the new colors
' for changed pens
ScGetKernelMessageCtrl1.ScSendUpdateEx
scKernelMessageUpdateExScExposurePropertyChanged, Entity2D
31
7.1.1.2HatchProperty
Const EP1 = &H71AB7485
Const EP2 = &HEFE811D1
Const EP3 = &H8C7D0080
Const EP4 = &H48EEDCB8
VariantId
Type
Function
Long
Double
Hatch1 Distance
Double
Hatch1 Angle
Long
Double
Hatch2 Distance
Double
Hatch2 Angle
Double
Double
Double
Double
10
Double
11
Double
12
Double
13
Double
14
Double
15
Double
16
Double
17
Double
18
Double
19
Double
20
Double
beam_compensation_num_loops1
21
Double
beam_compensation_num_loops2
32
Flag
Value
scComHatcherStyleHatch
Meaning
scComHatcherStyleFlip
scComHatcherStyleDirVertFlip;
0x10 ""
ScComHatcherStyleRadial
0x20 ""
ScComHatcherStyleNoJump
0x40 ""
ScComHatcherStyleNoMarkAsJump
0x80 ""
ScComHatcherStyleNoSort
ScComHatcherStyleHatchAllLines
scComHatcherStyleHatchAddPolyLineB
eamComp
scComHatcherStyleHatchBeamCompDont
FillRest
scComHatcherStyleHatchAddPolyLineU
seBeamComp
scComHatcherStyleUseTransformedVal
uesForHatch
scComHatcherStyleHatchBeamCompCrea
teSeparateObject
33
NoMarkAsJump
Comment
Default
Sorting in clock
wise direction
34
NoMarkAsJump
Comment
The
minimum
jump length
must be set
to a
appropriate
value
The
minimum
jump length
must be set
to a
appropriate
value
Applies only
to
Rectangle,
Ellipse,
Triangle
structures in
the current
version
35
7.1.1.2.1Beamcompensation
The Variant IDs 18 and 19 defines the beam compensation for hatch 1 and hatch2 respectively.
For the direction of the beam compensation the orientation of the contour and the sign of the beam
compensation value is important. When walking in the direction of the contour a positive beam
compensation will move the contour to the left side when looking into the walking direction.
On the letter 0 for example the orientation of the contours and a positive beam compensation value have
the following result.
Figure 5 : Orientation of contours and beam compensation
36
Example:
' definition of the hatch property id's
Const
Const
Const
Const
EP1
EP2
EP3
EP4
=
=
=
=
&H71AB7485
&HEFE811D1
&H8C7D0080
&H48EEDCB8
37
7.1.1.3EntityProperty
Const EP1 = &HD818B7E3
Const EP2 = &H5C6111D2
Const EP3 = &H9A690080
Const EP4 = &H48EEE00C
The variant EntityProperty is a general purpose set of Variants which have no specific meaning and
can be used to attach application specific information to every single entity. The set has 6 variants, 3 are
of type double and 3 are of type string.
VariantId
Typ
Double
Double
Double
String
String
String
38
7.1.1.4RenderProperty
Const EP1 = &H8163A387
Const EP2 = &HC0D846D6
Const EP3 = &HA5649CD6
Const EP4 = &HB1F1852F
The ParamId value must be set to 0.
VariantId
Type
Function
long
long
RGB color
double
long
Render Flags
Name
Value
Meaning
ScComViewVisualFlagPropertyEnable
The Dot mask is a 32 bit mask to determines which screen pixel with a line is rendered. This can be used
to define different line styles.
Examples:
Dot mask
Hex
Hex
Hex
Line Dots
39
7.1.2FixedProperties
The fixed properties of an entity are defined by their specific property type and access function. They are
seen as a property set which every entity should have independent from the specific application. In
contrast to the Variant properties they can only be extended by SCAPS and an update of the library set.
The position properties are handled in a separate chapter.
Entity.ScName
The Name is of type string and can be used for setting an entity name. Setting a name is not required, the
default is an empty string. The main purpose of a name is to identify an entity uniquely. There is no check
of double naming. It is in the response of the programmer to avoid double naming.
The following example shows a function to find an entity with name <Name> inside a group.
For the code related to group iteration function calls, please refer to chapter Iteration.
Example:
Public Function FindObjectWithName(Group As ScEntities2D, Name As String) As
ScEntity2D
Dim entity As ScEntity2D
Group.ScIterationStart 1
Set entity = Group.ScGetNext
While Not entity Is Nothing
If entity.ScName = Name Then
Set FindObjectWithName = entity
Group.ScIterationEnd
Exit Function
End If
Set entity = Group.ScGetNext
Wend
Group.ScIterationEnd
Set FindObjectWithName = Nothing
End Function
Entity.ScSelected
Can be used to identify an entity as selected (ScSelected=1). Selecting or Unselecting (ScSelected=0
(default)) a group will automatically Select/Unselect sub entities
Example:
Public Function MarkSelectedEntities(Group As ScEntities2D, Name As String) As
long
Dim entity As ScEntity2D
MarkSelectedEntities =0
Group.ScIterationStart 1
Set entity = Group.ScGetNext
40
Entity.ScUsed
This flag marks an entity as used (ScUsed=1 (default)) or Unused (ScUsed=0). This flag is mainly used
in connection with the Group.ScPack() command . When calling the function ScPack(0) all entities
inside the group which are marked as unused are removed from the group. Calling ScPack(1) removes
all entities.
Example:
Public Function DeleteSelectedEntities(Group As ScEntities2D, Name As String)
As long
Dim entity As ScEntity2D
DeleteSelectedEntities =0
Group.ScIterationStart 1
Set entity = Group.ScGetNext
While Not entity Is Nothing
If entity.ScSeletced = 1 Then
entity.ScUsed=0
' mark the entity as unused
DeleteSelectedEntities = DeleteSelectedEntities+1
End If
Set entity = Group.ScGetNext
Wend
Group.ScIterationEnd
Group.ScPack 0
' removes all entities which are marked as
' unused
End Function
Entity.ScMarkAble
Can be used to set an entity as markable (ScMarkAble=1, default) or not markable (ScMarkAble=0).
When sending the entity to OpticModule the entity will be not marked when the ScMarkAble flag is set to
0.
Please refer for the example below also to the example given under Entity.ScSelected
Example:
Public Function MarkSelectedEntities(Group As ScEntities2D, Name As String) As
long
Dim entity As ScEntity2D
41
MarkSelectedEntities =0
Group.ScIterationStart 1
Set entity = Group.ScGetNext
While Not entity Is Nothing
If entity.ScSeletced = 1 Then
entity.ScMarkAble =1
MarkSelectedEntities = MarkSelectedEntities+1
else
entity.ScMarkAble =0
End If
Set entity = Group.ScGetNext
Wend
Group.ScIterationEnd
MarkEntity Group
End Function
42
Entity.ScChangeAble
The Entity.ScChangeAble can be used to mark an entity that it should not be changed by the user.
The GUI, mainly the ScView2D object checks this flag and doesn't allow the selection of the entity when
ScChangeAble is set to 0. The default value of ScChangeAble is 1. Setting or Resetting this flag for a
group will also set or reset the flag on all sub entities.
The changeable flag has no influence when accessing an entity by program code.
43
EP0
EP1
EP2
EP3
=
=
=
=
&H71AB7485
&HEFE811D1
&H8C7D0080
&H48EEDCB8
Const PI = 3.14159265358979
Text.ScOrientation = PI/2 means vertical text
'Text.ScOrientation = 0 for horizontal text
Text.ScSpacing = 100;
Text.ScSize = 10
Text.ScGenerate
7.2.1.1Orientation
44
The Text.ScOrientation property is an angle defined in respect to the base line of the text. It is used
for vertical Text orientation. Always the absolute value is taken. Only 0 and +PI/2 are currently supported
as orientation angle. Setting PI/2 will be converted to +PI/2.
Orientation
Angle
45
LSB
RSB
EM
BaseLine
CW
X
Figure 7: The character cell
For every character a LSB and RSB set is defined which influences the spacing between characters.
LSB: LeftSideBearing Defines the gap between the start of the character cell to the beginning of this
character
RSB: RightSideBearing - Defines the gap between the end of this character to the end of the character
cell.
CW : The Cell Width of the Character.
AB C
R L
RSB
LSB
R L
46
This baseline defines the line between the font's ascent and descent parameters.
Ascent
Descent
Ag
Height
BaseLine
The above two text outlines are both created with the same size. But the corresponding height of the
outlines are different.
To force the outlines to have the same height (as shown above) the functions described in Position, Size
and Rotation can be used.
DIM xo as Double,yo as Double, xu as Double, yu as Double
DIM size as double
size = 5 '5 mm height
xo = Text.ScOutline(0)
yo = Text.ScOutline(1)
xu = Text.ScOutline(2)
yu = Text.ScOutline(3)
'
'
'
'
'
'
'
'
retrieve
corner
retrieve
corner
retrieve
corner
retrieve
corner
47
48
A B
CAn
CWn
CWn+1
CWnt
CAn = CWn(Text.ScSpacing-1)
CWnt = CWn +Can
With Text.ScSpacing=1 the spacing defaults to the standard spacing defined inside the TTF.
The Text.ScLineSpacing property is defined as following:
SP
BaseLine
SP = Text.ScSize * Text.ScLineSpacing
The above line will be generated by:
Text.ScFont = "Simple Straight 2"
Text.ScChar = "12345" + Chr(13) + Chr(10) + "12345"
49
Please note that carriage return and line feed control characters must be added to the string to cause a
new line.
50
7.2.1.3Alignment
Baseline
ABC
10,10
Text.ScChar = "ABCg"
Text.ScFont = "Bauhaus Md BT"
Text.ScAlign = 0
Text.ScTranslate 10, 10
Text.ScGenerate
In the default alignment the reference point is located at height of the base line and at the start of the first
character cell. Initially after entity creation the reference point (XR,YR) is at (0,0). In the above example
the reference point will be shifted to (10,10) by the ScTranslate() command.
In ScapsSAMKernel type library the following align flags are defined:
scComAlignBottom
scComAlignCenter
scComAlignLeft
scComAlignMiddle
scComAlignRight
scComAlignTop
This flags are defined in respect to the text entity outline itself.
51
scComAlignTop Or scComAlignLeft
scComAlignTop Or scComAlignRight
scComAlignBottom Or scComAlignLeft
scComAlignButtom Or
When the corresponding flags are set, the text will be shifted that (XR,YR) is equal the corresponding
outline point.
Text.ScAlign = scComAlignBottom Or scComAlignLeft
' Or is a bitwise Or
' operator
The bottom left corner will have the coordinates (10,10) in the above example.
(XR,YR)
scComAlignRight Or
scComAlignCenter Or
scComAlignCenter Or
scComAlignMiddle
scComAlignBottom
scComAlignMiddle
BaseLin
e
scComAlignCenter
Figure 16: Alignment Flags
52
7.2.1.4Resolution
The Text.ScPointResolution can be used to reduce/increase the amount of points generated during
TTF Vector format conversion.
ScPointResolution
0.3
The result depends on the specific font design. It only has an influence on the spline to vector conversion.
7.2.1.5Style
The Text.ScCharFlags and Text.ScWeight properties allow to select various styles for a TTF
commonly know in font setup. It always depends on the TTF design whether single styles are available or
not.
The following Flags/Constants are defined in the ScapsSamText2D type libray.
ScCharFlags:
scComCharFlagMonoSpaced, scComCharFlagItalic, scComCharFlagRadial
This flags can be bitwise ored to allow combinations.
For the scComCharFlagRadial Flag see Radial Text.
ScWeight:
scComCharWeightThin, scComCharWeightExtraLight, scComCharWeightLight,
scComCharWeightNormal
scComCharWeightMedium, scComCharWeightSemiBold, scComCharWeightBold,
scComCharWeightExtraBold
scComCharWeightHeavy
53
ScCharFlags
ScWeight
scComCharWeightBold
scComCharFlagItalic
scComCharWeightNormal
scComCharFlagMonoSpaced scComCharWeightNormal
0
scComCharWeightNormal
7.2.1.6Radial Text
Radial Text can be generated by oring the Text.ScCharFlags with scComCharFlagRadial.
For to generate radial text the generate single character flag must be set.
The radius and the start angle will be set by the commands.
Text.ScRadius , Text.ScStartAngle
54
7.2.2BarCodeProperties
generate the desired type
initialize and attach properties
attach a BarCode Type
attach the barcode string
generate the barcode character lines
if needed hatch the barcode
update the entity
' Hatch property ID's
Const EP0 = &H71AB7485
Const EP1 = &HEFE811D1
Const EP2 = &H8C7D0080
Const EP3 = &H48EEDCB8
Dim BarCode As ScBarCode12Chars2D
Dim Hatch1Flags as long
Dim Hatcher As ScHatcher
' Generate the entity
Set BarCode = New ScBarCode12Chars2D
BarCode.ScUpdateProperties
Job..ScAdd BarCode
BarCode.ScChar = "1234"
BarCode.ScCodeType = "3 of 9"
BarCode.ScEnableText = 1
' Enables the text line for the Bar Code
BarCode.ScTextBaseLine = 10
BarCode.ScTextFont="Arial"
BarCode.ScGenerate
Hatch1Flags = scComHatcherStyleHatch Or scComHatcherStyleFlip Or
scComHatcherStyleNoJump Or scComHatcherStyleNoMarkAsJump Or
scComHatcherStyleDirHorz
BarCode.ScSetPropertyVariant EP0, EP1, EP2, EP3, 0, 0, Hatch1Flags
' Set the hatch distance for Hatch 1 to 0.5 mm
BarCode.ScSetPropertyVariant EP0, EP1, EP2, EP3, 1, 0, 0.5
' Set minimum jump value for Hatch 1 to 1 mm
BarCode.ScSetPropertyVariant EP0, EP1, EP2, EP3, 10, 0, 1
Set Hatcher = New ScHatcher
' Set the hatcher that it has to use the Property set of the entity.
Hatcher.ScUseProperty = 1
Hatcher.ScHatchEntity2D BarCode.
BarCode.ScUpdate
55
ScTextBaseLine
56
Control Code
Meaning
%b
%h
%e
%%
Insert a % sign
%hProduct-Code: %e
123
57
7.2.2.2Inverse Barcode
The inverse barcode can be setup with the methods
BarCode.ScBarFlags property and the method BarCode.ScSetQuietZone(long ID,double
Zone).
ScBarFlags constants for barcode inversion
Constant name
Value
Meaning
ScComBarFlagInvert
0x2
scComBarFlagDisableAutoQuietZone
0x4
scComBarFlagQuietZoneAbsolute
0x8
Left Side
Bottom Side
Right Side
Top Side
The barcode generation will react only on this four parameters when
scComBarFlagDisableAutoQuietZone is set.
If scComBarFlagDisableAutoQuietZone is not set then the following behavior is implemented:
1 D- Barcode
Left Side parameter (ID=0) is also taken for the Right side. Top and Bottom sides are set to 0.
2 D- Barcode
the Left Side parameter (ID=0) is also taken for the Right, Bottom and Top side quiet zones.
In general the quite zone function has an effect only if the scComBarFlagInvert is set.
58
59
7.2.2.3DataMatrixEx Code
If ScCodeType is set to DataMatrixEx additional functions for generating a data matrix code are
provided.
The Property ScDataMatrixExSymbolSize defines the symbol size of the data matrix code. The
following IDs are defined. Please refer also to the Property ScDataMatrixExSymbolMode on the next
page.
SymbolSize
for square
symbols
Symbol Size
Row
Col
10
10
12
12
14
14
16
16
18
18
20
20
22
22
24
24
26
26
32
32
10
36
36
11
40
40
12
44
44
13
48
48
14
52
52
15
64
64
16
72
72
17
80
80
18
88
88
19
96
96
20
104
104
21
120
120
22
132
132
23
144
144
SymbolSize for
rectangular symbols
Symbol Size
Row
Col
18
32
12
26
12
36
16
36
16
48
60
Value
scComDataMatrixExEncodationASCII1
scComDataM
atrixExEnc
odationBas
e256
scComDataM
atrixExEnc
odationC40
scComDataM
atrixExEnc
odationTex
t
scComDataM
atrixExEnc
odationANS
I_X12
scComDataM
atrixExEnc
odationEDI
FACT
Value
Meaning
Enables
Square
symbol
generatio
n.
scComDataMatrixExSymbolMode
Rectangle
scComDataMatrixExSymbolMode
Enables
Rectangle AutoSize
symbol
generatio
n.
0X10000
scComDataMatrixExSymbolMode
The size
AutoEncodation
of the
symbol is
automatic
ally
selected
to the
smallest
possible
for to
keep the
data.
0X20000
scComDataMatrixExSymbolMode
The
encodatio Dots
n scheme
61
of the
symbol is
automatic
ally
selected
to
generate
the
smallest
possible
amount of
data.
0X40000
scComDataMatrixExSymbolMode
The
Tilde
matrix
cells are
generated
by dots.
0X80000
Allows to
setup
control
character
s with the
~ control
code.
62
7.2.3SerialNumberProperties
The purpose of the serial number entity is to allow the change of vector information between different
mark sequences without the need of a specific programming. The capabilities of the serial number entity
is not only restricted to classical serial number applications but also includes time stamp and ASCII file
import functionality.
'The serial number has following internal member groups:
Counter group
sequence counter
beat count
reset count
Value group
current value
start value
increment value
Every serial number has an internal counter called sequence counter.
On every ScNextSequence() command the sequence counter will be incremented by 1.
ScNextSequence() is a member of ScEntity2D. If the entity is of type ScEntities2D or ScJobRoot
this is normally the type of the job entity inside an application than a call to Job.ScNextSequence()
iterates through all entities inside the job means all serial number entities inside the job get the
ScNextSequence() call.
The sequence counter will be reset to 0 at entity generation. The ScReset() command also resets it to 0
and in addition copies the content of the start value into the current value.
When the sequence counter reaches the value of the reset count a ScReset() command is issued
internally with the consequences described above.
When the sequence counter reaches a multiple of the beat count the serial number event is issued.
During this event the increment value is added to the current value and the complete entity is regenerated
with the new information.
7.2.3.1Number Mode
The serial number is from type Containers and has one sub entity. The type of this sub entity depends
from the ScNumberMode property and is automatically generated.
For ScNumberMode the following constants are defined:
Constant Definition
Value
Meaning
scComSerialNumber2DModeText1
scComSerialNumber2DModeBarCode
Sub
entity
is of
type
ScWin
TextC
hars2
D
Sub
entity
is of
scComSerialNumber2DModeASCIIFile
63
type
ScBar
Code1
2Char
s2D
4
Inform scComSerialNumber2DModeDateTime
ation
is read
in
from a
ASCII
file
The
time
stamp
mode
is
select
ed
16
The
default
format
string
can be
overwr
itten
by the
Forma
t
proper
ty
scComSerialNumber2DModeCustomFormat
7.2.3.2Format
The ScFormat property determines the way how the serial number or time stamp information is
generated. The serial number entity keeps two format strings internally one for the serial number format
and one for the date/time format. Which is selected determines the value of the ScNumberMode property.
The format string can only be set by ScFormat when the scComSerialNumber2DmodeCustomFormat is
specified inside the ScNumberMode property otherwise it has a default value as described later.
For the serial numbers the format description is similar to that used in the C-language.
%[flags] [width] [.precision] type
flags
0 shows leading zeros
width and precision
defines the total width of the number and the digits after the decimal point
type
f for double values
d signed decimal integer
When the scComSerialNumber2DmodeCustomFormat flag is not specified inside the ScNumberMode
property two additional properties become valid:
ScShowLeadingZeros
ScNumDigits
With this properties the internal default format string can be modified.
65
ScFormat
"%6.3f" ' 3 digits after the decimal point
"%6.0f"
When the scComSerialNumber2DmodeCustomFormat flag is not specified, the ScFormat for date
time defaults to %y\%m\%d %H:%M
66
Like the ScFormat property for serial numbers also the ScFormat for date time can be combined with
normal text.
For example
SN.ScFormat = Today is %A
would lead to Today is Monday with an English date time locale set.
The conversion to the appropriate week name can be set with the ScDateTimeLocale property.
The following table is a part of a longer list of possible values. It must be pointed out that the selected
locale must be installed on the system.
Identifier
0x0000
0x0423
0x0402
0x0455
0x0403
0x0404
0x0804
0x0c04
0x1004
0x1404
0x041a
0x0405
0x0406
0x0413
0x0813
0x0409
0x0809
0x0425
0x0438
0x0429
0x040b
0x040c
0x080c
0x0c0c
0x100c
0x140c
0x180c
0x0407
0x0807
0x0c07
0x1007
0x1407
0x0408
0x040d
0x040e
0x040f
0x0421
0x0410
0x0810
0x0411
0x0860
0x043f
0x0412
0x0812
0x0426
Language
Language Neutral
Belarussian
Bulgarian
Burmese
Catalan
Chinese (Taiwan)
Chinese (PRC)
Chinese (Hong Kong SAR, PRC)
Chinese (Singapore)
Chinese (Macau SAR)
Croatian
Czech
Danish
Dutch (Netherlands)
Dutch (Belgium)
English (United States)
English (United Kingdom)
Estonian
Faeroese
Farsi
Finnish
French (Standard)
French (Belgian)
French (Canadian)
French (Switzerland)
French (Luxembourg)
French (Monaco)
German (Standard)
German (Switzerland)
German (Austria)
German (Luxembourg)
German (Liechtenstein)
Greek
Hebrew
Hungarian
Icelandic
Indonesian
Italian (Standard)
Italian (Switzerland)
Japanese
Kashmiri (India)
Kazakh
Korean
Korean (Johab)
Latvian
67
0x0427
0x0827
0x042f
0x0414
0x0814
0x0415
0x0416
0x0816
0x0418
0x0419
0x0c1a
0x081a
0x0459
0x041b
0x0424
0x040a
0x080a
0x0c0a
0x100a
0x140a
0x180a
0x1c0a
0x200a
0x240a
0x280a
0x2c0a
0x300a
0x340a
0x380a
0x3c0a
0x400a
0x440a
0x480a
0x4c0a
0x500a
0x0430
0x0441
0x041d
0x081d
0x0444
0x041e
0x041f
0x0422
Lithuanian
Lithuanian (Classic)
Macedonian
Norwegian (Bokmal)
Norwegian (Nynorsk)
Polish
Portuguese (Brazil)
Portuguese (Standard)
Romanian
Russian
Serbian (Cyrillic)
Serbian (Latin)
Sindhi
Slovak
Slovenian
Spanish (Traditional Sort)
Spanish (Mexican)
Spanish (Modern Sort)
Spanish (Guatemala)
Spanish (Costa Rica)
Spanish (Panama)
Spanish (Dominican Republic)
Spanish (Venezuela)
Spanish (Colombia)
Spanish (Peru)
Spanish (Argentina)
Spanish (Ecuador)
Spanish (Chile)
Spanish (Uruguay)
Spanish (Paraguay)
Spanish (Bolivia)
Spanish (El Salvador)
Spanish (Honduras)
Spanish (Nicaragua)
Spanish (Puerto Rico)
Sutu
Swahili (Kenya)
Swedish
Swedish (Finland)
Tatar (Tatarstan)
Thai
Turkish
Ukrainian
7.2.3.3ASCII Files
If (scComSerialNumber2DModeText or scComSerialNumber2DModeASCIIFile) is selected as
ScNumberMode the current value will interpreted as an index into lines of a ASCII file. This index is 1
based which means current value==1 points to the first line of the ASCII file.
The file name can be specified with the ScASCIIFileName property.
7.2.4PixelArrayProperties
68
7.2.4.1Intensity
The ScIntensity has only effect when the ScPixelFormat is set to scComPixelFormatUChar.
The ScIntensity property influences the ScSetAt() and ScGetAt() routines. This routines are also
used during display and conversion with the ScGenerate() method. So the calculation of the pixel value
is always on line. From this results that when settings a pixel value with ScSetAt() and then changing
the ScIntensity then the value returned by ScGetAt() may differ from the value previously set.
The internal online calculation for ScGetAt() is at follows:
PR = ((PI - intensity_center) * intensity)+ intensity_center
PR= pixel return.
PI = pixel internal (is not changed).
intensity = value set by the ScIntensity property.
The intensity_center for the uChar type pixel array is 128.
The formula for ScSetAt() is similar:
PI = ((PS + intensity_center) / intensity)- intensity_center
PS = pixel set value transferred by the method ScSetAt().
The allowed range for ScIntensity is 0.0001 to 2. The above calculations are done internally in real
numbers.
0.0001
1
2
Figure 21 : Different ScIntensity values for the same internal pixel array representation.
69
7.2.4.2Invert
The ScInvert property works similar than the Intensity property. Only when ScInvert is set to 1 the
following conversion is used:
For ScGetAt():
PR = pixel_max_value - PI
For ScSetAt():
PI = pixel_max_value - PS
For the scComPixelFormatUChar pixel format the pixel_max_value is 255, for the
scComPixelFormatBit it is 1.
7.2.4.3Brightness
The Brightness can be set with the ScOffset property. Also here the similar scheme than with the
Intensity property is used. The conversion functions are as follows:
For ScGetAt():
PR = PI + offset
For ScSetAt():
PI = PS-offset
For the scComPixelFormatUChar pixel array format the offset may be between 255 and +255.
7.2.4.4Limits
All the calculation above will be done in double precision. The internal pixel value after the ScSetAt()
method will be calculated according the following schema (ScPixelFormat
=scComPixelFormatUchar):
If (PC < 0) PI=0
If (PC >255) PI=255
Otherwise PI=PC
PC = calculated pixel value
PI = internal pixel value
In the same way the following check will be done within the ScGetAt() method:
If (PC < 0) PR=0
If (PC >255) PR=255
Otherwise PR=PC
PR = returned pixel value.
The calculation order is important when the 3 properties have different values than the neutral default
values.
70
ScGetAt()
ScIntensity
ScOffset
ScInvert
and reverse:
ScSetAt()
ScInvert
ScOffset
ScIntensity
7.2.5Spiral
7.2.5.1Overview
Radius:
Defines inner and outer radius of spiral.
Rotations:
Defines number of rotations on inner or outer circle of spiral.
Rise:
Defines distance between succeeding circles inside spiral.
NumOuterSeg:
Defines number of segments of outer circle. This proportion is taken as for the hole spiral.
Clockwise:
71
7.2.5.2Functions
ScSpiral2D is derived from ScPolyLine2D
ScSetSpiralFlags(long Flags)
long ScSetSpiralFlags()
Flags might have following bit combinations:
scComSpiral2DFlagClockwise = 0x1
scComSpiral2DFlagOuterToInner = 0x2
scComSpiral2DFlagAddReturnPath = 0x4
ScSetSpiralDoubleValue(long Type, double Value)
double ScGetSpiralDoubleValue (long Type)
Type might have following values:
scComSpiral2DDoubleValueTypeInnerRadius = 1
scComSpiral2DDoubleValueTypeOuterRadius = 2
scComSpiral2DDoubleValueTypeRise = 3
ScSetSpiralLongValue(long Type, long Value)
double ScGetSpiralLongValue (long Type)
Type might have following values:
scComSpiral2DLongValueTypeNumInnerRotations = 1
scComSpiral2DLongValueTypeNumOuterRotations = 2
scComSpiral2DLongValueTypeNumOuterSegments = 3
7.2.5.3Example
' spiral will be generated with center 0,0
Dim spiral As ScSpiral2D
Set spiral = New ScSpiral2D
Call spiral.ScSetSpiralFlags(scComSpiral2DFlagClockwise Or scComSpiral2DFlagOuterToInner Or
scComSpiral2DFlagAddReturnPath)
Call spiral.ScSetSpiralDoubleValue(scComSpiral2DDoubleValueTypeInnerRadius, 4)
Call spiral.ScSetSpiralDoubleValue(scComSpiral2DDoubleValueTypeOuterRadius, 20)
Call spiral.ScSetSpiralDoubleValue(scComSpiral2DDoubleValueTypeRise, 1)
Call spiral.ScSetSpiralLongValue(scComSpiral2DLongValueTypeNumInnerRotations, 2)
72
Call spiral.ScSetSpiralLongValue(scComSpiral2DLongValueTypeNumOuterRotations, 4)
Call spiral.ScSetSpiralLongValue(scComSpiral2DLongValueTypeNumOuterSegments, 120)
spiral.ScGenerate
spiral.ScUpdate
spiral.ScUpdateProperties
' test the get values
Dim ll As Long
Dim dd As Double
ll = spiral.ScGetSpiralFlags()
dd = spiral.ScGetSpiralDoubleValue(scComSpiral2DDoubleValueTypeInnerRadius)
dd = spiral.ScGetSpiralDoubleValue(scComSpiral2DDoubleValueTypeOuterRadius)
dd = spiral.ScGetSpiralDoubleValue(scComSpiral2DDoubleValueTypeRise)
ll = spiral.ScGetSpiralLongValue(scComSpiral2DLongValueTypeNumInnerRotations)
ll = spiral.ScGetSpiralLongValue(scComSpiral2DLongValueTypeNumOuterRotations)
ll = spiral.ScGetSpiralLongValue(scComSpiral2DLongValueTypeNumOuterSegments)
' adding spiral to the job and display it
Call gGroupView2d.ScAdd(spiral)
gV2dCtrl.ScGetView2D.ScNewVisual gGroupView2d, 0
gV2dCtrl.ScGetView2D.ScUpdate 0
73
The location of an entity inside the working area can be defined in different ways. Every entity keeps
internally a transformation matrix. This transformation matrix will be applied to the internal data structures
when displayed on the screen or when it will be marked. Changing the transformation matrix of an entity
with sub entities (for example a group with entities inside) changes also the transformation matrix of the
sub entities. After changing the position with any of the following commands. The programmer has to call
the ScUpdate() function of the entity. The ScUpdate() function will recalculate the new outline data
according the internal data and matrix settings. In the same way than with the ScUpdateProperties()
command it is sufficient to call the ScUpdate() function after a sequence of position modifications. The
ScUpdate() must be called at least before the user want to have access to the new outline parameters.
Calling the ScUpdate() function of a group object will automatically update all sub entities of the group.
Before going into the functions a short overview about the coordinate systems are given.
Entity Coordinatesystem
OpticModule TransformationMatrix
All coordinates and matrix values are of type double. The coordinates are defined in the so called entity
coordinate system. Before marking they will be transformed into the scanner coordinate system.
The relation between the scanner coordinate system and the entity coordinate system is defined by the
transformation matrix of the ScOpticModule object.
The main OpticModule function to define this relation is the function call:
ScOpticModule.ScSetField XMin,YMin,XMax,YMax
The transferred parameters XMin,..,YMax are defined in the entity coordinate system.
A standard scanner system has the field range of -32768 to 32767 bits in every direction. This means the
74
75
Retrieving the current position and size of an entity ( the entity outline).
xu,yu
Entity outline
ys
xo,yo
xs
Figure 23: Entity Outline
'
'
'
'
the
the
the
the
left/bottom corner x
left/bottom corner y
outline dimension in
outline dimension in
coordinate
coordinate
x direction
y direction
Example 2:
DIM xo as Double,yo as Double, xs as Double, ys as Double, xu as Double
DIM yu as Double
xo = entity.ScOutline(0)
yo = entity.ScOutline(1)
xu = entity.ScOutline(2)
yu = entity.ScOutline(3)
'
'
'
'
'
'
'
'
retrieve
corner
retrieve
corner
retrieve
corner
retrieve
corner
xs = xu-xo
ys = yu-yo
76
entity.ScUpdate
By Transformation commands:
entity.ScTranslate x,y
entity.ScRotate x,y,angle
77
angle
x,y
entity.ScScale x,y
0,0
To scale an entity in respect to a other point(XA,YA) than the coordinate system origin the following
command sequence can be applied.
entity.ScTranslate -XA,-YA
entity.ScScale x, y
entity.ScTranslate XA,YA
entity.ScUpdate
78
m0 m1 m2
m3 m4 m5
m6 m7 m8
m6, m7 = 0 , m8 = 1
Translationvector
m2
v _ t =
m5
Axis
m0
v _ x =
m
3
m0
scale _ x =
m1
Scaling
m3
scale _ y =
m4
The programmer can retrieve and set the entity matrix by the commands
entity.ScTransform
entity.ScMatrix
entity.ScUnifyMatrix
Examples:
Dim m0, m1, m2, m3, m4, m5 As Double
the following lines translate the entity in dx = 2
m0 = 1
' the normal x-direction
m1 = 0
m2 = 2
' x-translation
m3 = 0
m4 = 1
' the standard y-direction
m5 = 0
entity.ScTransform m0, m1, m2, m3, m4, m5
entity.ScUpdate
the following lines flip the entity coordinate system, means all data will
79
80
9Import/Export
9.1Formats
Beside several others the following file types are available:
Import Formats:
saf
plt
- pcx
bmp
dxf
PXC-Files
Bitmap Files
DXF Files
Export Formats:
saf
plt
The format is selected with the ScFileType property. This is a string containing saf,plt....
ScLayerFile2D provides methods to check all available file types. This has the advantage, that the user
interface does not have to be changed when the capability of the ScLayerFile2D is expanded.
The following functions are available for this:
long ScGetNumAvailableImportFileTypes()
returns the number of available import formats
long ScGetNumAvailableExportFileTypes()
returns the number of available export formats
String ScGetAvailableImportFileType(long index)
returns the import type string (for example plt)
String ScGetAvailableExportFileType(long index)
returns the export type string (for example plt)
String ScGetAvailableImportFileTypeInfo(long index)
returns the info string of the format (for example HPGL Files)
String ScGetAvailableExportFileTypeInfo(long index)
returns the info string of the format (for example HPGL Files)
Example:
The following routine checks all available import file types. It should be used to build up the available
81
layerfile As ScLayerFile2D
i, num_import_types As Long
file_type As String
file_type_info As String
9.2Styles
The ScLayerFile2D class has a ScStyle property. This is a long with the following possible flags:
Flag
Description
scComLayerFile2DStyleImportPolyLinesimport
closed polyline structures
scComLayerFile2DStyleImportLineArra
ys
scComLayerFile2DStyleImportAllToLin
eArrays
scComLayerFile2DStyleExportPolyLine
s
export polylines
scComLayerFile2DStyleExportLineArra
ys
export linearrays
scComLayerFile2DStyleCheckOrientati
on
scComLayerFile2DStyleReadPens
scComLayerFile2DStyleWritePens
scComLayerFile2DStyleImportOpenPoly
Lines
scComLayerFile2DStyleExportOnlySele
cted
scComLayerFile2DStyleImportToLayer
82
import
export
scComLayerFile2DStyleImportLineArrays
scComLayerFile2DStyleImportAllToLineArrays
scComLayerFile2DStyleExportPolyLines
scComLayerFile2DStyleExportLineArrays
scComLayerFile2DStyleCheckOrientation
scComLayerFile2DStyleReadPens
X
X
scComLayerFile2DStyleWritePens
scComLayerFile2DStyleImportOpenPolyLines
scComLayerFile2DStyleExportOnlySelected
scComLayerFile2DStyleImportToLayer
scComLayerFile2DStyleImportToEntities2D
scComLayerFile2DStyleWritePreview
X
X
X
X
X
Which style is supported by which format can also be checked by the following program calls:
long ScHasImportStyle(long style)
returns 1 if the format supports the import style
long ScHasExportStyle(long style)
returns 1 if the format supports the export style
This can be helpful to implement general user interfaces.
Example:
The following example checks the plt import styles
Dim layerfile As ScLayerFile2D
Dim has_style As Long
Set layerfile = New ScLayerFile2D
layerfile.ScFileType = "plt"
has_style =
layerfile.ScHasImportStyle(scComLayerFile2DStyleImportOpenPolyLines)
' will return 1
has_style =
layerfile.ScHasImportStyle(scComLayerFile2DStyleImportOpenPolyLines Or
scComLayerFile2DStyleReadPens)
' will return 1
has_style =
layerfile.ScHasImportStyle(scComLayerFile2DStyleImportOpenPolyLines Or
scComLayerFile2DStyleImportToEntities2D)
will return 0
83
9.3Resolution
Some import and export formats support the ScResolution property. This is a factor, the data from the
file is multiplied with before storing into the entity or the other way for export.
Whether the ScResolution property is supported can be checked with the following function:
long ScHasImportResolution()
returns 1 if the resolution is supported for import
long ScHasExportResolution()
returns 1 if the resolution is supported for export
The following table shows actual supported resolution properties:
saf
plt
bmp
dxf
ScHasImportResolution()
ScHasExportResolution()
9.4File Access
For file access the ScLayerFile2D class provides the following functions:
ScOpenFileRead(String filename)
ScOpenFileWrite(String filename)
Close()
9.5Calls
The import and export is started with the following calls:
ScImport(ScEntity2D)
ScExport(ScEntity2D)
84
9.6Example
open plt file, set resolution and style, import and update view
Dim layerfile As ScLayerFile2D
Dim layer As ScLayer
Set layerfile = New ScLayerFile2D
Set layer = New ScLayer
layerfile.ScFileType = "plt"
layerfile.ScResolution = 0.001
' setting this style keeps the mark order and reads the pen info
layerfile.ScStyle = scComLayerFile2DStyleImportPolyLines Or _
scComLayerFile2DStyleImportLineArrays Or _
scComLayerFile2DStyleImportAllToLineArrays Or _
scComLayerFile2DStyleReadPens
layerfile.ScOpenFileRead "c:\columbia.plt"
layerfile.ScImport layer
layerfile.ScClose
layer.ScUpdate
layer.ScName = "columbia.plt"
' thats not necessary, the entity name is
' derived from the file name automatically
' the following lines are necessary if you want the data to be displayed
gGroupView2d.ScAdd layer
gV2dCtrl.ScGetView2D.ScNewVisual layer, 1
gV2dCtrl.ScGetView2D.ScUpdate 1
85
Most of the SAM Load and Save functionality is inside the ScapsSamDataBase type library. The general
concept of stream and storage objects will be covered in a separate document. The following example
shows how to save and load the entities to/from an job file:
86
11 Entity Reference
In the following chapter, functions and methods are described for some selected entity types. Depending
on the programming language some of the functions described here may appear as some kind of property
that is similar to a variable where values can be assigned using the = or where its contents can be used
directly. Also the number of parameters and the way a value is returned may differ for different
programming languages. For more details please refer to the documentation of your development
environment or programming language to see how these functions that are delivered through the COM
interface will appear exactly.
Additionally all functions are described here that exist for the SAM interface. Some of them require
specific licenses (e.g. multihead or 3D license) and will not work as described if that license is not
available.
11.1 ScObject
The ScObject entity is provided by sc_kernel.dll.
HRESULT ScKernel(ScKernel **Kernel)
This function can be used to retrieve an instance of the currently used kernel. The kernel itself is
returned as a pointer via the parameter Kernel.
HRESULT ScIsTypeOf(long type_id, long* is_type)
Using this method an object can be checked for a specific type. If the identified type that is
handed over using the parameter type_id fits to the objects type, the returned value for is_type is 1.
Here type_id can be one of the following constants:
- scComObject for a ScObject
- scComObjectEntity for a ScEntity
- scComObjectEntity2D for a ScEntity2D
- scComObjectEditGroup2D for a ScEditGroup2D
- scComObjectElement2D for a ScElement2D
- scComObjectLineArray2D for a ScLineArray2D
- scComObjectHatch for a ScHatch
- scComObjectPixelArray2D for a ScPixelArray2D
- scComObjectScannerPixelArray2D for a ScScannerPixelArray2D
- scComObjectPointCloud2D for a ScPointCloud2D
- scComObjectPolyLine2D for a ScPolyLine2D
- scComObjectEllipse2D for a ScEllipse2D
- scComObjectRectangle2D for a ScRectangle2D
- scComObjectSpiral2D for a ScSpiral2D
- scComObjectTriangle2D for a ScTriangle2D
- scComObjectSingleLine2D for a ScSingleLine2D (deprecated)
- scComObjectEntity2DContainer for a ScEntity2DContainer
- scComObjectLayer for a ScLayer
- scComObjectBarCode12 for a ScBarCode12
87
88
11.1.1
ScEntity
The current entity is duplicated by this function. The resulting copy of the entity is returned via the
parameter Entity.
HRESULT ScAddProperty(long Pid1, long Pid2, long Pid3, long Pid4, short
VariantCount, long Flags, short Version, long ParamId)
This function adds a property. For different kinds of properties and the related parameters please
refer to the preceding sections.
HRESULT ScGetPropertyInfo(long Pid1, long Pid2, long Pid3, long Pid4, short
*VariantCount, long *Flags ,short *Version, long ParamId)
Here a property information is retrieved from the current entity. For the different kinds of
properties and the related parameters please refer to the preceding sections.
HRESULT ScDelProperty(long Pid1, long Pid2, long Pid3, long Pid4, long
ParamId)
The property that is identified by the parameters Pid1, Pid2, Pid3 and Pid4 is deleted by this
function. For the different property identifiers please refer to the preceding sections.
HRESULT ScLoadEntity(BSTR FileName)
Loads the entity from disk using FileName as path to the file that has to be used for loading.
HRESULT ScSaveEntity(BSTR FileName)
Saves the entity to disk using FileName as path to the file that has to be used to save the data
into.
HRESULT ScSetPropertyVariant(long Pid1, long Pid2, long Pid3, long Pid4, long
VariantId, long ParamId, VARIANT Value)
Sets a specific property variant value for the property that is identified by the parameters Pid1,
Pid2, Pid3 and Pid4. For the different property identifiers their usage and meaning please refer to the
preceding sections.
HRESULT ScGetPropertyVariant(long Pid1, long Pid2, long Pid3, long Pid4, long
VariantId, long ParamId, VARIANT *Value)
Gets a specific property variant value for the property that is identified by the parameters Pid1,
Pid2, Pid3 and Pid4. For the different property identifiers their usage and meaning please refer to the
preceding sections.
HRESULT ScUpdateProperties()
Updates all properties of the current object.
HRESULT ScMarkAble(long *MarkAble)
If an object is not markable it is visible within the view but will not be sent to the scanner during a
marking operation. This function retrieves the information if an object is markable (MarkAble = 1) or not
(MarkAble = 0).
HRESULT ScMarkAble(long MarkAble)
Here the markable-flags of the current object can be changed, the object can be set to be
markable (MarkAble = 1) or not (MarkAble = 0).
HRESULT ScRunMacro(BSTR MacroName, BSTR ParameterList, BSTR *Result)
90
11.1.1.1 ScEntity2D
The ScEntity2D object is provided by sc_kernel.dll.
HRESULT ScMatrix(long index, double *Value)
There is a 3x3 matrix assigned to every ScEntity2D object. Using this function the value of every
field of that matrix can be retrieved via its array index position.
HRESULT ScOutline(long index, double *Value)
The outline of an object is a rectangle that has the size of the maximum x and y dimensions of
that object. By using this function the border coordinates by that outline rectangle can be retrieved. The
index parameter describes which coordinate has to be fetched, here 0 is equal to the minimum x value, 1
is equal to the minimum y value, 2 is equal to the maximum value in x direction and 3 is for the maximum
value in y direction.
Please note that the outline of an object might be invalid after some operations, here first an ScUpdate()
needs to be called.
HRESULT ScTranslate(double X, double Y)
This function translates the entity relative in X and Y direction using the values handed over as
parameter. After that operation an update of the view might be necessary to let the modifications become
visible that have been done.
HRESULT ScScale(double X, double Y)
The entity is scaled by the given factor in X and Y direction. A value of 1.0 means the entity is left
92
unchanged in this direction, negative values additionally mirror the object in that direction. After that
operation an update of the view might be necessary to let the modifications become visible that have been
done.
HRESULT ScRotate(double X, double Y,double Angle)
The entity is rotated using the coordinates X and Y as rotation center. The rotation parameter
Angle has to be given in unit radians. After that operation an update of the view might be necessary to let
the modifications become visible that have been done.
HRESULT ScMirrorOnXAxis()
This function doesn't has any parameters and mirrors the object along the X-axis. After that
operation an update of the view might be necessary to let the modifications become visible that have been
done.
HRESULT ScMirrorOnYAxis()
Using this function the object is mirrored along the Y-axis immediately. After that operation an
update of the view might be necessary to let the modifications become visible that have been done.
HRESULT ScMirrorOnAxis(double X1, double Y1,double X2, double Y2)
with this function the object can be mirrored along a freely definable axis. The axis that is used for
mirroring is defined by the parameters, here X1, Y1 are the starting coordinates of it X2, Y2 are the end
coordinates. After that operation an update of the view might be necessary to let the modifications
become visible that have been done.
HRESULT ScHorzPos(double *Pos)
Using this function the horizontal position of an entity can be retrieved, the position value is
returned in parameter Pos.
HRESULT ScHorzPos(double Pos)
Here the horizontal position of an object can be modified, it is set to the new absolute position
Pos. After that operation an update of the view might be necessary to let the modifications besome visible
that have been done.
HRESULT ScVertPos(double *Pos)
Using this function the vertical position of an entity can be retrieved, the position value is returned
in parameter Pos.
HRESULT ScVertPos(double Pos)
Here the vertical position of an object can be modified, it is set to the new absolute position Pos.
After that operation an update of the view might be necessary to let the modifications become visible that
have been done.
HRESULT ScHorzSize(double *Size)
With this function the objects outline size in horizontal direction can be fetched via the parameter
Size.
HRESULT ScHorzSize(double Size)
Different to the preceding function this one can be used to set a new horizontal size. Using this
function the entity is scaled in horizontal direction by a factor that results in the desired Size. After that
operation an update of the view might be necessary to let the modifications become visible that have been
done.
93
in Y direction.
HRESULT ScGetArrayCount(long index, long *Count)
This function is also related to the array functionality where the same single entity appears several
times. It returns the number of repetitions in X direction in case index is 0 and in Y direction if it is set to
1 using the parameter Count.
HRESULT ScSetArrayCount(long XCount,long YCount)
Different to the preceding function this one can be used to set the number of element repetitions
in X and Y direction for the array elements. Here XCount defines the number in X direction and YCount
the repeats in Y direction.
HRESULT ScAlign(long *Align)
Using this function the alignment information for the current entity can be retrieved. The value that
is returned in Align can be a combination of some of the follwing flags as long as they don't logically
exclude each other:
- SC_ENTITY2D_ALIGN_FLAGS_CENTER
0x0001 aligned to center
- SC_ENTITY2D_ALIGN_FLAGS_LEFT
0x0002 left aligned
- SC_ENTITY2D_ALIGN_FLAGS_RIGHT
0x0004 right aligned
- SC_ENTITY2D_ALIGN_FLAGS_TOP
0x0008 aligned to top
- SC_ENTITY2D_ALIGN_FLAGS_BOTTOM
0x0010 bottom-aligned
- SC_ENTITY2D_ALIGN_FLAGS_MIDDLE
0x0020 aligned to center in vertical direction
- SC_ENTITY2D_ALIGN_FLAGS_RADIAL_CENTER
0x0040 radially aligned to the center
- SC_ENTITY2D_ALIGN_FLAGS_RADIAL_END
0x0080 aligned to the end of an radial entity
- SC_ENTITY2D_ALIGN_FLAGS_LINE_LEFT
0x0100 aligned to the left line
- SC_ENTITY2D_ALIGN_FLAGS_LINE_RIGHT
0x0200 aligned to the outer right line
- SC_ENTITY2D_ALIGN_FLAGS_LINE_CENTER
0x0400 aligned to the center line
- SC_ENTITY2D_ALIGN_FLAGS_NO_ALIGN
0x8000 there is no alignment assigned to that
entity
HRESULT ScAlign(long Align)
This is the counterpart of the preceding described function, here a new alignment information can
be set to an entity. For the flags that are available and can be set using the parameter Align please refer
to the description above.
HRESULT ScNextSequence(long *Res)
If this function is called the related entity is updated due to a finished marking operation. What
happens during that operation depends on the exact entity type, here for an example a serial number
would be incremented or a date/time entity would be updated.
HRESULT ScZOffset(double *Offset)
Gets the current offset in Z direction. That offset is a fixed distance in Z direction and can be
influenced by translation and scale operation in Z direction.
HRESULT ScZOffset(double Offset)
Sets a Z offset in Z direction. That Offset value is equal to an absolute position in Z direction for
the entity.
HRESULT ScGetFirstPoint(long FromEnd,double *X, double *Y)
The first X and Y coordinate values of a vector are returned by that function. Here the additional
parameter FromEnd decides which point is the first one, if it is set to 0 the first one is the one counted
from the beginning of the vector, if it is set to 1 counted from end the first point is searched (means the
95
96
11.1.1.1.1 ScElement2D
The ScElement2D object is provided by sc_kernel.dll.
97
11.1.1.1.1.1 ScPolyLine2D
The polyline object is provided by sc_lines2d.dll.
98
Entities of type ScPolyline2D consist of a set of points that describe one polygon without any interruption
between the different points.
HRESULT ScGetPointsInProc(sc_com_point* Array, long Size, long Start,long
Count, long *Read)
Using this function the points that are contained in this object can be retrieved. Here the
parameter Array is a pointer to an array of type sc_com_point, a structure that will contain the new
coordinates of a single point:
typedef struct sc_com_point_tag
{
double x;
double y;
long status;
} sc_com_point;
Here x and y hold the coordinate values of that single point, status informs about the current state of
that point.
The parameter Size specifies the length of the given array, Start the starting position within the number
of available point coordinates and Count the number of coordinates that have to be put into the array.
The value returned in Read informs about the total number that really have been read.
HRESULT ScSetPointsInProc(sc_com_point* Array, long Size, long Start,long
Count, long *Write)
Using this function new coordinates can be set for existing points. Here the parameter Array is a
pointer to an array of type sc_com_point, a structure that contains the new coordinates of a single point.
The parameter Size specifies the length of the given array, Start the starting position within the number
of available points and Count the number of coordinates that have to be set. The value returned in Read
informs about the total number that really have been set.
HRESULT ScAddPointsInProc(sc_com_point* Array, long Size, long Count, long
*Index)
With this function it is possible to extend the list of points that are contained within the object, it
adds new points using the coordinates out of the given Array. Size specifies the number of elements of
that array and Count the number of new point coordinates that have to be taken out of the array and
added to the object. The value returned in Index is the index number of the position where the newly
added points start.
} sc_com_point;
Here x, y and z hold the coordinate values of that single point, status informs about the current state
of that point.
The parameter Size specifies the length of the given array, Start the starting position within the number
of available point coordinates and Count the number of coordinates that have to be put into the array.
The value returned in Read informs about the total number that really have been read.
HRESULT ScSetPointsInProc3D(sc_com_point_3d* Array, long Size, long Start,long
Count, long *Write)
Using this function new coordinates can be set for existing points. Here the parameter Array is a
pointer to an array of type sc_com_point_3d, a structure that contains the new coordinates of a single
point. The parameter Size specifies the length of the given array, Start the starting position within the
number of available points and Count the number of coordinates that have to be set. The value returned
in Read informs about the total number that really have been set.
HRESULT ScAddPointsInProc3D(sc_com_point_3d* Array, long Size, long Count,
long *Index)
With this function it is possible to extend the list of points that are contained within the object, it
adds new points using the coordinates out of the given Array. Size specifies the number of elements of
that array and Count the number of new point coordinates that have to be taken out of the array and
added to the object. The value returned in Index is the index number of the position where the newly
added points start.
11.1.1.1.1.1.1 ScEllipse2D
three points that are located at its perimeter, for that mode the three given generation points are not
allowed to be located on the same axis in x or y direction
- scComEllipseGenerationModeCircleCenterRadius -using that mode a circle is created using a
center coordinate and a coordinate value that describes a position at that circles perimeter, both
generation points must be located at different positions in oder to define a valid circle
- scComEllipseGenerationModeArc3Point using that mode a segment of a circle can be created
using three generation points: the first one describes the starting coordinate, the second one describes a
position at the resulting circles sector perimeter and the third one describes the end position of that sector,
for that mode the three given generation points are not allowed to be located on the same axis in x or y
direction
- scComEllipseGenerationModeArcCenterRadiusAngle with that mode a segment of a circle
can be created that is defined by three generation points, different to the preceding mode here the first
one is the center point of the circle segment, the second one is the starting position at the perimeter of the
circle and therefore also defines its radius and the third one specifies the end position of the segment
HRESULT ScGetGenerationPoint(long Index, double *X, double *Y, double *Z)
Using this function currently used generation points can be set. Here Index is the index number
of the generation point, its valid range depends on the used generation mode. The related coordinates
then are returned using the parameters X, Y and Z.
HRESULT ScSetGenerationPoint(long Index, double X, double Y, double Z)
Using this function several generation points coordinates X, Y and Z can be set that describe how
a circle or a sector of a circle has to be generated. That function can be used together with the non-default
ellipse generation modes (please refer to property ScGenerationMode() above). The Index value
specifies which generation mode has to be set, its valid range depends on the selected mode.
HRESULT ScGetGenerationPointValid(long Index, long *Valid)
For the non-default generation method that work using different generation points some specific
rules have to be met. So for some modes it is e.g. not allowed that the points are located on the same
axis. Using this function it can be checked if a generation point is valid for the current generation mode.
Here Index is the index number of the point that has to be checked. Within Valid a 1 is returned if that
generation point is valid according to the other points or 0 if not.
HRESULT ScGenerate2()
If a generation mode is used that acts using generation points instead of a bounding box and a
center point that results out of that box this function has to be called in order to create the object.
HRESULT ScStartAngle(double *Angle)
HRESULT ScStartAngle(double Angle)
The starting angle defines at which position a ellipse has to be started, means where its first point
of the related list of points has to be located in respect to its center. Here a value of 0 is equal to eastern
direction (or 3 o'clock), the angle describes a counter-clockwise rotation. Using this property the starting
value can be get or set.
HRESULT ScDeltaAngle(double *Delta)
HRESULT ScDeltaAngle(double Delta)
With that property the delta angle value can be fetched or retrieved. That value describes the size
of the ellipse, means if it is only a segment or if it is fully closed. The value of Delta acts in respect to the
starting angle, if it is equal to 180 the result is a semi circle or ellipse, if it is equal to 720 the ellipses
shape is drawn twice.
HRESULT ScGetRadius(long Index, double *Value)
Using that function one of both radii of an ellipse can be retrieved, here Index specifies with a
valid range of 0..1 which of both has to be returned in Value. In case of a circle both radii are the same.
101
11.1.1.1.1.1.2 ScRectangle2D
11.1.1.1.1.1.3 ScTriangle2D
102
HRESULT ScGenerate(double P0x, double P0y, double P1x, double P1y, double P2x,
double P2y)
This function creates a new triangle consisting of three points 0..2 that are defined by the
coordinate values handed over via the parameters P0x, P0y, P1x, P1y, P2x and P2y where the number
in the parameter name specifies the number of the point the coordinate belongs to.
11.1.1.1.1.2 ScSingleLine2D
This object type is deprecated and will be removed in a future version.
11.1.1.1.1.3 ScLineArray2D
Entities of this type consist of single lines that are limited by exactly two points coordinates. Different to
the PolyLine2D these lines do not describe one continuous polygon. Within a ScLineArray2D entity
always two points belong together and describe one line, that means an odd number of points is not
allowed here.
HRESULT ScGetPointsInProc(sc_com_point* Array, long Size, long Start,long
Count, long *Read)
Using this function the points that are contained in this object can be retrieved. Here the
parameter Array is a pointer to an array of type sc_com_point, a structure that will contain the new
coordinates of a single point:
typedef struct sc_com_point_tag
{
double x;
double y;
long status;
} sc_com_point;
Here x and y hold the coordinate values of that single point, status informs about the current state of
that point.
The parameter Size specifies the length of the given array, Start the starting position within the number
of available point coordinates and Count the number of coordinates that have to be put into the array.
The value returned in Read informs about the total number that really have been read.
HRESULT ScSetPointsInProc(sc_com_point* Array, long Size, long Start,long
Count, long *Write)
Using this function new coordinates can be set for existing points. Here the parameter Array is a
pointer to an array of type sc_com_point, a structure that contains the new coordinates of a single point.
The parameter Size specifies the length of the given array, Start the starting position within the number
of available points and Count the number of coordinates that have to be set. The value returned in Read
informs about the total number that really have been set.
HRESULT ScAddPointsInProc(sc_com_point* Array, long Size, long Count, long
*Index)
With this function it is possible to extend the list of points that are contained within the object, it
adds new points using the coordinates out of the given Array. Size specifies the number of elements of
103
that array and Count the number of new point coordinates that have to be taken out of the array and
added to the object. The value returned in Index is the index number of the position where the newly
added points start.
that array and Count the number of new point coordinates that have to be taken out of the array and
added to the object. The value returned in Index is the index number of the position where the newly
added points start.
11.1.1.1.1.3.1 ScHatch
If an entity contains a hatch object it means that its related geometry was hatched. That hatch object will
hold the hatch vector data that are typically a bunch of lines that fill the geometry of the related entity.
Such a hatch object can be created using the hatcher.
HRESULT ScHatchID(long *ID)
HRESULT ScHatchID(long ID)
Every hatch object has a (unique) ID. Using this property that identifying value can be get or set.
11.1.1.1.2 ScEntity2DContainer
The ScEntity2DContainer object is provided by sc_kernel.dll.
HRESULT ScGetNumEntities(long *Num)
This function returns the number of entities that are hold by that container object within the
parameter Num.
HRESULT ScGetEntity(long Num, ScEntity2D **Entity)
Using this function a specific entity that is hold by that container can be fetched. Here Num is the
position of that it while the entity itself is returned in Entity.
HRESULT ScPack(long DeleteAll)
This function compresses the container object by removing all stored entities that are empty or
marked as to be deleted. If the parameter DeleteAll is set to 1 all entities that are hold by that container
are deleted, independent from the fact if they are unused or not.
11.1.1.1.2.1 ScLayer
The ScLayer object is provided by sc_lines2d.dll.
HRESULT ScActive(long *Active)
HRESULT ScActive(long Active)
This property can be used to get or set the activation state of the layer.
HRESULT ScGetPolyLines(ScPolyLines2D **PolyLines)
Using this function the ScPolyLines2D object can be retrieved using the parameter PolyLines
that is contained within the current layer.
105
11.1.1.1.2.2 ScVarEntity2D
This is a class for variable entities that change its state according to some external events. This is a base
class that does not provide any externally visible functions.
This object is provided by sc_lines2d.dll.
11.1.1.1.2.2.1 ScSequence2D
The sequence object provides base functionalities that can be used by classes that inherit from this one.
Such a sequence is typically an operation that is done after a specific number of marking operations, it
causes an action within the inheriting objects and switches them to a different state.
This object is provided by sc_lines2d.dll.
HRESULT ScReset()
If reset is called for a sequence it is set back to its starting state that is equal to sequence number
0.
HRESULT ScBeat(long *Beat)
HRESULT ScBeat(long Beat)
The beat-property defines after which number of marking operations the related entity should be
switched to a different state. That means if a Beat value of 4 is set the related entity is switched only after
every 4th marking cycle. Using this property that value can be fetched or set.
HRESULT ScSequenceCount(long *Count)
HRESULT ScSequenceCount(long Count)
Using this function the current sequence position can be retrieved or modified, the value that is
returned or set using parameter Count is equal to the sequence number that is used to calculate the
sequence state. That means if e.g. a beat-value of 4 is set and the sequence number returned here is
equal to 8 the beat-condition is met and the related entity will be switched.
106
11.1.1.1.3 ScGroup2D
The ScGroup2D object is provided by sc_kernel.dll.
HRESULT ScPack(long DeleteAll)
This function compresses the group object by removing all stored entities that are empty or
marked as to be deleted. If the parameter DeleteAll is set to 1 all entities that are hold by that group
are deleted, independent from the fact if they are unused or not.
HRESULT ScGetCount(long Mask, long *Count)
This function returns the number of entities within the parameter Count that are hold by the
current group and that have a specific state. The state can be specified by setting the Mask parameter,
here a combination out of following flags is possible:
- scComEntityUsed the entity is in use
- scComEntitySelected the entity is selected
- scComEntityOnWork the entity is on work
- scComEntityChangeable the entity is changeable
- scComEntityMarkable the entity is markable
The state flags that are checked by this functions can be set by the appropriate properties of the
ScEntity object, for a description of these properties please refer the related section above.
HRESULT ScGetEntityByIndex(long Index, ScEntity2D **Entity)
Using this function an entity can be retrieved and is returned within Entity. Here the parameter
Index specifies the absolute position of that entity within the list of objects that are hold by the current
group.
HRESULT ScMoveEntity(long OldIndex, long NewIndex)
This function moves an entity that is hold by the current group from the current position that is
specified by OldIndex to a new position that is given by the parameter NewIndex. After the index
position of an entity directly corresponds to the order in which it is marked and to the order in which it is
displayed within the object list, that operation also modifies the appearance and marking position within
the current group.
HRESULT ScGetIndex(ScEntity2D *Entity, long *Index)
This function evaluates the index position where the given Entity is located at within the current
group and returns its value within the parameter Index.
HRESULT ScGetEntityByName(BSTR Name, ScEntity2D **Entity)
This function returns an entity out of the current list using its Name. If there are more entities with
that name the first one that is found is given back within Entity.
HRESULT ScGetNameCount(BSTR Name, long *Count)
This function is related to the preceding one, it returns the number of entities that have the same
107
name that is given in Name. Only if there is a maximum of one entity with a specific name the preceding
function ScGetEntityByName() will be able to have non-ambiguous results.
HRESULT ScIterationStart(long index)
This function can be used together with the next two ones to iterate through a list of entities that is
managed by a specific group. Witht this one an iteration loop is started at the position specified by the
parameter index. The smallest possible starting value is 1, here the first entity of a group is fetched. If
that function was called for a group it is mandatory that the related iteration loop is closed by
ScIterationEnd() in order to avoid error messages about unused objects during application
shutdown.
HRESULT ScIterationEnd()
Ends an iteration loop and frees all resources that have been used for that operation.
HRESULT ScGetNext(ScEntity2D **entity)
Using this function the elements of a group can e fetched one after each other during an iteration
loop operation. The next entity that is fetched by that function call is returned using the parameter
entity.
HRESULT ScAdd(ScEntity* entity)
Adds a new entity to the list of elements that is stored by that group.
HRESULT ScRemove(ScEntity *entity)
Removes the entity that is specified by the pointer to the related entity from the current group.
11.1.1.1.3.1 ScEntities2D
This object is provided by sc_entity_groups.dll
HRESULT ScGroup(long mask,ScEntities2D **NewGroup)
With this function several entities that are hold by the current object can be put into a new
ScEntities2D object depending on a specific state. The state is specified by the parameter mask, for a
list of possible values please refer to ScGroup2D.ScGetCount(). The newly created group is returned
in NewGroup. The entities of that new group are not removed from the current one, they afterwards are
hold by two ScEntities2D objects.
HRESULT ScUnGroup(long mask)
This function reverses subgrouping like it is done by the preceding one. Here all subgrouped
entities are put back according to the mask flags, for a list of possible values please refer to
ScGroup2D.ScGetCount().
HRESULT ScGetCount(long Type, long Mask, long *Count)
This function returns the number of entities within the parameter Count that are hold by the
current group, that have a specific state and that are of a special Type. The state can be specified by
setting the Mask parameter, for a list of possible values please refer to ScGroup2D.ScGetCount(). For
the possible Type parameter values please refer to the description of ScObject.ScIsTypeOf().
108
11.1.1.1.3.1.1 ScJobRoot
This object is provided by sc_entity_groups.dll. This object is the root of every SAM job, it holds all
entities that are used for a marking process.
HRESULT ScSetMultiHeadTool(LPDISPATCH Tool)
This function is currently unused
HRESULT ScGetMultiHeadTool(ScMultiHeadTool *Tool)
This function returns the currently ScMultiHeadTool object that is used by that job root object.
This object provides several functionalities that can be used within a multi head environment to manage
jobs and their entities.
HRESULT ScUseMultiHeadTool(long Use)
HRESULT ScUseMultiHeadTool(long *Use)
The use of the ScMultiHeadTool can be enabled by setting Use to 1 or disabled by setting it to
0. As long as the tool is not enabled it can't be used for the current job. This property can also be used to
retrieve the current usage state of the ScMultiHeadTool.
HRESULT ScSetSecondaryHeadOffset(long DeviceID, double X, double Y, double Z)
Using this function an offset value for heads can be defined. Here DeviceID is the identifier for
the head where the offset has to be set and X, Y and Z specify the offset that has to be used for it.
HRESULT ScGetSecondaryHeadOffset(long DeviceID, long Index, double *Offset)
Here the offset values that are used for the head with the given DeviceID can be retrieved. The
Index value specifies which coordinate value is returned in Offset, if index is 0 the X-offset is returned,
1 has to be used for the Y-offset and 2 for the Z-offset.
HRESULT ScSetTeachReferenceActive(long flags)
The following functions can be used to set and retrieve several job-related parameters. These
parameters are stored together with that job but do not influence it actively. With this function is it possible
to store operational flags for a teach/relocate functionality. Following values are possible for the flags
parameter:
- 0x0000 the teach/relocate mode is disabled completely
- SC_TEACH_FLAG_REFPOINT1 = 0x0001 the mode is enabled and uses one reference point
- SC_TEACH_FLAG_REFPOINT2 = 0x0002 the mode is enabled with two reference points
HRESULT ScGetTeachReferenceActive(long *flags)
This function can be used to retrieve the operational flags for the teach/relocate functionality.
HRESULT ScSetTeachReferencePoint(long flags, double x, double y, double z)
Here the coordinates for a reference point can be set to the job, the parameter flags specifies if
these values are for the reference point 0 or 1 and the coordinates are handed over using the parameters
x, y and z.
HRESULT ScGetTeachReferencePoint(long flags, double *x, double *y, double *z)
Using this function the current reference coordinates for the reference point 1 (flags = 0) or 2
(flags = 1) can be fetched, the related coordinate values are returned in x, y and z.
109
111
11.1.1.1.3.2 ScLineArrays2D
This object is provided by sc_lines2d.dll.
HRESULT ScConvertToPolyLines(ScPolyLines2D *PolyLines, double CloseDistance,
long *LinesRemaining)
This function tries to convert the lines out of the current object into polylines. The resulting
polylines are put into the given PolyLines object. The second parameter CloseDistance defines a
distance between points that is used for merging them: if two points have positions that have this or a
smaller distance they are handled as one single point within the polyline. The last parameter
LinesRemaining returns the number of lines that could not be merged.
11.1.1.1.4 ScControl
This object is provided by sc_entity_groups.dll.
HRESULT ScSetControlFlags(long value, long mask)
Using this function some flags can be set that decide how a control object behaves. These flags
itself depend on the exact type of that control. The type itself can be set using function
ScEvent.ScSetEventType(). The parameter mask decides which flags have to be modified, value
influences which of them have to be set. Both can be a combination of some of the following flags:
- scComControlFlagIOSingleBitMode influence a single digital output bit statically
- scComControlFlagMessageBox open a message box dependent on a digital input bit
112
11.1.1.1.4.1 ScPolyLines2D
This object is provided by sc_lines2d.dll.
The ScLayer object is provided by sc_lines2d.dll.
HRESULT ScFlipLines()
This function flips the order of coordinates of all polyline objects. That means after that operation
all polylines are drawn in reverse direction.
HRESULT ScSort(long Mode, double Dist)
Using this function the coordinate data of the contained polylines are sorted. Here Dist is a
distance parameter that influences the sorting Mode:
- scComPolyLines2DSortModeClosest sort these polylines together which are closest to each other
- scComPolyLines2DSortModeClosestMergeIfConnected sort the polylines and merge these
which are connected and have a distance smaller than Dist between each other.
HRESULT ScCorrectOrientation(long CW)
This function corrects the drawing orientation relative to the View2D. If CW is set to 1 the polylines
are modified in a way so that they are drawn clockwise, if it is 0 they are modified to be drwan counter
clockwise.
HRESULT ScCheckOrientation(long CW, long *Ok)
Using this function the drawing orientation of all contained polylines can be checked without
modifying them. If CW is set to 1 Ok will return 1 if the polylines are oriented clockwise.
HRESULT ScGetOpenPolyLinesCount(long *Count)
This function can be used to count how many polylines within this object are open, means how
many polylines have endpoints with different coordinates than the starting point. The number of polylines
is returned in Count.
HRESULT ScFlipLinesRev()
This function flips the order of coordinates of all polyline objects. That means after that operation
all polylines are drawn in reverse direction and the polyline objects itself are also resorted to appear in
reverse order.
11.1.1.1.4.2 ScEvent
113
114
value = 0 - sets a time value. That time is used according to the one that was set with function
ScSetMS() but with a resolution of microseconds instead of milliseconds
Allowed values
Positive or negative distance values using the measurement unit that was
Offset
115
DAC to be set
A or B
Value to be set
11.1.1.2 ScEntity3D
The ScEntity3D object is provided by sc_kernel.dll.
HRESULT ScMatrix(long index, double *Value)
There is a 4x4 matrix assigned to every ScEntity3D object. Using this function the value of every
field of that matrix can be retrieved via its array index position.
HRESULT ScOutline(long index, double *Value)
The outline of an object is a cuboid that has the size of the maximum x, y and z dimensions of that
object. By using this function the border coordinates by that outline cuboid can be retrieved. The index
parameter describes which coordinate has to be fetched, here 0 is equal to the minimum x value, 1 is
equal to the minimum y value, 2 is equal to the minimum value in z direction, 3 is for the maximum value
in x direction, 4 for the maximum in y direction and 5 for the maximum z value.
Please note that the outline of an object might be invalid after some operations, here first an ScUpdate()
needs to be called.
HRESULT ScTranslate(double X, double Y, double Z)
This function translates the entity relative in X, Y and Z direction using the values handed over as
parameter. After that operation an update of the view might be necessary to let the modifications become
visible that have been done.
HRESULT ScScale(double X, double Y, double Z)
The entity is scaled by the given factor in X, Y and Z direction. A scale value of 1.0 means the
entity is left unchanged in this direction, negative values additionally mirror the object in that direction.
After that operation an update of the view might be necessary to let the modifications become visible that
have been done.
HRESULT ScRotate(double X, double Y, double Z double Angle)
The entity is rotated using the coordinates X, Y and Z as rotation center, the rotation is done
along the Y axis. The rotation parameter Angle has to be given in unit radians. After that operation an
update of the view might be necessary to let the modifications become visible that have been done.
HRESULT ScTransform(double m00, double m01, double m02, double m03, double
m10, double m11, double m12,double m13, double m20, double m21, double
m22,double m23)
116
Using this function a transformation of the object can be done on matrix level, here as parameter
the matrix entries m.. are expected.
HRESULT ScGetInverseMatrix(long Index, double *Value)
Different to the functuon ScMatrix() this one can be used to retrieve the elements of the inverse
matrix. Here Index describes the index position in range 0..15 of the 4x4 matrix array, the according
value is returned in Value.
HRESULT ScUnifyMatrix(void)
The matrix of the object will be unified.
11.1.1.2.1 ScElement3D
The ScElement3D object is provided by sc_kernel.dll.
HRESULT ScItemCount(long *Count)
This function counts the total number of entities that are available and hold by the current element
list and returns it by using the parameter Count.
HRESULT ScItemSelectCount(long *Count)
This function counts the number of selected entities that are available and hold by the current
element list and returns it within the parameter Count.
HRESULT ScItemUsedCount(long *Count)
This function counts the number of currently used entities that are hold by the current element list
and returns it within the parameter Count.
HRESULT ScGetItemUsed(long index, long *Used)
Using this function an entity that is specified by the given index can be checked if it is used or
not.
HRESULT ScSetItemUsed(long index,long Used)
Different to the preceding function with this one an entity that is specified by the index position
can be set to be used (Used = 1) or unused (Used = 0).
HRESULT ScGetItemSelected(long index, long *Selected)
Using this function an entity that is specified by the given index can be checked if it is selected or
not.
HRESULT ScSetItemSelected(long index,long Selected)
Different to the preceding function with this one an entity that is specified by the index position
can be set to be selected (Selected = 1) or not (Selected = 0).
HRESULT ScPack(long DeleteAll)
This function compresses the element object by removing all stored entities that are empty or
marked as to be deleted. If the parameter DeleteAll is set to 1 all entities that are hold by that element
117
are deleted, independent from the fact if they are unused or not.
11.1.1.2.2 ScEntity3DContainer
The ScEntity3DContainer object is provided by sc_kernel.dll.
HRESULT ScGetNumEntities(long *Num)
This function returns the number of entities that are hold by that container object within the
parameter Num.
HRESULT ScGetEntity(long Num, ScEntity3D **Entity)
Using this function a specific entity that is hold by that container can be fetched. Here Num is the
position of that it while the entity itself is returned in Entity.
HRESULT ScPack(long DeleteAll)
This function compresses the container object by removing all stored entities that are empty or
marked as to be deleted. If the parameter DeleteAll is set to 1 all entities that are hold by that container
are deleted, independent from the fact if they are unused or not.
11.1.1.2.3 ScGroup3D
The ScGroup3D object is provided by sc_kernel.dll.
HRESULT ScPack(long DeleteAll)
This function compresses the group object by removing all stored entities that are empty or
marked as to be deleted. If the parameter DeleteAll is set to 1 all entities that are hold by that group
are deleted, independent from the fact if they are unused or not.
HRESULT ScGetCount(long Mask, long *Count)
This function returns the number of entities within the parameter Count that are hold by the
current group and that have a specific state. The state can be specified by setting the Mask parameter,
here a combination out of following flags is possible:
- scComEntityUsed the entity is in use
- scComEntitySelected the entity is selected
- scComEntityOnWork the entity is on work
- scComEntityChangeable the entity is changeable
- scComEntityMarkable the entity is markable
The state flags that are checked by this functions can be set by the appropriate properties of the
ScEntity object, for a description of these properties please refer the related section above.
HRESULT ScIterationStart(long index)
This function can be used together with the next two ones to iterate through a list of entities that is
managed by a specific group. With this one an iteration loop is started at the position specified by the
parameter index. The smallest possible starting value is 1, here the first entity of a group is fetched. If
that function was called for a group it is mandatory that the related iteration loop is closed by
118
ScIterationEnd() in order to avoid error messages about unused objects during application
shutdown.
HRESULT ScIterationEnd()
Ends an iteration loop and frees all resources that have been used for that operation.
HRESULT ScGetNext(ScEntity3D **entity)
Using this function the elements of a group can e fetched one after each other during an iteration
loop operation. The next entity that is fetched by that function call is returned using the parameter
entity.
HRESULT ScAdd(ScEntity* entity)
Adds a new entity to the list of elements that is stored by that group.
HRESULT ScRemove(ScEntity *entity)
Removes the entity that is specified by the pointer to the related entity from the current group.
11.1.1.2.3.1 ScEntities3D
This object is provided by sc_entity_groups.dll
HRESULT ScGroup(long mask,ScEntities3D **NewGroup)
With this function several entities that are hold by the current object can be put into a new
ScEntities3D object depending on a specific state. The state is specified by the parameter mask, for a
list of possible values please refer to ScGroup2D.ScGetCount(). The newly created group is returned
in NewGroup. The entities of that new group are not removed from the current one, they afterwards are
hold by two ScEntities3D objects.
HRESULT ScUnGroup(long mask)
This function reverses subgrouping like it is done by the preceding one. Here all subgrouped
entities are put back according to the mask flags, for a list of possible values please refer to
ScGroup2D.ScGetCount().
11.1.2 ScControlMotion
This object type is provided by sc_ad_io.dll. Different to the ScEvent objects of type motion that was
described above this one can be used to control a drive directly but not included into the working flow of a
job.
Here all functions that are available are described. If their functionality can be used depends on the
connected drive and its capabilities so it might be that several commands (e. g. for stopping a drive during
a movement, for moving to a home position or for fetching specific drive parameters using
ScGetAxisParam()) are not available if the drive doesn't supports that feature.
Using this control object only these axes can be controlled that are configured correctly. For a description
how to set up a driver for a specific motion controller and how to configure it, please refer to the user
119
manual of SAMLight and to the document External Motion Control Device Interface Specification
ExtMotion_Spec.pdf
HRESULT ScSetAxisPosition(long Axis, double Pos, long Go, long WaitForEnd)
This function causes a movement if the parameter Go is set to 1, it lets a connected drive move to
the absolute position given in parameter Pos. The value that is entered here has to be given using the
length measurement unit that is currently set for the kernel and should be used only in planar movement
mode (please refer to function ScGetAxisMode() below). The parameter Axis specifies the axis that
has to be driven and can have a value in range 0..9. If WaitForEnd is set to 1 the function returns only
after the desired position was reached by the drive. If it is set to 0 the movement will be initiated and the
function returns immediately.
If Go is set to 0 the position change information is stored, the axis will be moved to that position only after
the next call of ScGo().
HRESULT ScGetAxisPosition(long Axis, double *Pos)
This function can be used to evaluate the current position of an drives axis, here Axis defines for
which one the position has to be fetched, the current position value is returned in Pos. The valid range for
Axis is 0..9.
In some cases it might be necessary to call ScUpdateAxisPosition() before to get the real position of
the axis.
HRESULT ScSetAxisSpeed(long Axis,long SpeedId, double Speed)
Using this function movement speeds can be defined for an axis. Here Axis defines with values
in range 0..9 for which axis a speed has to be set, Speed defines the speed value that has to be used (in
unit currently used kernel unit per second) and SpeedId specifies what type of speed has to be set by
this function call:
- scComControlMotionSpeedMove the speed that has to be used for normal movements
- scComControlMotionSpeedMin the minimum allowed speed
- scComControlMotionSpeedMax the maximum allowed speed
- scComControlMotionSpeedDefault - the default speed that has t obe used whe nnothing else was
set
HRESULT ScGetAxisSpeed(long Axis, long SpeedId, double *Speed)
This function returns speed values for the specified axis in parameter Speed.
HRESULT ScSetAxisPosRelative(long Axis, double Pos, long Go, long WaitForEnd)
This function causes a movement if the parameter Go is set to 1, it lets a connected drive move to
a position Pos that is relative to the current one. The value that is entered here has to be given using the
length measurement unit that is currently set for the kernel and should be used for planar movement
modes only (please refer to function ScGetAxisMode() below). The parameter Axis specifies the axis
that has to be driven and can have a value in range 0..9. If WaitForEnd is set to 1 the function returns
only after the desired position was reached by the drive. If it is set to 0 the movement will be initiated and
the function returns immediately.
If Go is set to 0 the position change information is stored only, the axis will be moved to that position after
the next call of ScGo().
HRESULT ScGo(long WaitForEnd)
This function causes a drive to move to all its axes to a stored position. If WaitForEnd is set to 1
the function returns only after the desired position was reached by the drive. If it is set to 0 the movement
will be initiated and the function returns immediately.
HRESULT ScIsMoving(long Axis, long *Moving)
Using this function it can be checked if a specific Axis is currently moving or not. The movement
120
information is given in Moving, if the returned value is 0 the axis currently doesn't moves.
HRESULT ScStop(long Axis)
With this function the movement for the specified Axis can be stopped immediately.
HRESULT ScUpdateAxisPosition(long Axis)
This function updates the position information for the specified Axis so that the next call to
ScGetAxisPosition() returns the real position of the axis. It is recommended to execute that function
before every call of ScGetAxisPosition() in case the movement could be interrupted somehow (e.g.
by a call to ScStop() or by a forced external stop caused by limit switches or an emergency stop).
HRESULT ScGetAxisName(long Axis, BSTR *Name)
This function returns the Name that was configured for the given Axis. That name normally
consists of one single character.
HRESULT ScHome(long Axis)
Lets the specified Axis move to its configured home position. This function updates the real
position automatically, there is no explicit call to ScUpdateAxisPosition() necessary afterwards.
HRESULT ScSendString(long Type, BSTR Data)
This function sends a plain text string given in Data to the drive. The parameter Type is reserved
for future use and should be set to 0.
HRESULT ScSetAxisAngle(long Axis, double Angle, long Go, long WaitForEnd);
This function causes a movement if the parameter Go is set to 1, it lets a connected drive move to
the given absolute Angle. The value that is entered here has to be given in unit degrees. This function
should be used for angular movement modes only (please refer to function ScGetAxisMode() below).
The parameter Axis specifies the axis that has to be driven and can have a value in range 0..9. If
WaitForEnd is set to 1 the function returns only after the desired angular position was reached by the
drive. If it is set to 0 the movement will be initiated and the function returns immediately.
If Go is set to 0 the position change information is stored only, the axis will be moved to that position after
the next call of ScGo() and the function will return immediately too.
HRESULT ScSetAxisAngleRelative(long Axis, double Angle, long Go, long
WaitForEnd)
This function causes a movement if the parameter Go is set to 1, it lets a connected drive move to
a position that is relative to the current one. The relative movement value value that is specified using
parameter Angle has to be given in unit degrees. This function should be used for angular movement
modes only (please refer to function ScGetAxisMode() below). The parameter Axis specifies the axis
that has to be driven and can have a value in range 0..9. If WaitForEnd is set to 1 the function returns
only after the desired angular position was reached by the drive. If it is set to 0 the movement will be
initiated and the function returns immediately.
If Go is set to 0 the position change information is stored only, the axis will be moved to that position after
the next call of ScGo() and the function will return immediately too.
HRESULT ScSetAxisValue(long Axis, double val)
This function causes a movement for the specified Axis, it drives it to the position or angle
specified by val immediately. The value that is entered here has to be given in unit degrees or using the
current kernel unit per seconds depending on the current working mode (please refer to function
ScGetAxisMode() below). If the target position value is interpreted as distance or angular value
depends on the mode that is currently configured.
121
11.1.3 ScControlAdIo
This object type is provided by sc_ad_io.dll.
HRESULT ScAnalogChannelOut(long *pVal)
HRESULT ScAnalogChannelOut(long newVal)
This property is currently not supported and reserved for future use.
HRESULT ScAnalogChannelIn(long *pVal)
HRESULT ScAnalogChannelIn(long newVal)
This property is currently not supported and reserved for future use.
HRESULT ScDigitalChannelOut(long *pVal)
HRESULT ScDigitalChannelOut(long newVal)
This property is currently not supported and reserved for future use.
HRESULT ScDigitalChannelIn(long *pVal)
HRESULT ScDigitalChannelIn(long newVal)
This property is currently not supported and reserved for future use.
HRESULT ScReadAnalog(double *retval)
122
This function is currently not supported and reserved for future use.
HRESULT ScReadDigital(double *retval)
This function is currently not supported and reserved for future use.
HRESULT ScWriteAnalog(double newVal)
This function is currently not supported and reserved for future use.
HRESULT ScWriteDigital(double newVal)
This function is currently not supported and reserved for future use.
123
12 Function Reference
Following the functions for some selected SAM modules (DLLs and OCX') are described. Depending on
the programming language some of the functions described here may appear as some kind of property
that is similar to a variable where values can be assigned using the = operator or where its contents can
be used directly. Also the number of parameters and the way a value is returned may differ dependent
from the programming language. For some more details about that please refer to the documentation of
your development environment or programming language to see how these functions that are delivered
through the COM interface will appear exactly.
Additionally here all functions are described that exist for the SAM interface. Some of them require
specific licenses (e.g. multihead or 3D licenses) and will not work as described if that license is not
available.
124
126
HRESULT ScPopLockMessage()
This function is deprecated and should not be used.
HRESULT ScResourceEditMode(long *Mode)
HRESULT ScResourceEditMode(long Mode)
This property is related to the resource edit functionality that allows it to start an application using
different languages or to translate a SAM application online. If Mode is set to 1 the online editing mode is
enabled that allows it to translate dialogues and strings directly within the application, if Mode is set to 0 all
the GUI elements that are related to that functionality are hidden.
HRESULT ScResourceLanguage(BSTR Language)
HRESULT ScResourceLanguage(BSTR *Language)
These functions can be used to get or set the current language. The default language string is
English, all other language strings depend on the used resource.
HRESULT ScGetResourceFileName(BSTR *Name)
This function returns the full name of the currently used resource file name and the path to it. The
resource file is normally located within the installations subfolder system and has a name
sc_resource_###.sam where ### is the language name as set by using ScResourceLanguage().
HRESULT ScGetResourceManager(ScResourceManager **ResourceManager)
This function returns a pointer to a ScResourceManager object. That object encapsulates all
resource and language management functionalities that can be used to modify and edit an applications
language.
HRESULT ScSetModuleName(long MapID, BSTR Name)
Currently unused.
HRESULT ScSetConfigString(long StringID, BSTR String)
This function is used internally only.
HRESULT ScGetConfigString(long StringID, [out, retval] BSTR *String)
This function is used internally only.
HRESULT ScOpticSetup(long *OnOff)
HRESULT ScOpticSetup(long OnOff)
This flags can be used to signal the kernel if the application is in a mode where it configures the
optic or not. The kernel behaves different if the application configures or uses the optic module therefore it
is important to set and get this state.
HRESULT ScSetHardwareIOInfo(long InfoTypeId, long Value)
Using this function a preinitialization for the digital inputs and outputs can be done. Thats
necessary to enable them for usage out of the application or to lock them if they don't have to be used.
Here the value of InfoTypeId decides which mode is set and Value sets the inputs/outputs that are set
or locked:
- if the InfoTypeId is 0 the digital outputs specified by Value are enabled for use with ScEvent objects
- if the InfoTypeId is 1 the digital inputs specified by Value are enabled for use with ScEvent objects
An example: to enable all digital inputs for use with an event object a call ScSetHardwareIOInfo(0,1) or ScSetHardwareIOInfo(0,0xFFFFFFFF) has to be made, here all Value-bits are set.
HRESULT ScGetHardwareIOInfo(long InfoTypeId, long *Value)
127
Using this function the current IO usage state information can be retrieved, here the parameters
are used acording to the preceding function while Value returns the currently enabled bits for the digital
inputs and outputs.
HRESULT ScConvertToUnit(long ConvertDir, double Value, double Resolution,
double *ConvertedValue)
With this function it is possible to convert values to and from the internally used unit that was set
with the function ScSetKernelUnit(). Here the parameters can have following values:
ConvertDir: the converting direction, SC_COM_CONVERT_TO_UNIT_SYSTEM = 0 to convert values
from millimeters to the internally used unit, SC_COM_CONVERT_TO_UNIT_MM = 1 to convert the Value
back from the internally used unit to millimeters.
Resolution: This parameter specifies which number of decimal places have to be used for the
calculations result.
The parameter ConvertedValue will hold the calculated value after the conversion.
HRESULT ScGetMotionControl(long Type, LPDISPATCH *Control)
This function can be used to retrieve a motion control object from the kernel. The only Type
parameter that is currently supported is scComObjectControlMotion that causes this function to
return a ScMotion object within the parameter Control.
HRESULT ScSetMotionControl(long Type, LPDISPATCH Control)
With this function a motion control object can be added to the kernel in order to retrieve it with the
preceding function.
HRESULT ScSetDefaultPropertyVariant(long Pid1, long Pid2, long Pid3, long
Pid4, long VariantId, long ParamId, VARIANT Value)
Here a specific property is set for the kernel, for a list of values that have to be entered within the
parameters Pid1, Pid2, Pid3, Pid4, VariantId and ParamId and their functionality please refer to
the sections above.
HRESULT ScGetDefaultPropertyVariant(long Pid1, long Pid2, long Pid3, long
Pid4, long VariantId, long ParamId, VARIANT *Value)
Here a specific property can be fetched from the kernel, for a list of values that have to be entered
within the parameters Pid1, Pid2, Pid3, Pid4, VariantId and ParamId and their functionality please
refer to the sections above.
HRESULT ScSetDisplayFlags(long FlagsId, long Flags)
Display flags decide which parts of the application are shown or not. That also includes other
modules apart the kernel that provide e.g. GUI elements to the user. The FlagsId parameter decides
which group of flags has to be set, here currently only the value SC_DISPLAY_FLAG_USER_LEVEL = 1
is supported. For that FlagsId a combination of following flags is possible:
- scComView2DCtrlShowCoordinates show the coordinates within the View2D
- scComView2DCtrlShowCameraToolbar display the camera toolbar within the View2D
- scComView2DCtrlShowCtrlHelp show help texts on relevant GUI elements of the View2D
- scComView2DCtrlShowToolsToolbar display the tools toolbar within the View2D
- scComView2DCtrlShowWorkingArea show the used working area within the View2D
- scComView2DCtrlShowViewLevelToolbar display the view level toolbar within the View2D
- scComView2DCtrlShowContextMenu display context menus within the View2D
- scComView2DCtrlShowStatusBar display a state bar
- scComView2DCtrlShowScaleBar show the scaling bar
- scComView2DCtrlShowPropSheet enable displaying of the entity property sheets
- scComView2DCtrlShowContextMenuPolyline show a context menu for polylines
- scComView2DCtrlShowContextMenuEditItem display the context menu for editing items
- scComView2DCtrlShowEntityList show the entity list containing the currently used elements
128
- scComView2DCtrlShowBigSymbols use big symbols instead of the standard-sized ones for e.g.
usage with touch screens
- scComView2DCtrlHideView2D hide the View2D completely
HRESULT ScGetDisplayFlags(long FlagsId, long *Flags)
Returns the currently used display flags. For a list of flag identifiers that can be handed over using
the parameter FlagsId and the corresponding Flags please refer to the preceding function.
HRESULT ScDoHelp(BSTR HelpFile, long HelpID, long Flags, long *Result)
Using this function a context sensitive help can be implemented. Here HelpFile can be a .chm
file, if this parameter is set to NULL the standard help file is used. The HelpID specifies a constant within
the used help file that should correspond to the applications context the help is called from. The
parameter Flags is reserved for future use.
HRESULT ScHelpFilePath(BSTR *Path)
HRESULT ScHelpFilePath(BSTR Path)
Using this property the path to the help file that is used by default can be get or set.
HRESULT ScHelpFlag(long *Flags)
HRESULT ScHelpFlag(long Flags)
This property can be used to get or set the help flags that influence the displaying of the help.
Here for Flags following values are possible:
- scComKernelHelpIdDisableF1Help disables displaying of the help when the function key 1 is
pressed
- scComKernelHelpIdDisableHelp disables the help completely
To fully enable the help Flags has to be set to 0.
HRESULT ScSetDoubleValue(long ValueID, double Value)
Currently unused
HRESULT ScGetDoubleValue(long ValueID, double *Value)
Currently unused
HRESULT ScSetLongValue(long ValueID, long Value)
Using this value some very special parameters can be set to tweak the kernel and the SAM
library. Here a value can be set related to a special Id that specifies what kind of modification is done by
that value. For ValueID following constants are possible:
the translated ones. This function generates a resource name that points to the original texts. Here Name
is the name of the dialogue where the resources are used for and cls_id is the identifier that is used for
that dialogue. The resulting original resource name is returned in Value.
HRESULT ScUserChiffre(long CustomerId, long DongleId, long Mode, long* Data,
long* Key, long *Result)
This function is used only internally.
HRESULT ScSetShiftStartTime(long Index, DATE time)
These and the following functions are related to the internal shit map that can be used together
with serial numbers or date/time entities to influence them working shift dependent. With this function the
starting time for a new shift can be defined, here Index specifies the number of the shift and the
parameter time the starting time of that working shift. The parameter Index can be a value in range
0..23. The end time of that shift is equal to the starting time of the next shift.
HRESULT ScGetShiftStartTime(long Index, DATE *pTime)
With this function the current starting time for a shift can be evaluated, here Index specifies the
number of the shift, the starting time of that working shift is returned in pTime. The parameter Index can
be a value in range 0..23.
HRESULT ScSetShiftIdentifier(long Index, BSTR ident)
Here a name can be assigned to a working shift to identify it. That identifier is used within the
related serial number depending on the current time. Index specifies the number of the shift and ident
is the name that has to be set for that shift. The parameter Index can be a value in range 0..23.
HRESULT ScGetShiftIdentifier(long Index, BSTR *pVal)
Different to the preceding function here a name that is assigned to a working shift can be fetched.
Index specifies the number of the shift, the name of that shift is returned in pVal. The parameter Index
can be a value in range 0..23.
HRESULT ScSetMapTime(long mode, long Index, DATE time)
Similar to the working shifts of the functions above a more general mapping can be defined. While
working shifts always act on a hourly base and can cover a maximum of one day here with the maps the
working range can be defined using the parameter mode:
- SC_IDX_TIME = 0 this mode can be used similar to the working shift mode, here the mapping index
can have a value in range of 0..23 hours
- SC_IDX_MONTH = 1 with this mode a month-based mapping can be performed, the mapping index is
valid for a range from 0..11
With this function a starting time for a mapping can be defined, here the end of that time period is equal
to the starting time of the next mapping Index entry.
HRESULT ScGetMapTime(long mode, long Index, DATE *pTime)
This function can be used to retrieve the mapping time for a selected mode and map Index. The
related starting time is returned within pTime. The valid range for parameter Index depends on the used
mapping mode.
HRESULT ScSetMapIdentifier(long mode, long Index, BSTR ident)
Using this function a textual identifier ident can be assigned to a shift map entry. That identifier
can be used for serial numbers or date/time entities within the selected time range.
HRESULT ScGetMapIdentifier(long mode, long Index, BSTR *pVal)
130
With this function the identifiers that are assigned to specific map indices can be retrieved, that
value is returned in parameter pVal.
HRESULT ScReinitKernel(long flags)
When this function is called the kernel is initialized completely. That includes the license retrieval:
if the reinitialization is done, no valid license file can be found and the user isn't able to enter the correct
password the application will be forced to shut down by that function.
131
Here the 2 is a version number that corresponds to the internal structure of the file. This field is
mandatory. The next line contains a number that is equal to the number of slices that have to be created
for that file, this number is used for internal calculations and to provide an expressive progress bar. The
third line specifies if all following target_dist-Parameters are relative to the base of the mesh (R set)
or if the target_dist specifies absolute values in used coordinate system (empty line without R).
Now all following lines describe the slices itself. Here two methods are possible. The first one describes a
target_dist and a stepwidth, here the stepwidth is used for the thickness of all slices until the
specified target distance is reached. Using this syntax it is possible to define a range of slices just by
using one single line. The second syntax provides the possibility to define one single slice, here the
target_dist specifies where this single slice has to end. Both methods of defining slices use the
preceding slice position as starting point, the thickness of a slice results out of the difference between
both values. Additional a pen number is specified in both cases, this one-based pen number is assigned
to the related slices. And as a third, optional parameter the number of the hatch can specified that has to
be applied to that slice. It corresponds to the default hatch styles of the hatch property pane. To use such
a predefined hatch, here the required parameters have to be stored and the related hatch 1 and/or 2 has
to be enabled.
As an example such a slice definition file can look like this:
2
13
R
0.10;0.01 1
0.11 2
0.15 1
0.17 3
Here the file version number is 2 to exactly specify this format is used. The number of sliced defined
within that file is 13 and all given distances are relative to the starting coordinate of the 3D mesh. First
there is a range of slices defined, here ten slices have to be created from position 0.00 to position 0.10
with a thickness of 0.01. The pen number 1 is assigned to all these ten slices. Following these three slices
are created:
- a single slice from 0.10 to 0.11 (= thickness of 0.01) where pen 2 is assigned to
- a single slice from 0.11 to 0.15 (= thickness of 0.04) where pen 1 is assigned to
- a single slice from 0.15 to 0.17 (= thickness of 0.02) where pen 3 is assigned to
132
13 Index
A
Adding............................................................................................................................................................................10
Adding,Setting and Getting Points, PolyLine, Working With Entities.............................................................................19
Alignment,TextProperties, Working With Entities...........................................................................................................51
ASCII Files,SerialNumberProperties, Working With Entities..........................................................................................67
B
BarCode.........................................................................................................................................................................55
BarCodeProperties, Property Assignment, Working With Entities.................................................................................55
Basic Types, OverView,Working with Entities..................................................................................................................5
Beamcompenstion, Property Assignment, Working With Entities..................................................................................36
bitmap..........................................................................................................................................................................103
Brightness......................................................................................................................................................................69
Brightness ,PixelArrayProperties, Working With Entities...............................................................................................69
C
Calls,Import/Export, Working with Entities.....................................................................................................................83
cComDataMatrixExEncodationANSI_X12.....................................................................................................................60
Close()............................................................................................................................................................................83
Clustering.......................................................................................................................................................................15
Clusters, Groups, Working With Entities........................................................................................................................15
D
DataMatrixEx..................................................................................................................................................................59
date................................................................................................................................................................................94
DateTime Formats,SerialNumberProperties, Working With Entities..............................................................................65
digital input...........................................................................................................................................................111, 113
digital inputs.........................................................................................................................................................126, 127
digital output.................................................................................................................................................111, 112, 113
digital outputs.......................................................................................................................................................113, 126
E
Elements, Working with Entities.....................................................................................................................................18
entity constructor..............................................................................................................................................................7
Entity Specific Properties, Property Assignment, Working With Entities........................................................................44
EntityProperty, Property Assignment, Working With Entities.........................................................................................38
Example,Import/Export, Working with Entities...............................................................................................................84
ExposureProperty, Property Assignment, Working With Entities...................................................................................30
F
File Access,Import/Export, Working with Entities...........................................................................................................83
FixedProperties, Property Assignment, Working With Entities......................................................................................40
Format,SerialNumberProperties, Working With Entities................................................................................................63
Formats,Import/Export, Working with Entities................................................................................................................80
G
General Properties, Property Assignment, Working With Entities.................................................................................29
groups..............................................................................................................................................................................9
Groups, Working with Entities..........................................................................................................................................9
H
hatcher.........................................................................................................................................................................104
hatching..........................................................................................................................................................................15
HatchProperty, Property Assignment, Working With Entities.........................................................................................32
I
Import/Export, Working with Entities..............................................................................................................................80
Index and Order, Groups, Working With Entities...........................................................................................................13
Initialize and update.........................................................................................................................................................7
133
L
Limits ,PixelArrayProperties, Working With Entities.......................................................................................................69
LineArray, Elements, Working With Entities...................................................................................................................22
linearrays........................................................................................................................................................................22
Load and Save, Working with Entities............................................................................................................................85
M
marking on-the-fly........................................................................................................................................................113
Marking order...................................................................................................................................................................9
motion event.................................................................................................................................................................113
N
Number Mode,SerialNumberProperties, Working With Entities.....................................................................................62
O
Orientation, TextProperties, Working With Entities........................................................................................................44
outline.............................................................................................................................................................................88
P
pixel array.......................................................................................................................................................................25
PixelArray, Elements, Working With Entities..................................................................................................................25
PixelArrayProperties, Property Assignment, Working With Entities.........................................................................67, 70
PolyLine.........................................................................................................................................................................19
PolyLine, Elements, Working With Entities....................................................................................................................23
Position Size and Rotation, Working with Entities..........................................................................................................73
Property Assignment, Working with Entities..................................................................................................................29
R
Radial Text,TextProperties, Working With Entities............................................................................................54, 58, 59
rasterized data...............................................................................................................................................................25
rectangle......................................................................................................................................................................101
Removing.......................................................................................................................................................................10
RenderProperty, Property Assignment, Working With Entities......................................................................................39
Resolution,Import/Export, Working with Entities............................................................................................................83
Resolution,TextProperties, Working With Entities..........................................................................................................53
S
SC_AXIS_X..................................................................................................................................................................109
SC_AXIS_Y..................................................................................................................................................................109
SC_AXIS_Z..................................................................................................................................................................109
SC_COM_CONVERT_TO_UNIT_MM.........................................................................................................................127
SC_COM_CONVERT_TO_UNIT_SYSTEM................................................................................................................127
sc_com_point.........................................................................................................................................................98, 102
sc_com_point_3d.............................................................................................................................................98, 99, 103
SC_DISPLAY_FLAG_USER_LEVEL..........................................................................................................................127
sc_entity_groups.dll.....................................................................................................................107, 108, 111, 113, 118
SC_ENTITY2D_ALIGN_FLAGS_BOTTOM...................................................................................................................94
SC_ENTITY2D_ALIGN_FLAGS_CENTER...................................................................................................................94
SC_ENTITY2D_ALIGN_FLAGS_LEFT.........................................................................................................................94
SC_ENTITY2D_ALIGN_FLAGS_LINE_CENTER.........................................................................................................94
SC_ENTITY2D_ALIGN_FLAGS_LINE_LEFT...............................................................................................................94
SC_ENTITY2D_ALIGN_FLAGS_LINE_RIGHT.............................................................................................................94
SC_ENTITY2D_ALIGN_FLAGS_MIDDLE.....................................................................................................................94
SC_ENTITY2D_ALIGN_FLAGS_NO_ALIGN................................................................................................................94
SC_ENTITY2D_ALIGN_FLAGS_RADIAL_CENTER....................................................................................................94
SC_ENTITY2D_ALIGN_FLAGS_RADIAL_END............................................................................................................94
SC_ENTITY2D_ALIGN_FLAGS_RIGHT.......................................................................................................................94
SC_ENTITY2D_ALIGN_FLAGS_TOP...........................................................................................................................94
SC_EVENT_IO_VALUE_MOVE_ANGLE....................................................................................................................121
SC_EVENT_IO_VALUE_MOVE_RELABS..................................................................................................................121
SC_EVENT_SET_DOUBLE_VALUE_DISTANCE_AXIS_0........................................................................................114
SC_EVENT_SET_DOUBLE_VALUE_DISTANCE_AXIS_1........................................................................................114
SC_EVENT_SET_DOUBLE_VALUE_DISTANCE_AXIS_2........................................................................................114
SC_EVENT_SET_DOUBLE_VALUE_DISTANCE_AXIS_3........................................................................................114
SC_EVENT_SET_DOUBLE_VALUE_DISTANCE_AXIS_4........................................................................................114
SC_EVENT_SET_DOUBLE_VALUE_SPEED_AXIS_0..............................................................................................114
SC_EVENT_SET_DOUBLE_VALUE_SPEED_AXIS_1..............................................................................................114
SC_EVENT_SET_DOUBLE_VALUE_SPEED_AXIS_2..............................................................................................114
SC_EVENT_SET_DOUBLE_VALUE_SPEED_AXIS_3..............................................................................................114
SC_EVENT_SET_DOUBLE_VALUE_SPEED_AXIS_4..............................................................................................114
SC_IDX_MONTH.........................................................................................................................................................129
134
SC_IDX_TIME..............................................................................................................................................................129
SC_MODE_ANGULAR................................................................................................................................................109
SC_MODE_DONT_MOVE_BACK...............................................................................................................................109
SC_MODE_KEEP_MARKFLAG..................................................................................................................................109
SC_MODE_MOTF.......................................................................................................................................................109
SC_MODE_MOTF_REVERSE....................................................................................................................................109
SC_MODE_MOVE_CCW............................................................................................................................................109
SC_MODE_MOVE_FORWARD..................................................................................................................................109
SC_MODE_PLANAR...................................................................................................................................................109
SC_MODE_PLANAR_SIM...........................................................................................................................................109
SC_MODE_SPLITAXIS_X...........................................................................................................................................109
SC_MODE_SPLITAXIS_Y...........................................................................................................................................109
SC_MODE_SPLITAXIS_Z...........................................................................................................................................109
SC_MOTION_CONTROL_GET_VALUE_DIRIO.........................................................................................................121
SC_MOTION_CONTROL_GET_VALUE_HSLIMIT.....................................................................................................121
SC_MOTION_CONTROL_GET_VALUE_INCPERMM...............................................................................................121
SC_MOTION_CONTROL_GET_VALUE_INCPERROT..............................................................................................121
SC_MOTION_CONTROL_GET_VALUE_STEPIO......................................................................................................121
SC_PLANE_TYPE_XY..................................................................................................................................................96
SC_PLANE_TYPE_XZ..................................................................................................................................................96
SC_PLANE_TYPE_YZ..................................................................................................................................................96
SC_TEACH_FLAG_REFPOINT1................................................................................................................................108
SC_TEACH_FLAG_REFPOINT2................................................................................................................................108
ScActive().....................................................................................................................................................................104
ScAdd()..........................................................................................................................................................10, 107, 118
ScAddLineArray().........................................................................................................................................................103
ScAddLinesInProc().......................................................................................................................................................22
ScAddPointsInProc()..........................................................................................................................19, 98, 99, 102, 103
ScAddPolyLine()..........................................................................................................................................................103
ScAddProperty().............................................................................................................................................................89
ScAddRow().................................................................................................................................................................103
ScAlign().........................................................................................................................................................................94
ScAlloc().........................................................................................................................................................................25
ScAnalogChannelIn()...................................................................................................................................................121
ScAnalogChannelOut()................................................................................................................................................121
ScapsSamDataBase......................................................................................................................................................85
ScapsSamKernel...........................................................................................................................................................11
ScASCIIFileName..........................................................................................................................................................67
ScAutoUpdate()............................................................................................................................................................125
ScBarCode12...........................................................................................................................................................17, 86
ScBarCode12Chars2D.............................................................................................................................................16, 63
ScBarCode39.................................................................................................................................................................87
ScBarFlags.....................................................................................................................................................................58
ScBeat().......................................................................................................................................................................105
ScChain2D.....................................................................................................................................................................87
ScChangeAble().............................................................................................................................................................90
ScChangeMarkSequence()............................................................................................................................................95
ScCharFlags..................................................................................................................................................................53
ScCheckKernel()..........................................................................................................................................................124
ScCheckOrientation()...................................................................................................................................................112
ScClearLastSequence()...............................................................................................................................................124
ScClearUndo().............................................................................................................................................................124
ScClusterID()..................................................................................................................................................................15
scComBarFlagDisableAutoQuietZone...........................................................................................................................58
scComBarFlagQuietZoneAbsolute.................................................................................................................................58
scComChangeMarkSequenceFlagDecrement...............................................................................................................95
scComChangeMarkSequenceFlagIncrement................................................................................................................95
scComChangeMarkSequenceFlagReset.......................................................................................................................95
scComCharFlagItalic......................................................................................................................................................53
scComCharFlagMonoSpaced........................................................................................................................................53
scComCharFlagRadial.............................................................................................................................................53, 54
scComCharWeightBold..................................................................................................................................................53
scComCharWeightExtraBold.........................................................................................................................................53
scComCharWeightExtraLight.........................................................................................................................................53
scComCharWeightHeavy...............................................................................................................................................53
scComCharWeightLight,................................................................................................................................................53
scComCharWeightMedium............................................................................................................................................53
scComCharWeightNormal.............................................................................................................................................53
scComCharWeightSemiBold..........................................................................................................................................53
135
scComCharWeightThin..................................................................................................................................................53
scComControlFlagDisabled.........................................................................................................................................112
scComControlFlagIOSingleBitMode............................................................................................................................111
scComControlFlagMessageBox...................................................................................................................................111
scComControlFlagMessageBoxOnly...........................................................................................................................112
scComControlFlagNoAutoName..................................................................................................................................112
scComControlFlagPulseMode.....................................................................................................................................112
scComControlMotionSpeedDefault..............................................................................................................................119
scComControlMotionSpeedMax..................................................................................................................................119
scComControlMotionSpeedMin...................................................................................................................................119
scComControlMotionSpeedMove................................................................................................................................119
scComDebugFileOutput...............................................................................................................................................123
scComDebugMessageBox...........................................................................................................................................123
scComDebugNoOutput................................................................................................................................................123
scComEllipseGenerationModeArc3Point.....................................................................................................................100
scComEllipseGenerationModeArcCenterRadiusAngle................................................................................................100
scComEllipseGenerationModeCircle3Point...................................................................................................................99
scComEllipseGenerationModeCircleCenterRadius.....................................................................................................100
scComEllipseGenerationModeDefault...........................................................................................................................99
scComEntityChangeable......................................................................................................................................106, 117
scComEntityMarkable..........................................................................................................................................106, 117
scComEntityOnWork............................................................................................................................................106, 117
scComEntityOrderFlagArrayBiDir..................................................................................................................................90
scComEntityOrderFlagArrayXDown...............................................................................................................................90
scComEntityOrderFlagArrayXMainDir...........................................................................................................................90
scComEntityOrderFlagArrayYDown...............................................................................................................................90
scComEntityOrderFlagBitmapBeginMarkWithLastLine..................................................................................................90
scComEntityOrderFlagBitmapMarkBiDir........................................................................................................................90
scComEntityOrderFlagBitmapNoLineIncrement............................................................................................................90
scComEntityOrderFlagHatchFirst..................................................................................................................................90
scComEntitySelected.....................................................................................................................................11, 106, 117
scComEntityUsed...........................................................................................................................................11, 106, 117
scComEventTypeAnalogOutput...........................................................................................................................113, 115
scComEventTypeGeneral............................................................................................................................................113
scComEventTypeIOOutput..........................................................................................................................................113
scComEventTypeIOWaitForInput................................................................................................................................113
scComEventTypeMessage..........................................................................................................................................113
scComEventTypeMofOffset.........................................................................................................................................113
scComEventTypeMotion......................................................................................................................................113, 114
scComEventTypeMotionInitiate...................................................................................................................................113
scComEventTypeTimer........................................................................................................................................113, 114
scComEventTypeWaitForTrigger.........................................................................................................................113, 114
scComKernelCheckInit.................................................................................................................................................124
scComKernelCheckIntermedPath................................................................................................................................124
scComKernelCheckLicense.........................................................................................................................................124
scComKernelCheckOpticSetupMode...........................................................................................................................124
scComKernelCheckSystemPath..................................................................................................................................124
scComKernelHelpIdDisableF1Help..............................................................................................................................128
scComKernelHelpIdDisableHelp..................................................................................................................................128
scComKernelUnitBit.....................................................................................................................................................124
scComKernelUnitInch..................................................................................................................................................124
scComKernelUnitMil.....................................................................................................................................................124
scComKernelUnitMM...................................................................................................................................................123
scComLayerFile2DStyleCheckOrientation.....................................................................................................................82
scComLayerFile2DStyleExportLineArrays.....................................................................................................................82
scComLayerFile2DStyleExportOnlySelected.................................................................................................................82
scComLayerFile2DStyleExportPolyLines.......................................................................................................................82
scComLayerFile2DStyleImportAllToLineArrays.............................................................................................................82
scComLayerFile2DStyleImportLineArrays.....................................................................................................................82
scComLayerFile2DStyleImportOpenPolyLines..............................................................................................................82
scComLayerFile2DStyleImportPolyLines.......................................................................................................................82
scComLayerFile2DStyleImportToEntities2D..................................................................................................................82
scComLayerFile2DStyleImportToLayer.........................................................................................................................82
scComLayerFile2DStyleReadPens................................................................................................................................82
scComLayerFile2DStyleWritePens................................................................................................................................82
scComLayerFile2DStyleWritePreview...........................................................................................................................82
scComLongValueIDDisableFileCompression..............................................................................................................128
scComLongValueIDDisableGuiUpdate........................................................................................................................128
scComObject..................................................................................................................................................................86
136
scComObjectBarCode12...............................................................................................................................................86
scComObjectBarCode39...............................................................................................................................................87
scComObjectChain2D....................................................................................................................................................87
scComObjectControl......................................................................................................................................................87
scComObjectControlGalvoModLaser2D........................................................................................................................87
scComObjectControlMotion.........................................................................................................................................127
scComObjectControlRTC1000.......................................................................................................................................87
scComObjectControlRTC2.............................................................................................................................................87
scComObjectCorrTable..................................................................................................................................................87
scComObjectEditGroup2D.............................................................................................................................................86
scComObjectEditGroup3D.............................................................................................................................................87
scComObjectElement2D................................................................................................................................................86
scComObjectElement3D................................................................................................................................................87
scComObjectEllipse2D..................................................................................................................................................86
scComObjectEntities2D.................................................................................................................................................87
scComObjectEntities3D.................................................................................................................................................87
scComObjectEntity.........................................................................................................................................................86
scComObjectEntity2D....................................................................................................................................................86
scComObjectEntity2DContainer....................................................................................................................................86
scComObjectEntity3D....................................................................................................................................................87
scComObjectEvent........................................................................................................................................................87
scComObjectGroup2D...................................................................................................................................................87
scComObjectGroup3D...................................................................................................................................................87
scComObjectHatch........................................................................................................................................................86
scComObjectJobRoot....................................................................................................................................................87
scComObjectLayer.........................................................................................................................................................86
scComObjectLayerFile2D..............................................................................................................................................87
scComObjectLayerFileCli...............................................................................................................................................87
scComObjectLayerFileHpgl...........................................................................................................................................87
scComObjectLayerFilePixel...........................................................................................................................................87
scComObjectLayerSolid.................................................................................................................................................87
scComObjectLineArray2D..............................................................................................................................................86
scComObjectLineArray3D..............................................................................................................................................87
scComObjectLineArrays2D............................................................................................................................................87
scComObjectLineArrays3D............................................................................................................................................87
scComObjectLineBox3D................................................................................................................................................87
scComObjectOpticModule2D.........................................................................................................................................87
scComObjectPixelArray2D.............................................................................................................................................86
scComObjectPixelArray3D.............................................................................................................................................87
scComObjectPixelArrays2D...........................................................................................................................................87
scComObjectPointCloud2D...........................................................................................................................................86
scComObjectPointCloud3D...........................................................................................................................................87
scComObjectPolyLine2D...............................................................................................................................................86
scComObjectPolyLine3D...............................................................................................................................................87
scComObjectPolyLines2D.............................................................................................................................................87
scComObjectPolyLines3D.............................................................................................................................................87
scComObjectRectangle2D.............................................................................................................................................86
scComObjectScannerPixelArray2D...............................................................................................................................86
scComObjectSerialNumber2D.......................................................................................................................................87
scComObjectSingleLine2D............................................................................................................................................86
scComObjectSpiral2D....................................................................................................................................................86
scComObjectStandardDevice........................................................................................................................................87
scComObjectTriaBox.....................................................................................................................................................87
scComObjectTriaCone...................................................................................................................................................87
scComObjectTriaCylinder..............................................................................................................................................87
scComObjectTriaMesh3D..............................................................................................................................................87
scComObjectTriangle2D................................................................................................................................................86
scComObjectTriaSolid...................................................................................................................................................87
scComObjectTriaSphere................................................................................................................................................87
scComObjectView..........................................................................................................................................................87
scComObjectView2D.....................................................................................................................................................87
scComObjectView3D.....................................................................................................................................................87
scComObjectWinText2D................................................................................................................................................87
scComObjectWinTextChars2D......................................................................................................................................87
ScComPixelConvertMethodConstants...........................................................................................................................27
scComPixelConvertMethodGrayScale...........................................................................................................................27
scComPixelFormatBit.....................................................................................................................................................69
scComPixelFormatUChar........................................................................................................................................68, 69
scComPolyLines2DSortModeClosest..........................................................................................................................112
137
scComPolyLines2DSortModeClosestMergeIfConnected.............................................................................................112
scComTrailRedo..........................................................................................................................................................125
scComTrailUndo..........................................................................................................................................................125
scComView2DCtrlHideView2D....................................................................................................................................128
scComView2DCtrlShowBigSymbols............................................................................................................................128
scComView2DCtrlShowCameraToolbar......................................................................................................................127
scComView2DCtrlShowContextMenu..........................................................................................................................127
scComView2DCtrlShowContextMenuEditItem............................................................................................................128
scComView2DCtrlShowContextMenuPolyline.............................................................................................................128
scComView2DCtrlShowCoordinates............................................................................................................................127
scComView2DCtrlShowCtrlHelp..................................................................................................................................127
scComView2DCtrlShowEntityList................................................................................................................................128
scComView2DCtrlShowPropSheet..............................................................................................................................127
scComView2DCtrlShowScaleBar................................................................................................................................127
scComView2DCtrlShowStatusBar...............................................................................................................................127
scComView2DCtrlShowToolsToolbar..........................................................................................................................127
scComView2DCtrlShowViewLevelToolbar..................................................................................................................127
scComView2DCtrlShowWorkingArea..........................................................................................................................127
ScControl.....................................................................................................................................................................111
ScControlAdIo..............................................................................................................................................................121
ScControlMotion...........................................................................................................................................................118
ScConvertToPolyLines()..............................................................................................................................................111
ScConvertToUnit().......................................................................................................................................................127
ScCopy()........................................................................................................................................................................88
ScCopyConstruct().........................................................................................................................................................90
ScCorrectOrientation().................................................................................................................................................112
ScCreateObject().........................................................................................................................................................125
ScDataMatrixExEncodation...........................................................................................................................................60
ScDataMatrixExSymbolMode..................................................................................................................................59, 60
ScDataMatrixExSymbolSize..........................................................................................................................................59
ScDateTimeLocale.........................................................................................................................................................66
ScDebug()....................................................................................................................................................................123
ScDefaultSettingsFileName().......................................................................................................................................125
ScDelProperty()..............................................................................................................................................................89
ScDeltaAngle().............................................................................................................................................................100
ScDimensionLimitFlags()...............................................................................................................................................96
ScDoHelp()...................................................................................................................................................................128
ScEdgeRadius()...........................................................................................................................................................101
ScEdgeSegmentCount()..............................................................................................................................................101
ScEditGroup2D..............................................................................................................................................................86
ScEditGroup3D..............................................................................................................................................................87
ScElement2D.................................................................................................................................................................86
ScElement3D.........................................................................................................................................................87, 116
ScEllipse2D........................................................................................................................................................18, 86, 99
ScEnableTrail()............................................................................................................................................................125
ScEndSequence()................................................................................................................................................124, 125
ScEntities2D.......................................................................................................................................................9, 87, 107
ScEntities3D...........................................................................................................................................................87, 118
ScEntity....................................................................................................................................................86, 88, 106, 117
ScEntity2D...............................................................................................................................................................86, 91
ScEntity2DContainer..............................................................................................................................................86, 104
ScEntity3D.............................................................................................................................................................87, 115
ScEntity3DContainer....................................................................................................................................................117
ScEvent..................................................................................................................................................87, 111, 112, 126
ScExit().........................................................................................................................................................................123
ScExport()......................................................................................................................................................................83
ScFileType.....................................................................................................................................................................80
ScFlipLines()................................................................................................................................................................112
ScFlipLinesRev()..........................................................................................................................................................112
ScFormat........................................................................................................................................................................63
ScFormatString..............................................................................................................................................................56
ScGenerate()..............................................................................................................................................27, 68, 99, 101
ScGenerate2()........................................................................................................................................................99, 100
ScGenerate3()..............................................................................................................................................................101
ScGenerateResourceOrgName().................................................................................................................................129
ScGenerationMode()....................................................................................................................................................100
ScGetArrayCount().........................................................................................................................................................94
ScGetArrayStep()...........................................................................................................................................................93
ScGetAt().................................................................................................................................................................26, 68
138
ScGetAvailableExportFileType()....................................................................................................................................80
ScGetAvailableExportFileTypeInfo()..............................................................................................................................80
ScGetAvailableImportFileType()....................................................................................................................................80
ScGetAvailableImportFileTypeInfo()..............................................................................................................................80
ScGetAxisMode(9........................................................................................................................................................121
ScGetAxisParam()...............................................................................................................................................118, 121
ScGetAxisPosition().............................................................................................................................................119, 120
ScGetAxisSpeed()........................................................................................................................................................119
ScGetConfigString().....................................................................................................................................................126
ScGetControlFlags()....................................................................................................................................................112
ScGetCount()...............................................................................................................................................106, 107, 117
ScGetDimensionLimit()..................................................................................................................................................96
ScGetDisplayFlags()....................................................................................................................................................128
ScGetDongleNumber().................................................................................................................................................124
ScGetDongleUserID()..................................................................................................................................................124
ScGetDoubleValue()............................................................................................................................................114, 128
ScGetEntity(...................................................................................................................................................................16
ScGetEntity()........................................................................................................................................................104, 117
ScGetEntityByIndex().............................................................................................................................................13, 106
ScGetEntityByName()....................................................................................................................................14, 106, 107
ScGetEventType()........................................................................................................................................................113
ScGetFirstPoint()............................................................................................................................................................94
ScGetGenerationPoint()...............................................................................................................................................100
ScGetGenerationPointValid().......................................................................................................................................100
ScGetHardwareIOInfo()...............................................................................................................................................127
ScGetIndex()..........................................................................................................................................................13, 106
ScGetInverseMatrix().............................................................................................................................................93, 116
ScGetIOMask()....................................................................................................................................................113, 114
ScGetIOValue()....................................................................................................................................................113, 114
ScGetItemHeadId()........................................................................................................................................................97
ScGetItemUsed()...................................................................................................................................................97, 116
ScGetKernelUnit()........................................................................................................................................................124
ScGetKernelUnitString()...............................................................................................................................................124
ScGetLineArrays()........................................................................................................................................................105
ScGetLinesInProc()........................................................................................................................................................22
ScGetLongValue()........................................................................................................................................................128
ScGetMapIdentifier()....................................................................................................................................................130
ScGetMapTime()..........................................................................................................................................................129
ScGetMarkFlags()..........................................................................................................................................................91
ScGetMessage()..........................................................................................................................................................115
ScGetMiddlePoint()......................................................................................................................................................101
ScGetMotionControl()..................................................................................................................................................127
ScGetMS()...................................................................................................................................................................113
ScGetMultiHeadTool()..................................................................................................................................................108
ScGetNameCount()................................................................................................................................................14, 106
ScGetNext()...................................................................................................................................................11, 107, 118
ScGetNumAvailableExportFileTypes()...........................................................................................................................80
ScGetNumAvailableImportFileTypes()...........................................................................................................................80
ScGetNumEntities().............................................................................................................................................104, 117
ScGetOpenPolyLinesCount().......................................................................................................................................112
ScGetOrderFlags().........................................................................................................................................................90
ScGetParent()................................................................................................................................................................90
ScGetPixelArrays().......................................................................................................................................................105
ScGetPoint().................................................................................................................................................................101
ScGetPointsInProc()................................................................................................................................19, 98, 102, 103
ScGetPolyLines().........................................................................................................................................................104
ScGetPropertyInfo().......................................................................................................................................................89
ScGetPropertyVariant()..................................................................................................................................................89
ScGetRadius()..............................................................................................................................................................100
ScGetResourceFileName()..........................................................................................................................................126
ScGetResourceManager()...........................................................................................................................................126
ScGetRotaryAngle().....................................................................................................................................................109
ScGetRotaryAxis().......................................................................................................................................................109
ScGetRotaryMode().....................................................................................................................................................109
ScGetSecondaryHeadOffset().....................................................................................................................................108
ScGetShiftIdentifier()....................................................................................................................................................129
ScGetShiftStartTime()..................................................................................................................................................129
ScGetTeachReferenceActive()....................................................................................................................................108
ScGetTeachReferencePoint()......................................................................................................................................108
139
ScGetTopLevelCluster().................................................................................................................................................91
ScGetTrailInfoString()..................................................................................................................................................125
ScGo()..................................................................................................................................................................119, 120
ScGroup().............................................................................................................................................................107, 118
ScGroup2D........................................................................................................................................................9, 87, 106
ScGroup3D............................................................................................................................................................87, 117
ScHasExportResolution()...............................................................................................................................................83
ScHasExportStyle()........................................................................................................................................................82
ScHasImportResolution()...............................................................................................................................................83
ScHasImportStyle()........................................................................................................................................................82
ScHatch..................................................................................................................................................................86, 104
ScHatch2D.....................................................................................................................................................................18
ScHatchID()..................................................................................................................................................................104
ScHeadId()...............................................................................................................................................................90, 91
ScHelpFilePath()..........................................................................................................................................................128
ScHelpFlag()................................................................................................................................................................128
ScHorzPos.....................................................................................................................................................................76
ScHorzPos()...................................................................................................................................................................92
ScHorzSize....................................................................................................................................................................76
ScHorzSize()............................................................................................................................................................92, 93
ScImport()......................................................................................................................................................................83
ScInit()..........................................................................................................................................................................130
ScIntensity......................................................................................................................................................................68
ScInvert..........................................................................................................................................................................69
ScIsDirty()......................................................................................................................................................................87
ScIsMoving()................................................................................................................................................................119
ScIsTypeOf()..................................................................................................................................................................86
ScItemCount..................................................................................................................................................................19
ScItemCount()........................................................................................................................................................97, 116
ScItemSelectCount........................................................................................................................................................19
ScItemSelectCount()..............................................................................................................................................97, 116
ScItemUsedCount..........................................................................................................................................................19
ScItemUsedCount()................................................................................................................................................97, 116
ScIterationEnd().............................................................................................................................................11, 107, 118
ScIterationStart()............................................................................................................................................11, 107, 117
ScJobRoot................................................................................................................................................................87, 90
ScKernel()......................................................................................................................................................................86
ScLayer....................................................................................................................................................................16, 86
ScLayerFile2D................................................................................................................................................................80
ScLayerSolid..................................................................................................................................................................87
ScLineArray....................................................................................................................................................................18
ScLineArray2D.........................................................................................................................................18, 86, 102, 103
ScLineArray3D...............................................................................................................................................................87
ScLineArrays2D...........................................................................................................................................9, 16, 87, 105
ScLineArrays3D.............................................................................................................................................................87
ScLineBox3D.................................................................................................................................................................87
ScLoadEntity()................................................................................................................................................................89
ScMarkAble()...........................................................................................................................................................89, 90
ScMarkBeatCount()........................................................................................................................................................95
ScMarkLoopCount().......................................................................................................................................................95
ScMarkStartCount().......................................................................................................................................................95
ScMatrix()...............................................................................................................................................................91, 115
ScMirrorOnAxis()............................................................................................................................................................92
ScMirrorOnPlane().........................................................................................................................................................96
ScMirrorOnXAxis().........................................................................................................................................................92
ScMirrorOnYAxis().........................................................................................................................................................92
ScMotion......................................................................................................................................................................127
ScMoveEntity().......................................................................................................................................................13, 106
ScMultiHeadTool..........................................................................................................................................................108
ScName().......................................................................................................................................................................88
ScNextSequence().............................................................................................................................................62, 94, 95
ScNumberMode.......................................................................................................................................................62, 63
ScNumDigits..................................................................................................................................................................64
ScObject.................................................................................................................................................................86, 125
ScObjectId()...................................................................................................................................................................88
ScOffset.........................................................................................................................................................................69
ScOnWork().............................................................................................................................................................88, 90
ScOpenFileRead().........................................................................................................................................................83
ScOpenFileWrite()..........................................................................................................................................................83
140
ScOpticModule...............................................................................................................................................................73
ScOpticSetup().............................................................................................................................................................126
ScOutline().............................................................................................................................................................91, 115
ScOutlineValid().............................................................................................................................................................93
ScPack().........................................................................................................................................97, 104, 106, 116, 117
ScPackLayer()..............................................................................................................................................................105
ScPixelArray...................................................................................................................................................................18
ScPixelArray2D........................................................................................................................................25, 86, 103, 105
ScPixelArray3D..............................................................................................................................................................87
ScPixelArrays2D..................................................................................................................................................9, 16, 87
ScPixelFormat................................................................................................................................................................25
ScPointCloud2D.............................................................................................................................................................86
ScPointCloud3D.............................................................................................................................................................87
ScPolyLine.....................................................................................................................................................................18
ScPolyLine2D.............................................................................................................................................18, 86, 97, 103
ScPolyLine3D.................................................................................................................................................................87
ScPolyLines2D.....................................................................................................................................9, 16, 87, 104, 111
ScPolyLines3D...............................................................................................................................................................87
ScPopLockMessage()..................................................................................................................................................126
ScPreviousSequence()..................................................................................................................................................95
ScPushLockMessage()................................................................................................................................................125
ScRadius........................................................................................................................................................................54
ScReadAnalog()...................................................................................................................................................121, 122
ScRectangle2D................................................................................................................................................18, 86, 101
ScRedo()......................................................................................................................................................................125
ScReinitKernel()...........................................................................................................................................................130
ScRemove()...................................................................................................................................................10, 107, 118
ScReset().......................................................................................................................................................62, 105, 106
ScResetCount()............................................................................................................................................................106
ScResetSequence().......................................................................................................................................................95
ScResolution..................................................................................................................................................................83
ScResourceEditMode()................................................................................................................................................126
ScResourceLanguage()...............................................................................................................................................126
ScResourceManager...................................................................................................................................................126
ScRotate........................................................................................................................................................................76
ScRotate()..............................................................................................................................................................92, 115
ScRunMacro()................................................................................................................................................................89
ScSaveEntity()...............................................................................................................................................................89
ScScale..........................................................................................................................................................................77
ScScale()................................................................................................................................................................91, 115
ScScaleZ().....................................................................................................................................................................96
ScScannerPixelArray2D...........................................................................................................................................25, 86
ScSegmentCount().........................................................................................................................................................99
ScSelected().............................................................................................................................................................88, 90
ScSendString().............................................................................................................................................................120
ScSequenceCount().....................................................................................................................................................105
ScSerialNumber2D..................................................................................................................................................16, 87
ScSetArrayCount().........................................................................................................................................................94
ScSetArrayStep()...........................................................................................................................................................93
ScSetAt()..................................................................................................................................................................26, 68
ScSetAxisAngle().........................................................................................................................................................120
ScSetAxisAngleRelative()............................................................................................................................................120
ScSetAxisPosition()......................................................................................................................................................119
ScSetAxisPosRelative()...............................................................................................................................................119
ScSetAxisSpeed()........................................................................................................................................................119
ScSetAxisValue().........................................................................................................................................................120
ScSetAxisValueRelative()............................................................................................................................................121
ScSetConfigString().....................................................................................................................................................126
ScSetControlFlags().....................................................................................................................................................111
ScSetDefaultPropertyVariant().....................................................................................................................................127
ScSetDimensionLimit()...................................................................................................................................................96
ScSetDirty()....................................................................................................................................................................88
ScSetDisplayFlags().....................................................................................................................................................127
ScSetDoubleValue().............................................................................................................................................114, 128
ScSetEventType()................................................................................................................................................111, 113
ScSetField......................................................................................................................................................................73
ScSetGenerationPoint()...............................................................................................................................................100
ScSetHardwareIOInfo()................................................................................................................................................126
ScSetIOMask().....................................................................................................................................................113, 114
141
ScSetIOMask2()...........................................................................................................................................................114
ScSetIOValue()....................................................................................................................................................113, 114
ScSetItemHeadId().........................................................................................................................................................97
ScSetItemUsed()....................................................................................................................................................97, 116
ScSetKernelUnit()................................................................................................................................................115, 123
ScSetLinesInProc()........................................................................................................................................................22
ScSetLongValue()........................................................................................................................................................128
ScSetMapIdentifier()....................................................................................................................................................129
ScSetMapTime()..........................................................................................................................................................129
ScSetMarkFlags()..........................................................................................................................................................91
ScSetMessage()...........................................................................................................................................................114
ScSetModuleName()....................................................................................................................................................126
ScSetMotionControl()...................................................................................................................................................127
ScSetMS()............................................................................................................................................................113, 114
ScSetMultiHeadTool()..................................................................................................................................................108
ScSetOrderFlags().........................................................................................................................................................90
ScSetOutline..................................................................................................................................................................76
ScSetOutline()................................................................................................................................................................93
ScSetPoint().................................................................................................................................................................101
ScSetPointsInProc()...........................................................................................................................19, 98, 99, 102, 103
ScSetPropertyVariant()..................................................................................................................................................89
ScSetQuietZone()..........................................................................................................................................................58
ScSetRotaryAngle().....................................................................................................................................................109
ScSetRotaryAxis()........................................................................................................................................................109
ScSetRotaryDiameter()................................................................................................................................................109
ScSetRotaryMarkLoopCount().............................................................................................................................109, 110
ScSetRotaryMode()......................................................................................................................................................109
ScSetRotarySpeed()....................................................................................................................................................109
ScSetSecondaryHeadOffset()......................................................................................................................................108
ScSetShiftIdentifier()....................................................................................................................................................129
ScSetShiftStartTime()..................................................................................................................................................129
ScSetStepRepeatMode().............................................................................................................................................110
ScSetStepRepeatOpFlags().........................................................................................................................................110
ScSetStepRepeatSpeed()............................................................................................................................................110
ScSetStepRepeatStart()...............................................................................................................................................110
ScSetStepRepeatStartY()............................................................................................................................................110
ScSetStepRepeatStep()...............................................................................................................................................110
ScSetStepRepeatStepcountX()....................................................................................................................................111
ScSetStepRepeatStepY()............................................................................................................................................111
ScSetTeachReferenceActive().....................................................................................................................................108
ScSetTeachReferencePoint()......................................................................................................................................108
ScSetupDefaults()........................................................................................................................................................125
ScShowLeadingZeros....................................................................................................................................................64
ScShowModules()........................................................................................................................................................123
ScShowObjects().........................................................................................................................................................123
ScSingleLine2D......................................................................................................................................................86, 102
ScSinglePlaneModeEnd()............................................................................................................................................130
ScSinglePlaneModeInit()..............................................................................................................................................130
ScSinglePlaneModeSlice()...........................................................................................................................................130
ScSlantX()......................................................................................................................................................................93
ScSlantY()......................................................................................................................................................................93
ScSliceAll()...................................................................................................................................................................130
ScSliceFromFile().........................................................................................................................................................130
ScSort()........................................................................................................................................................................112
ScSpiral2D.....................................................................................................................................................................86
ScStartAngle..................................................................................................................................................................54
ScStartAngle()..............................................................................................................................................................100
ScStartSequence()...............................................................................................................................................124, 125
ScStop().......................................................................................................................................................................120
ScStyle...........................................................................................................................................................................81
ScTextBaseLine.............................................................................................................................................................56
ScTransform()........................................................................................................................................................93, 115
ScTranslate....................................................................................................................................................................76
ScTranslate()..........................................................................................................................................................91, 115
ScTranslateZ()...............................................................................................................................................................96
ScTriaBox3D..................................................................................................................................................................87
ScTriaCone3D................................................................................................................................................................87
ScTriaCylinder3D...........................................................................................................................................................87
ScTriaMesh3D...............................................................................................................................................................87
142
ScTriangle2D...........................................................................................................................................................18, 86
ScTriaSolid3D................................................................................................................................................................87
ScTriaSpere3D...............................................................................................................................................................87
ScTypeId()......................................................................................................................................................................87
ScUndo()......................................................................................................................................................................125
ScUndoLevel().............................................................................................................................................................125
ScUnGroup()........................................................................................................................................................107, 118
ScUnifyMatrix.................................................................................................................................................................78
ScUnifyMatrix().......................................................................................................................................................93, 116
ScUpdate()...................................................................................................................................73, 88, 91, 93, 115, 125
ScUpdateAxisPosition().......................................................................................................................................119, 120
ScUpdateProperties()...........................................................................................................................................7, 73, 89
ScUpdateSequence().....................................................................................................................................................95
ScUsed()........................................................................................................................................................................88
ScUserChiffre()............................................................................................................................................................129
ScVarEntityData()..........................................................................................................................................................96
ScVerifyPropertyVariant()..............................................................................................................................................90
ScVertPos......................................................................................................................................................................76
ScVertSize.....................................................................................................................................................................76
ScWeight........................................................................................................................................................................53
ScWinText2D...........................................................................................................................................................16, 87
ScWinTextChars2D..............................................................................................................................................9, 62, 87
ScZOffset()...............................................................................................................................................................94, 96
ScZScaleAbs()...............................................................................................................................................................96
serial number.....................................................................................................................................................62, 94, 95
SerialNumber Formats,SerialNumberProperties, Working With Entities.......................................................................63
SerialNumberProperties, Property Assignment, Working With Entities.........................................................................62
SetIOValue()................................................................................................................................................................113
Size and Spacing,TextProperties, Working With Entities...............................................................................................46
struct sc_com_point_3d_tag..................................................................................................................................98, 103
struct sc_com_point_tag........................................................................................................................................98, 102
Style,TextProperties, Working With Entities...................................................................................................................53
Styles,Import/Export, Working with Entities...................................................................................................................81
sub entities.....................................................................................................................................................................16
T
TextProperties, Property Assignment, Working With Entities........................................................................................44
time................................................................................................................................................................................94
timer event...................................................................................................................................................................113
timer events..................................................................................................................................................................113
transformation................................................................................................................................................................73
transformation matrix.....................................................................................................................................................73
trigger event.................................................................................................................................................................113
V
VariantProperties, Property Assignment, Working With Entities....................................................................................29
143