• 大小: 10.48MB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2023-10-07
  • 语言: 其他
  • 标签: 翻模  

资源简介

revit二次开发,利用Teigha读取cad的图形和文字信息,并在revit中生成构件,可用做revit翻模案例的参考

资源截图

代码片段和文件信息

using Autodesk.Revit.DB;
using Autodesk.Revit.DB.Structure;
using CreatBridgeForRevit2018.FamilyLoad;
using CreatBridgeForRevit2018.Handler;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CreatBridgeForRevit2018.Bridge.CurvedRigidframeBridge
{
    class CreatBoxGriderFamilies
    {
        CurvedRigidframeBridgeModel m_model;
       
        public Family CreatFamiliesItem(Document familyDoc Document revitDoc Autodesk.Revit.ApplicationServices.Application revitApp int i string filePath1 string filePath2CurvedRigidframeBridgeModel model)
        {

            m_model = model;
            FamilyInstance famIns1;
            FamilyInstance famIns2;
            FamilyInstance famIns3;
            FamilyInstance famIns4;

            //创建平曲线
            CurveByPoints horizonCurve = CreatHorizontalCurve(familyDoc model);
            //创建空间曲线
            CurveByPoints curve3D = Creat3DCurve(familyDoc model);
            Plane plane1 = Plane.CreateByNormalAndOrigin((horizonCurve.GeometryCurve as HermiteSpline).Tangents[i] horizonCurve.GetPoints().get_Item(i).Position);
            Plane plane2 = Plane.CreateByNormalAndOrigin((horizonCurve.GeometryCurve as HermiteSpline).Tangents[i + 1] horizonCurve.GetPoints().get_Item(i + 1).Position);
            using (Transaction transaction1 = new Transaction(familyDoc))
            {

                transaction1.Start(“主题“);
                //禁止弹出警告框
                new FailureHandler().BiddingTheWarmingDialog(transaction1);                   
                      
                
                famIns1 = LocationFamilyInstance(familyDoc filePath1 curve3D.GetPoints().get_Item(i).Position (horizonCurve.GeometryCurve as HermiteSpline).Tangents[i] i);
                famIns2 = LocationFamilyInstance(familyDoc filePath1 curve3D.GetPoints().get_Item(i + 1).Position (horizonCurve.GeometryCurve as HermiteSpline).Tangents[i + 1] i + 1);
                famIns3 = LocationFamilyInstance2(familyDoc filePath2 curve3D.GetPoints().get_Item(i).Position (horizonCurve.GeometryCurve as HermiteSpline).Tangents[i] i);
                famIns4 = LocationFamilyInstance2(familyDoc filePath2 curve3D.GetPoints().get_Item(i + 1).Position (horizonCurve.GeometryCurve as HermiteSpline).Tangents[i + 1] i + 1);


                
                familyDoc.Delete(horizonCurve.Id);
                familyDoc.Delete(curve3D.Id);  
                
                transaction1.Commit();

            }
            using (Transaction transaction2 = new Transaction(familyDoc))
            {
                transaction2.Start(“主题“);
                //在下面添加主要代码内容
                ReferenceArray profiles0 = GetReferenceArrayFromFamilyInstance(familyDoc famIns1 plane1);
                ReferenceArray profiles1 = GetReferenceArrayFromFamilyInstance(familyDoc famIns2 plane2);

             

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

    ..A..H.    162304  2018-01-22 21:23  CreatBridgeForRevit2018(2018.1.22)\.vs\CreatBridgeForRevit2018\v14\.suo

     文件     102912  2018-01-22 22:01  CreatBridgeForRevit2018(2018.1.22)\CreatBridgeForRevit2018\bin\Debug\CreatBridgeForRevit2018.dll

     文件     112128  2018-01-22 22:01  CreatBridgeForRevit2018(2018.1.22)\CreatBridgeForRevit2018\bin\Debug\CreatBridgeForRevit2018.pdb

     文件   26926576  2017-02-24 06:21  CreatBridgeForRevit2018(2018.1.22)\CreatBridgeForRevit2018\bin\Debug\RevitAPI.dll

     文件    2738672  2017-02-24 06:21  CreatBridgeForRevit2018(2018.1.22)\CreatBridgeForRevit2018\bin\Debug\RevitAPIUI.dll

     文件      10240  2016-09-14 11:02  CreatBridgeForRevit2018(2018.1.22)\CreatBridgeForRevit2018\bin\Debug\TD_Alloc_3.03_9.dll

     文件     341504  2016-09-14 11:02  CreatBridgeForRevit2018(2018.1.22)\CreatBridgeForRevit2018\bin\Debug\TD_DbRoot_3.03_9.dll

     文件   10582016  2016-09-14 11:02  CreatBridgeForRevit2018(2018.1.22)\CreatBridgeForRevit2018\bin\Debug\TD_Db_3.03_9.dll

     文件     449024  2016-09-14 11:02  CreatBridgeForRevit2018(2018.1.22)\CreatBridgeForRevit2018\bin\Debug\TD_DynBlocks_3.03_9.tx

     文件    1352192  2016-09-14 11:02  CreatBridgeForRevit2018(2018.1.22)\CreatBridgeForRevit2018\bin\Debug\TD_Ge_3.03_9.dll

     文件     944640  2016-09-14 11:02  CreatBridgeForRevit2018(2018.1.22)\CreatBridgeForRevit2018\bin\Debug\TD_Gi_3.03_9.dll

     文件     569344  2016-09-14 11:02  CreatBridgeForRevit2018(2018.1.22)\CreatBridgeForRevit2018\bin\Debug\TD_Gs_3.03_9.dll

     文件    4946752  2016-09-14 11:02  CreatBridgeForRevit2018(2018.1.22)\CreatBridgeForRevit2018\bin\Debug\TD_Mgd_3.03_9.dll

     文件     679936  2016-09-14 11:02  CreatBridgeForRevit2018(2018.1.22)\CreatBridgeForRevit2018\bin\Debug\TD_Root_3.03_9.dll

     文件      33792  2016-09-14 11:02  CreatBridgeForRevit2018(2018.1.22)\CreatBridgeForRevit2018\bin\Debug\TD_SpatialIndex_3.03_9.dll

     文件      11268  2018-01-16 15:56  CreatBridgeForRevit2018(2018.1.22)\CreatBridgeForRevit2018\Bridge\CurvedRigidframeBridge\CreatBoxGriderFamilies.cs

     文件       1857  2018-01-14 21:05  CreatBridgeForRevit2018(2018.1.22)\CreatBridgeForRevit2018\Bridge\CurvedRigidframeBridge\CurvedRigidframeBridgeCmd.cs

     文件       2856  2018-01-16 16:14  CreatBridgeForRevit2018(2018.1.22)\CreatBridgeForRevit2018\Bridge\CurvedRigidframeBridge\CurvedRigidframeBridgeCreater.cs

     文件       1311  2018-01-14 21:05  CreatBridgeForRevit2018(2018.1.22)\CreatBridgeForRevit2018\Bridge\CurvedRigidframeBridge\CurvedRigidframeBridgeModel.cs

     文件       3810  2018-01-14 21:58  CreatBridgeForRevit2018(2018.1.22)\CreatBridgeForRevit2018\Bridge\CurvedRigidframeBridge\CurvedRigidframeBridgeView.xaml

     文件       7101  2018-01-14 22:00  CreatBridgeForRevit2018(2018.1.22)\CreatBridgeForRevit2018\Bridge\CurvedRigidframeBridge\CurvedRigidframeBridgeView.xaml.cs

     文件       1872  2018-01-14 21:05  CreatBridgeForRevit2018(2018.1.22)\CreatBridgeForRevit2018\Bridge\StrightRigidframeBridge\StrightRigidframeBridgeCmd.cs

     文件       4411  2018-01-14 21:05  CreatBridgeForRevit2018(2018.1.22)\CreatBridgeForRevit2018\Bridge\StrightRigidframeBridge\StrightRigidframeBridgeCreater.cs

     文件       1293  2018-01-14 20:35  CreatBridgeForRevit2018(2018.1.22)\CreatBridgeForRevit2018\Bridge\StrightRigidframeBridge\StrightRigidframeBridgeModel.cs

     文件       2621  2018-01-14 21:52  CreatBridgeForRevit2018(2018.1.22)\CreatBridgeForRevit2018\Bridge\StrightRigidframeBridge\StrightRigidframeBridgeView.xaml

     文件       6329  2018-01-14 20:36  CreatBridgeForRevit2018(2018.1.22)\CreatBridgeForRevit2018\Bridge\StrightRigidframeBridge\StrightRigidframeBridgeView.xaml.cs

     文件        978  2018-01-15 17:38  CreatBridgeForRevit2018(2018.1.22)\CreatBridgeForRevit2018\Converter\EnumToBooleanConverter.cs

     文件       5555  2018-01-19 20:56  CreatBridgeForRevit2018(2018.1.22)\CreatBridgeForRevit2018\CreatBridgeForRevit2018.csproj

     文件       3809  2018-01-14 19:28  CreatBridgeForRevit2018(2018.1.22)\CreatBridgeForRevit2018\ElementsSelect\ElemsSelect.cs

     文件        765  2018-01-14 21:05  CreatBridgeForRevit2018(2018.1.22)\CreatBridgeForRevit2018\FamilyLoad\ProjiectFamLoadOption.cs

............此处省略80个文件信息

评论

共有 条评论

相关资源