Class ThreeDFormat (Excel VBA)

The class ThreeDFormat represents a shape's three-dimensional formatting.

Properties

BevelBottomDepth returns or sets the bottom depth when using the bevel effect on a ThreeDFormat object.

BevelBottomInset returns or sets a value indicating whether the bottom insert bevel should be raised for a ThreeDFormat object.

BevelBottomType returns or sets the bottom bevel type for a ThreeDFormat object.

BevelTopDepth returns or sets the top depth when using the bevel effect on a ThreeDFormat object.

BevelTopInset returns or sets a value indicating whether the top insert bevel should be raised for a ThreeDFormat object.

BevelTopType returns or sets the top bevel type for a ThreeDFormat object.

ContourColor returns the contour color for a ThreeDFormat object.

ContourWidth returns or sets the contour width for a ThreeDFormat object.

Depth returns or sets a Single value that represents the depth of the shape's extrusion.

Set myDocument = Worksheets(1) 
Set myShape = myDocument.Shapes.AddShape(msoShapeOval, _ 
 90, 90, 90, 40) 
With myShape.ThreeD 
 .Visible = True 
 .Depth = 50 
 ' RGB value for purple 
 .ExtrusionColor.RGB = RGB(255, 100, 255) 
End With

ExtrusionColor returns a ColorFormat object that represents the color of the shape's extrusion.

Set myDocument = Worksheets(1) 
Set myShape = myDocument.Shapes.AddShape(msoShapeOval, _ 
 90, 90, 90, 40) 
With myShape.ThreeD 
 .Visible = True 
 .Depth = 50 
 .ExtrusionColor.RGB = RGB(255, 100, 255) 
 ' RGB value for purple 
End With

ExtrusionColorType returns or sets a value that indicates whether the extrusion color is based on the extruded shape's fill (the front face of the extrusion) and automatically changes when the shape's fill changes, or whether the extrusion color is independent of the shape's fill.

Set myDocument = Worksheets(1) 
With myDocument.Shapes(1).ThreeD 
    If .ExtrusionColorType = msoExtrusionColorAutomatic Then 
        .ExtrusionColor.RGB = RGB(240, 235, 16) 
    End If 
End With

FieldOfView returns or sets the angle at which a ThreeDFormat object can be viewed.

LightAngle returns or sets the angle of the extrusion lights set on a ThreeDFormat object.

Parent returns the parent object for the specified object. Read-only.

Perspective returns or sets an MsoTriState value that determines whether the extrusion appears in perspective.

PresetCamera returns or sets the extrusion preset camera for a ThreeDFormat object.

PresetExtrusionDirection returns the direction that the extrusion's sweep path takes away from the extruded shape (the front face of the extrusion).

Set myDocument = Worksheets(1) 
For Each s In myDocument.Shapes 
 With s.ThreeD 
 If .PresetExtrusionDirection = msoExtrusionTopLeft Then 
 .SetExtrusionDirection msoExtrusionBottomRight 
 End If 
 End With 
Next

PresetLighting returns or sets the extrusion preset lighting for a ThreeDFormat object.

PresetLightingDirection returns or sets the position of the light source relative to the extrusion.

Set myDocument = Worksheets(1) 
With myDocument.Shapes(1).ThreeD 
 .Visible = True 
 .SetExtrusionDirection msoExtrusionTop 
 .PresetLightingDirection = msoLightingLeft 
End With

PresetLightingSoftness returns or sets the intensity of the extrusion lighting.

Set myDocument = Worksheets(1) 
With myDocument.Shapes(1).ThreeD 
 .Visible = True 
 .PresetLightingSoftness = msoLightingBright 
 .PresetLightingDirection = msoLightingLeft 
End With

PresetMaterial returns or sets the extrusion surface material.

Set myDocument = Worksheets(1) 
With myDocument.Shapes(1).ThreeD 
 .Visible = True 
 .PresetMaterial = msoMaterialWireFrame 
End With

PresetThreeDFormat returns the preset extrusion format. Each preset extrusion format contains a set of preset values for the various properties of the extrusion.

Set myDocument = Worksheets(1) 
With myDocument.Shapes(1).ThreeD 
 If .PresetThreeDFormat = msoPresetThreeDFormatMixed Then 
 .SetThreeDFormat msoThreeD12 
 End If 
End With

ProjectText returns or sets the project text state for the specified ThreeDFormat object.

RotationX returns or sets the rotation of the extruded shape around the x-axis in degrees. Can be a value from -90 through 90. A positive value indicates upward rotation; a negative value indicates downward rotation.

Set myDocument = Worksheets(1) 
With myDocument.Shapes 
 With .AddShape(msoShapeOval, 30, 30, 50, 25).ThreeD 
 .Visible = True 
 .RotationX = -30 
 End With 
 With .AddShape(msoShapeOval, 30, 70, 50, 25).ThreeD 
 .Visible = True 
 .RotationX = 0 
 End With 
 With .AddShape(msoShapeOval, 30, 110, 50, 25).ThreeD 
 .Visible = True 
 .RotationX = 30 
 End With 
End With

RotationY returns or sets the rotation of the extruded shape around the y-axis in degrees. Can be a value from -90 through 90. A positive value indicates rotation to the left; a negative value indicates rotation to the right.

Set myDocument = Worksheets(1) 
With myDocument.Shapes 
 With .AddShape(msoShapeOval, 30, 30, 50, 25).ThreeD 
 .Visible = True 
 .RotationY = -30 
 End With 
 With .AddShape(msoShapeOval, 30, 70, 50, 25).ThreeD 
 .Visible = True 
 .RotationY = 0 
 End With 
 With .AddShape(msoShapeOval, 30, 110, 50, 25).ThreeD 
 .Visible = True 
 .RotationY = 30 
 End With 
End With

RotationZ returns or sets the rotation of the extruded shape around the z-axis in degrees. Can be a value from -90 through 90. A positive value indicates upward rotation; a negative value indicates downward rotation.

Visible returns or sets an MsoTriState value that determines whether the object is visible.

Z returns the Z order of the specified ThreeDFormat object.