The DifferenceOfArea method creates new areas that do not contain overlapping portions of the selected areas.
Syntax
object.DifferenceOfArea( CreateShapesOnAnotherLayer, 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 |
CreateShapesOnAnotherLayer |
Boolean |
optional; true to create the new areas 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
'DifferenceOfArea
'Select the area with PID "16055"
Plot.Layers.ActiveLayer.Shapes.SelectByPID(PIDName:="16055")
'Select a neighbor boundary with PID "16079"
Plot.Layers.ActiveLayer.Shapes.SelectByPID(PIDName:="16079")
'Create new areas for the objects that do not overlap and place them on a separate layer with the same PIDs
Selection.DifferenceOfArea(CreateShapesOnAnotherLayer:=True, IDMethod:=mvIDCreationSourceIDs)
Used by: Selection collection