图片 2

Revit读取当前rvt的所有视图与其名称,LAMP编译安装与优化

LAMP编写翻译安装

Revit读取当前rvt的具备视图与其名称,revit读取当前rvt

1卡塔 尔(英语:State of Qatar)读取全体视图:

public static ViewSet GetAllViews(Document doc)
        {
            ViewSet views = new ViewSet();
            FilteredElementCollector collector = new FilteredElementCollector(doc);
            FilteredElementIterator it = collector.OfClass(typeof(View)).GetElementIterator();
            it.Reset();
            while (it.MoveNext())
            {
                View view = it.Current as View3D;
                if (null != view && !view.IsTemplate && view.CanBePrinted)
                {
                    views.Insert(view);
                }
                else if (null == view)
                {
                    View view2D = it.Current as View;
                    if (view2D.ViewType == ViewType.FloorPlan | view2D.ViewType == ViewType.CeilingPlan | view2D.ViewType == ViewType.AreaPlan | view2D.ViewType == ViewType.Elevation | view2D.ViewType == ViewType.Section)
                    {
                        views.Insert(view2D);
                    }                 
                }
            }
            return views;
        }

 

2卡塔 尔(阿拉伯语:قطر‎读取视图的称号:

public static string GetViewDisplayName(View view)
        {

            String name = view.ViewName;

            //special treament to sheet name
            if (view.ViewType == ViewType.DrawingSheet)
            {
                ViewSheet sheet = view as ViewSheet;
                name = String.Format("{0} - {1}", sheet.SheetNumber, name);
            }
            if(view.ViewType == ViewType.ThreeD)
            {
                if (name.Contains("{")&&name.Contains("}"))
                {
                    int bracketStart = name.IndexOf("{");
                    int bracketEnd = name.IndexOf("}");
                    name = name.Substring(bracketStart + 1, bracketEnd - bracketStart - 1);
                }
            }
            else if(view.ViewType == ViewType.FloorPlan)
            {
                name = string.Format("楼层平面:{0}", name);
            }
            else if (view.ViewType == ViewType.CeilingPlan)
            {
                name = string.Format("天花板平面:{0}", name);
            }
            else if (view.ViewType == ViewType.AreaPlan)
            {
                name = string.Format("面积平面:{0}", name);
            }
            else if (view.ViewType == ViewType.Elevation)
            {
                name = string.Format("建筑立面:{0}", name);
            }
            else if (view.ViewType == ViewType.Section)
            {
                name = string.Format("建筑剖面:{0}", name);
            }
            return name;
        }

 

1卡塔 尔(阿拉伯语:قطر‎读取全体视图: public static ViewSet GetAllViews(Document doc) {
ViewSet views = new ViewSet(); Fi…

自己直接据悉Docker是个很棒的新东西,可是小编一贯提不起兴趣,直到笔者遇见叁个实际的主题材料:
假如通过Docker来布署 Scout
那般做会轻便一些啊?

少年老成、服务器情形

上面笔者将分三有的来演讲。

[root@linuxidc ~]# cat
/etc/RedHat-release

哇哦, 有效的比葫芦画瓢生产条件的艺术

图片 1

诚实临蓐景况中有16台服务器。假诺本人尝试用虚构机去模拟的话,每个VirtualBox实例最棒能有512MB内部存款和储蓄器。那样的内部存款和储蓄器须要是自己台式机内存的两倍大。其他VirtualBox还应该有多数约束,举例利用单独的系统基本和文件系统。可是那几个限制对于Docker都不算个事,Docker的containers是分享四个宿主机器的类其余,以致大概是同叁个顺序和库。豆蔻年华台Docker宿主机器上运维数百个containers亦非什么样难点。

Red Hat Enterprise
Linux Server release 5.8 (Tikanga)

老办法

作者实在不可能在本地模拟一个通通真实的情况,可是大家只要看一下运维后生可畏台设想机使用的时间:

$time vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
[default] Importing base box 'squeeze64-ruby193'...
...
[default] Booting VM...
[default] Waiting for VM to boot. This can take a few minutes.
...

real  1m32.052s

开发银行八个镜像当先了一分半钟。那作者要轻易改良下布署如何是好啊?这我要表明下可行性呢,那是还是不是又得重启?又是一分半钟了哟。

那分明正是个阴毒的查办嘛。

[root@linuxidc ~]# uname -a

使用Docker

Docker到底有多么轻量级? 当你在Docker
container中运维个进度时,你居然都可能忘记这么些进度竟然不是直接运维在主机上的。
在上边包车型客车例证中,作者运转叁个叫“rails”的镜像在Docker
container中,那里是个Rails App
(Dockerfile):

root@precise64:~# docker run rails
2013-08-26 20:21:14,600 CRIT Supervisor running as root (no user in config file)
2013-08-26 20:21:14,603 WARN Included extra file "/srv/docker-rails/Supervisorfile" during parsing
2013-08-26 20:21:14,736 INFO RPC interface 'supervisor' initialized
2013-08-26 20:21:14,740 CRIT Server 'unix_http_server' running without any HTTP authentication checking
2013-08-26 20:21:14,754 INFO supervisord started with pid 1
2013-08-26 20:21:15,783 INFO spawned: 'rails' with pid 10
2013-08-26 20:21:16,841 INFO success: rails entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)

开始container和启动supervisor
(那是担任开端Rails app的)三个只用了2秒

粗略,Docker相对胜任在您的支付计算机上虚构出一个完璧归赵的生育条件,何况一点也不慢。既然这样简单,来,开动起来呢:笔者要根本测验一下

Linux linuxidc 2.6.18-308.el5 #1 SMP Fri Jan 27 17:21:15 EST 2012 i686
i686 i386 GNU/Linux

营造镜像如此方便连忙 – 缓存万岁!

图片 2

Docker
的详实介绍
:请点这里
Docker
的下载地址
:请点这里

开源项目Docker,Red
Hat新的虚构化选用
http://www.linuxidc.com/Linux/2013-10/91051.htm

dockerlite: 轻量级 Linux 虚拟化
http://www.linuxidc.com/Linux/2013-07/87093.htm

Docker的搭建Gitlab CI 全经过详整
http://www.linuxidc.com/Linux/2013-12/93537.htm

Docker 和叁个健康的设想机有啥差异?
http://www.linuxidc.com/Linux/2013-12/93740.htm

Docker 将退换所有的事务
http://www.linuxidc.com/Linux/2013-12/93998.htm

图片 3

二、幼功条件设置

yum install gcc gcc-c++  bison autoconf automake  zlib-devel
ncurses-devel libjpeg-devel libpng-devel libtiff-devel freetype-devel
pam-devel openssl-devel libxml2-devel

三、APACHE安装

1、下载并解压

wget

tar xzvf httpd-2.2.26.tar.gz

cd httpd-2.2.26

2、编译安装

./configure \

-prefix=/data/apache \

-enable-module=so \

-enable-deflate=shared \

-enable-rewrite=shared \

-enable-cache \

-enable-file-cache \

-with-mpm=worker  \

-enable-threads \

Make && make install

相对来讲,prefork方式速度要稍高于worker,可是它须求的cpu和memory财富也稍多于woker。

3、启动apache服务

./apachectl start

起步报错:httpd: Could not reliably determine the server’s fully
qualified domain name,

using 127.0.0.1 for ServerName

4、改良配置文件

发表评论