Revit二次开发--Line的两个方法

Line有两个静态方法:

1)public static Line CreateBound(XYZ point1,XYZ point2)

	// 用起、始点创建
	XYZ startPoint = new XYZ(0, 0, 0);
	XYZ endPoint = new XYZ(10, 10, 10);
	Line line = Line.CreateBound(startPoint, endPoint);

2)public static Line CreateUnbound(XYZ origin,XYZ direction)

	//一起点,和方向向量创建
	// define start point and direction for unbound line
	XYZ start = new XYZ(0, 0, 0);
	XYZ direction = new XYZ(10, 10, 10);
	Line line = Line.CreateUnbound(start, direction);

你可能感兴趣的:(Revit二次开发)