我想知道如何在我的应用程序中确定用户是在使用Revit查看器还是在运行实际的Revit。我正在使用c#
发布于 2019-01-30 04:24:38
这对我来说很有效:
string[] args = Environment.GetCommandLineArgs();
if (args.Contains("/viewer"))
...这就是Revit Viewer快捷方式的工作方式,也是我最常通过VS启动Revit以保持许可免费的方式。
发布于 2017-05-30 18:15:13
一种可能的方法是检查Revit主窗口标题的内容,并确定它是否包含“viewer”字样:
http://thebuildingcoder.typepad.com/blog/2013/01/determine-revit-demo-mode-revisited.html
查看The Building Coder samples中的CmdDemoCheck外部命令。
您还可以尝试修改当前文档;如果可能,它肯定不在查看器模式下:
http://thebuildingcoder.typepad.com/blog/2012/03/determine-revit-demo-mode.html
第三,也可能是最好的建议:检查序列号。如果Revit在演示模式下运行,则序列号为000-00000000:
http://thebuildingcoder.typepad.com/blog/2013/01/determine-revit-demo-mode-and-serial-number.html
https://stackoverflow.com/questions/44246957
复制相似问题