The CreateConvexHull method creates a new area from selected areas, curves, or points.
Syntax
object.CreateConvexHull( ConvexHullForGroup, 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 |
ConvexHullForGroup |
Boolean |
optional; true to create a convex hull for a group of selected objects, false to create a convex hull around each object |
CreateConvexOnAnotherLayer |
Boolean |
optional; true to create the convex hull on another layer |
LayerName |
String |
optional; if CreateConvexOnAnotherLayer 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
'CreateConvexHull (two independent examples using SelectAll first)
'Select all the boundaries in the active layer
Plot.Layers.ActiveLayer.Shapes.SelectAll
'Create a convex hull with a blue fill out of the currently selected objects on a new layer and keep the original objects untouched
Selection.CreateConvexHull(ConvexHullForGroup:=True, CreateConvexOnAnotherLayer:=True, _
FillFGColor:=mvColorBlue, KeepOrgObj:=True)
'Select all the boundaries in the active layer
Plot.Layers.ActiveLayer.Shapes.SelectAll
'Create a convex hull with a red line for each selected object and create PIDs matching the original object PID
Selection.CreateConvexHull(ConvexHullForGroup:=False, LineColor:=mvColorRed,IDMethod:=mvIDCreationSourceIDs)
Used by: Selection collection