シーン レイヤのオフセットを設定

'シーン レイヤのオフセットを設定
Sub OffsetExpressionString()

    Dim pSxDocument As ISxDocument
    Set pSxDocument = ThisDocument
    
    Dim pScene As IScene
    Set pScene = pSxDocument.Scene
    
    Dim pLayer As ILayer
    Set pLayer = pScene.layer(0)
    
    Dim p3DProperties As I3DProperties3
    Set p3DProperties = Get3DPropsFromLayer(pLayer)
    
    p3DProperties.ZFactor = 50
    p3DProperties.OffsetExpressionString = "200"
    p3DProperties.Apply3DProperties pLayer                 '適用
    
    pSxDocument.Scene.SceneGraph.RefreshViewers                  'ビューの再描画
    pSxDocument.Scene.SceneGraph.ActiveViewer.Redraw True
    pSxDocument.Scene.SceneGraph.Invalidate pLayer, True, True
    
End Sub