Unable to remove Center Marks when Placing a Default Border with iLogic

Unable to remove Center Marks when Placing a Default Border with iLogic

workexperience5BMQQ
Explorer Explorer
346 Views
2 Replies
Message 1 of 3

Unable to remove Center Marks when Placing a Default Border with iLogic

workexperience5BMQQ
Explorer
Explorer

Hi,

I made a Rule which makes a new sheet, adds Titleblock and Border. I'm using the AddDefaultBorder to place my border and then I give some values for customising its appearance (e.g. Zone Count).

 

However, I'm unable to remove the Center Marks which are part of the default border. Here is the main portion of the code (The bold parts are the code that doesn't seem to work):

Dim oSheetSize As DrawingSheetSizeEnum 
oSheetSize = oActiveSheet.Size
Dim oOrientation As PageOrientationTypeEnum
oOrientation = oActiveSheet.Orientation
Dim sSheetName As String
sSheetName = "Profile Sheet"
Dim oProfileTitleBlockDef As TitleBlockDefinition
oProfileTitleblockDef = oDrawDoc.TitleBlockDefinitions.Item("TitleBlock")

Dim oNewSheet As Sheet
oNewSheet = oDrawDoc.Sheets.Add(oSheetSize, oOrientation, sSheetName)

'Add Titleblock and Border
oNewSheet.AddTitleBlock(oProfileTitleBlockDef)

Dim HorizontalZoneCount As Long
HorizontalZoneCount = 6
Dim HorizontalZoneLabelMode As BorderLabelModeEnum
HorizontalZoneLabelMode = kBorderLabelModeNone

Dim VerticalZoneCount As Long
VerticalZoneCount = 4
Dim VerticalZoneLabelMode As BorderLabelModeEnum
VerticalZoneLabelMode = kBorderLabelModeNone

Dim Centermarks As Boolean
Centermarks = False

oNewSheet.AddDefaultBorder(HorizontalZoneCount, HorizontalZoneLabelMode, _
VerticalZoneCount, VerticalZoneLabelMode, Centermarks) 'oNewSheet.AddDefaultBorder(HorizontalZoneCount, HorizontalZoneLabelMode, _ ' VerticalZoneCount, VerticalZoneLabelMode, _ ' LabelFromBottomRight, DelimitByLines, _ ' Centermarks, TopMargin, BottomMargin, _ ' LeftMargin, RightMargin, TextStyle, _ ' TextLayer, LineLayer)

 Thanks in Advance!

0 Likes
Accepted solutions (1)
347 Views
2 Replies
Replies (2)
Message 2 of 3

theo.bot
Collaborator
Collaborator
Accepted solution

Hi, 

 

You're almost there. If you want to include centermarks boolean, it needs to be placed in the right location. It's the 7th option. you need to provide the other options or leave them blank. Just use the comma until you have the right location.

theobot_0-1651204584188.png

This will work:

oNewSheet.AddDefaultBorder(HorizontalZoneCount, HorizontalZoneLabelMode, _
                             VerticalZoneCount, VerticalZoneLabelMode,,,Centermarks)

 

0 Likes
Message 3 of 3

workexperience5BMQQ
Explorer
Explorer

Thank You very much!