The Triangulate method creates triangles from selected points.
Syntax
object.Triangulate( CreateShapeType, CreateConvexOnAnotherLayer, LayerName, FillFGColor, FillBGColor, FillTransparent, FillPattern, FillPatternScale, FillPatternCoverMode, LineColor, LineStyle, LineWidth, IDMethod, IndexStartVal, CreatePID, CreateSID, CreateAttrib1, CreateAttrib2, PIDPrefix, SIDPrefix, Attrib1Prefix, Attrib2Prefix, PIDSuffix, SIDSuffix, Attrib1Suffix, Attrib2Suffix, KeepOrgObj )
Parameter |
Type |
Description |
CreateShapeType |
optional; create curves or areas |
|
CreateShapesOnAnotherLayer |
Boolean |
optional; true to create the boundaries on another layer |
LayerName |
String |
optional; if CreateShapesOnAnotherLayer is true, layer name |
FillFGColor |
optional; foreground fill color |
|
FillBGColor |
optional; background fill color |
|
FillTransparent |
Boolean |
optional; true to make background fill transparent, FillPattern must be stock or vector |
FillPattern |
String |
optional; fill pattern name |
FillPatternScale |
Double |
optional; vector pattern scale |
FillPatternCoverMode |
optional; picture pattern: cover or tile |
|
LineColor |
optional; line color |
|
LineStyle |
String |
optional; line style name |
LineWidth |
Double |
optional; line width in page units |
IDMethod |
optional; object ID method |
|
IndexStartVal |
Integer |
optional; index start value when the IDMethod is mvIDCreateionPrefixIndexSuffix |
CreatePID |
Boolean |
optional; true to create primary IDs when the IDMethod is mvIDCreateionPrefixIndexSuffix |
CreateSID |
Boolean |
optional; true to create secondary IDs when the IDMethod is mvIDCreateionPrefixIndexSuffix |
CreateAttrib1 |
Boolean |
optional; true to create attribute 1 IDs when the IDMethod is mvIDCreateionPrefixIndexSuffix |
CreateAttrib2 |
Boolean |
optional; true to create attribute 2 IDs when the IDMethod is mvIDCreateionPrefixIndexSuffix |
PIDPrefix |
String |
optional; indexed primary ID prefix when CreatePID is true |
SIDPrefix |
String |
optional; indexed secondary ID prefix when CreatePID is true |
Attrib1Prefix |
String |
optional; indexed attribute 1 ID prefix when CreatePID is true |
Attrib2Prefix |
String |
optional; indexed attribute 2 ID prefix when CreatePID is true |
PIDSuffix |
String |
optional; indexed primary ID suffix when CreatePID is true |
SIDSuffix |
String |
optional; indexed secondary ID suffix when CreatePID is true |
Attrib1Suffix |
String |
optional; indexed attribute 1 ID suffix when CreatePID is true |
Attrib2Suffix |
String |
optional; indexed attribute 2 ID suffix when CreatePID is true |
KeepOrgObj |
Boolean |
optional; true to keep original objects |
Remarks
Use the enumeration [mvColorRed], RGB value [RGB(255,0,0)], or number [255] to set a color.
Example
'Triangulate
'Create a few points on the layer and assign them to the variables "Point1", "Point2", etc.
Set Point1 = Plot.Layers.ActiveLayer.Shapes.AddPoint(3.5, 1)
Set Point2 = Plot.Layers.ActiveLayer.Shapes.AddPoint(3.75, 1.5)
Set Point3 = Plot.Layers.ActiveLayer.Shapes.AddPoint(4, 1.25)
Set Point4 = Plot.Layers.ActiveLayer.Shapes.AddPoint(5,1.75)
Set Point5 = Plot.Layers.ActiveLayer.Shapes.AddPoint(5.5, .5)
'Select the points on the layer
Plot.Layers.ActiveLayer.Shapes.SelectByType(Point:=True)
'Create blue triangles from the selected points and give them PIDs: "Triangle 1", "Triangle 2", etc
Selection.Triangulate(FillFGColor:=mvColorBlue, IDMethod:=mvIDCreationPrefixIndexSuffix, CreatePID:=True,_
PIDPrefix:="Triangle ", IndexStartVal:=1)
Used by: Selection collection