【问题标题】:How to obtain a sheet number for a View with the Revit API如何使用 Revit API 获取视图的图纸编号
【发布时间】:2014-09-18 14:33:20
【问题描述】:

我想使用 Revit API 访问“视图视图”的图纸编号。我试图搜索属于视图的参数,但是它没有被智能感知列为参数。我可以在文档或项目中看到它是只读的工作表编号参数。

    foreach (Element elem in collection)
            {

                View view = elem as View;

                if (view.ViewType == ViewType.FloorPlan)
                {
                    using (Transaction transView = new Transaction(doc, "Set Param"))
                    {
                        transView.Start();

                        int testScale = 100;
                        //set the scale of the view
                        view.Scale = testScale;
                        //get the name of the view
                        message += "\nView name: " + view.ViewName;
                        message += "\nScale after set: " + view.Scale;


                        transView.Commit();
                    }
                }

【问题讨论】:

  • 我刚刚下载了一个名为“BipChecker”的好工具,由 Jeremy Tammik 编写,可通过他博客上的链接获得:thebuildingcoder.typepad.com/blog/2011/09/…。通过运行此工具,您的参数看起来将是一个名为“VIEWPORT_SHEET_NUMBER”的内置参数
  • oki 使用 viewSheet.views 来访问标题栏上的视图。

标签: c# views google-sheets revit


【解决方案1】:

雪莉是正确的。您需要通过视图上的参数访问它。建议使用 BIP,但如果您不介意特定语言,则可以通过 Revit 界面中显示的参数名称来查找参数。

我还建议您获取 Revit 查找工具并安装它。非常适合通过 Revit 数据库和类等查找您需要的内容...

【讨论】:

    猜你喜欢
    • 2017-01-14
    • 1970-01-01
    • 2016-04-19
    • 2019-11-06
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-10-28
    • 2013-01-07
    相关资源
    最近更新 更多