Grids Object

The Sections, Buttocks, Diagonals and Waterlines are specified in Maxsurf using a grid. The Grids object is used to create, edit and remove these grid lines. The Properties and Methods available are shown in the following tables:

 

Property

Type

Description

LineCount

msGridType

Gets the number of Lines of a particular type in the design

SectionSplit

Long

Set/Get the index of the split section line.

 

Method

Type

Description

AddGridLine

gridType As msGridType, label As String, pos As Double, angle As Double

Add a Grid line to the design

DeleteAllLines

msGridType

Delete all of a type of Grid line

GetGridLine

gridType As msGridType, Index As Long, pLabel As String, pPos As Double, pAngle As Double

Reads in the type of Grid line and the index, returns the Label, Position and Angle (where applicable) of that grid line

SetGridLine

gridType As msGridType, Index As Long, label As String, pos As Double, angle As Double

Sets a grid line of type msGridType and a given index to a new Label, position and angle (where applicable)

 

See Also:

Grids on page 21

Tutorial Part 3: Creating a Grid on page 30.

Grids Example

To count the number of section lines currently in the design, use the LineCount property.

    i = msDesign.Grids.LineCount(msGTSections)

 

To add another Sectionline, with a title of “Section 6” (If the previous number of sections was 5) and a longitudinal position of 4m,

 

msDesign.Grids.AddGridLine msGTSections, "Section " & i + 1,

                                                          4, 0