DivideArea

 

The DivideArea method divides areas with a curve.

 

Syntax

object.DivideArea( 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

MVColor

optional; foreground fill color

FillBGColor

MVColor

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

MVFillCoverMode

optional; picture pattern: cover or tile

LineColor

MVColor

optional; line color

LineStyle

String

optional; line style name

LineWidth

Double

optional; line width in page units

IDMethod

MVIDCreationMethod

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

    'DivideArea

    'Create a polyline to use in dividing the area (can also select existing polylines) and assign it to the variable "Polyline"

    Dim pts(3) As Double

    pts(0) = 3 : pts(1) = 1 : pts(2) = 5 : pts(3) = 1

    Set Polyline = Plot.Layers.ActiveLayer.Shapes.AddPolyLine(bSpline:=False, Vertices:=pts)

 

    'Select the line and the object with PID "16073"

    Polyline.Select

    Plot.Layers.ActiveLayer.Shapes.SelectByPID(PIDName:="16073")

 

    'Create new blue hatched areas by dividing the area in the selection with the curve

    Selection.DivideArea(FillFGColor:=mvColorBlue, FillBGColor:=mvColorWhite, FillPattern:="Crosshatch")

 

Used by: Selection collection