在 Revit API 中静默保存而不提示
我正在使用 Revit 2011 API,当我对现有族文件执行 Document.Save()
时,它会提示我使用“另存为”对话框来指定文件名。如何在不提示用户的情况下保存它?
I'm using the Revit 2011 API and when I do Document.Save()
on an existing family file it prompts me with the "Save As" dialog to specify a file name. How can I have it save without prompting the user?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
事实证明,家庭档案是只读的。默认情况下,Revit 会静默保存文件,但由于某种原因,当文件为只读时,它不会引发错误,而是提示输入保存位置。如果我尝试实际保存它们,我会发现只读部分,但我认为 Revit 在
Document.Save
上抛出错误比提示新保存更有意义地点。It turns out that the family files were read-only. By default Revit will save files silently but for some reason when they are read-only it doesn't throw an error but instead prompts for a save location. I would have figured out the read-only part had I tried to actually save them but I think it would have made more sense for the Revit to throw an error on
Document.Save
than prompt for a new save location.