© 2010 Autodesk
Introduction to Revit 2011 API
Element Modification
Document Level – Move and Rotate
§
Move and rotate an element (e.g., a wall)
<VB.NET>
''
move by displacement
Dim
v
As
XYZ =
New
XYZ(10.0, 10.0, 0.0)
m_rvtDoc.Move(elem, v)
</VB.NET>
<VB.NET>
''
rotate by 15 degree around z-axis.
Dim
pt1 = XYZ.Zero
Dim
pt2 = XYZ.BasisZ
Dim
axis
As
Line = m_rvtApp.Create.NewLineBound(pt1, pt2)
m_rvtDoc.Rotate(elem, axis, Math.PI / 12.0)
</VB.NET>