I was attempting to relocate some beams trying to follow this LocationCurve method:
<span class="highlight-keyword">void</span> MoveUsingCurveParam(Autodesk.Revit.ApplicationServices.Application application, Wall wall)
{
LocationCurve wallLine = wall.Location <span class="highlight-keyword">as</span> LocationCurve;
XYZ p1 = XYZ.Zero;
XYZ p2 = <span class="highlight-keyword">new</span> XYZ(<span class="highlight-number">10</span>, <span class="highlight-number">20</span>, <span class="highlight-number">0</span>);
Line newWallLine = application.Create.NewLineBound(p1, p2);
<span class="highlight-comment">// Change the wall line to a new line.</span>
wallLine.Curve = newWallLine;
}
So I implemented a small python node to the best of my abilities but whenever I try to switch the old curves to the new curves, I get the following error:
Traceback (most recent call last):
File "<string>", line 33, in <module>
TypeError: expected Curve, got Line
Any idea how I could make this work? I've attached the definition below.
