Surface

The Surface object is used to control aspects of the design that would be controlled from the surfaces window, within Maxsurf. The objects within the Surface object have control over all the same features as appear in that window. The object hierarchy shown in Figure 6 denotes the objects available for the Surface Object

 

In addition to the Surface Object, there are also the Surfaces and SurfaceList Objects within the Application Object Hierarchy. The Item method of the Surfaces or SurfaceList objects is used to reference a particular surface, which can then be used to access the Surface object.

Figure 6 Surface Object Hierarchy

Accessing Surfaces

The Surface object cannot be accessed directly through the interface, and must be accessed through either the Surfaces or SurfaceList objects to define which particular surface is being accessed.

This can be done either with:

    msApp.Design.Surfaces.Item(i).property

or

    msApp.Design.Surfaces(i).property

 

The code to access these objects and methods is:

    msApp.Design.Surfaces(i).Move 5, 2, 1

    i = msApp.Design.Surfaces(i).Color

 

See Also:

     Tutorial Part 1: A Basic Maxsurf Script on page 28

     Tutorial Part 2: Moving the Surface Control Points on page 29

     Surface Object on page 44