PowerPoint中的Model3D属性未显示在参考列表中

发布于 2025-01-27 13:06:07 字数 856 浏览 2 评论 0原文

我需要创建一个脚本来验证是否将正确的视图应用于3D模型,但是我正在编写的脚本的应用程序无法识别我需要执行此操作的属性Shaperange下的Model3Dformat对象或Model3D属性验证。

应用程序使用的版本的版本确认存在3D模型,因为3D模型在应用程序使用的文件中的幻灯片上,并且Model3D属性出现在“开发者”选项卡中,但似乎只是VBA脚本验证的VBA脚本验证't识别3D模型。

我尝试更新Nuget软件包(Microsoft.office.interop.interop.powerpoint显示的最新版本为15.0.4420.1017,我已安装到应用程序中),并在参考列表中删除和重新添加和重新添加PowerPoint对象库,但似乎都不是改变了任何东西。

这是我要开始工作的脚本:

Try
Dim rcount As Integer
With Application.ActivePresentation.Slides(3).Shapes(3).Model3D
   If .RotationX = 90 And _
            .RotationY = 300 And _
            .RotationZ = 270 Then
                Return True
        Else
            Return False
        End If
End With

Catch ex As Exception
   Return False
End Try

用于显示参考列表<的应用程序浏览器的图像/a>

I need to create a script that validates whether or not the correct view was applied to a 3D model, but the application I am writing the script for does not recognize the Model3DFormat object or the Model3D property under the property ShapeRange that I need to perform this validation.

The version of PowerPoint the application uses acknowledges that 3D models exist, as the 3D models are on the slides in the files used by the application and the Model3D property appears in the Developer tab, but it just seems to be the VBA script validation that doesn't recognize 3D models.

I have tried updating the NuGet packages (latest version showing for Microsoft.Office.Interop.PowerPoint is 15.0.4420.1017, which I have installed to the application) and removing and re-adding the PowerPoint Object library in the references list, but neither seem to have changed anything.

Here is the script I am trying to get working:

Try
Dim rcount As Integer
With Application.ActivePresentation.Slides(3).Shapes(3).Model3D
   If .RotationX = 90 And _
            .RotationY = 300 And _
            .RotationZ = 270 Then
                Return True
        Else
            Return False
        End If
End With

Catch ex As Exception
   Return False
End Try

Image of the Solution Explorer for the application showing the reference list

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文