Visio API - 错误消息 "OSF is not defined"

Visio API - Error message "OSF is not defined"

我们一直在尝试让 Visio API 与基于 the example provided in the documentation 的 Visio Online 图表一起工作。

在 Visio Online 中构建的简单图表(例如两个连接的形状)可以正常工作并且显示良好,我们可以获得形状数据。

但是,在 Visio 2016 客户端中创建的简单图表失败并引发错误 OSF is not defined

Error message : "OSF is not defined" 
stack : "ReferenceError: OSF is not defined 
    at https://appsforoffice.microsoft.com/embedded/1.0/visio-web-embedded.js:2332:17 
    at new Promise (<anonymous>) 
    at OfficeJsRequestExecutor.executeAsync (https://appsforoffice.microsoft.com/embedded/1.0/visio-web-embedded.js:2331:20) \
    at RequestContext.ClientRequestContext.syncPrivate (https://appsforoffice.microsoft.com/embedded/1.0/visio-web-embedded.js:710:36) 
    at https://appsforoffice.microsoft.com/embedded/1.0/visio-web-embedded.js:680:54 at <anonymous>" 

因此 office.js 库中似乎缺少某些内容。

不支持使用客户端创建的绘图吗?

有人 运行 使用新 API 成功嵌入了 Visio(不是旧的 webpart)吗?

GitHub-issue for reference

这是产品团队的回复(也添加到相关 GitHub issue):

The issue has been fixed now. In general, Visio Online APIs support embedding drawings created using Visio Online or Visio 2016. You need to upload the created drawing to SharePoint Online, open it in Visio Online and copy the URL from address bar and use it for initialization through APIs.