Y轴由ViewUpDirection确定。 Z轴由View.ViewDirection确定。 视图方向是从目标点到 3D 空间中的查看器,以及从屏幕到屏幕空间中的查看器。 静态方法View3D.CreatePerspective()可用于创建新的透视视图 Code Region: View3D.CreatePerspective() public static View3D View3D.CreatePerspective (Document document, Element...
X、Y和Z轴则分别由View.RightDirection、View.UpDirectionn和View.ViewDirection属性表示。 The viewing coordinate system represents how the model is presented in the observer's view. Its origin is the viewer's eye position whose coordinates in the model space are retrieved by the View.Origin property...
t.Start("Temporarily set work plane" +"to pick point in 3D"); SketchPlane sp = doc.Create.NewSketchPlane( plane); uidoc.ActiveView.SketchPlane = sp; uidoc.ActiveView.ShowActiveWorkPlane(); try { point_in_3d = uidoc.Selection.PickPoint( "Please pick a point on the plane" +"defined...
一开始我在Revit2016的API文档中找关键词Camera,但是没什么收获。 其实这个相机功能的真正核心是创建透视视图:View3D.CreatePerspective(Document, ElementId) 简单的代码示例如下: var uiDocument = commandData.Application.ActiveUIDocument; var doc = uiDocument.Document; IEnumerable<ViewFamilyType> viewFamilyTypes ...
var transform = Transform.CreateRotation(rightDir, -Math.PI / 4); var upDir = transform.OfPoint(XYZ.BasisZ); forwardDir = transform.OfPoint(forwardDir); //创建新的相机参数 ViewOrientation3D newOrientation = new ViewOrientation3D(orientation.EyePosition, upDir, forwardDir); ...
通过API来创建主要用到两个类 AssemblyInstance AssemblyViewUtils 下面是一个小例子: Command: public Result Execute(ExternalCommandData commandData, ref string message, ElementSet elements) { UIDocument uidoc = commandData.Application.ActiveUIDocument; ...
概要:这个示例演示了如何使用Revit API方法FindReferencesWithContextByDirection来找到天窗窗户相对于地面高度的方法。 类: Autodesk.Revit.DB.FilteredElementCollector Autodesk.Revit.DB.FamilyInstance Autodesk.Revit.DB.ModelCurve Autodesk.Revit.DB.BoundingBoxXYZ ...
创建钢筋的APIRevit给提供了以下三种,两类创建方法,第一类是根据曲线创建,第二类是根据几何形状创建。 我主要使用了第一类的方法根据曲线创建,来具体看下内容: 第一个doc 就不用说了; 第二个 选择钢筋类型, 对于箍筋需要设置为:RebarStyle.StirupTie. 如果对于直线钢筋或纵筋设置为RebarStyle.Standard。这里我们的...
namespace Revit.SDK.Samples.NewRoof.RoofsManager.CS { /// /// The kinds of roof than can be created. /// public enum CreateRoofKind { FootPrintRoof, ExtrusionRoof }; /// /// The RoofsManager is used to manage the operations between Revit and UI. /// public class RoofsMana...
You can find some past wishes that were granted athttps://boostyourbim.wordpress.com/category/api-wish/rtc/ And let me know you are here in San Diego and want to say hi! Create a 3d view showing only #Revit wall structural layers ...