I’m having some “weirdness” here. It seems in Dynamo a RevitLinkInstance has no such thing as a Location. At least in Rvt 2017.2 and Dyn 1.3.2.2480.
The Element.GetLocation node errors with:
Warning: Element.GetLocation operation failed.The location of the structural element is not a valid curve.
Then a Code block extracting the Location property also fails:
Warning: No propert called Location on Revit.Elements.Element could be found
The SetLocation node fails as well:
Warning: Element.SetLocation operation failed. The location of the structural element is not a valid curve.
And the Element.MoveByVector node simply does nothing whatsoever, just resulting in a null value.
I’ve tried the same in a Python node, no error there, but no effect either.
Anyone have a clue what’s going on here? The RevitAPI documentation clearly shows that exact idea even as an example in the RevitLinkInstance.Create method’s documentation:
public void CreateLinkInstances(Document doc, ElementId linkTypeId)
{
// Create revit link instance at origin
RevitLinkInstance.Create(doc, linkTypeId);
RevitLinkInstance instance2 = RevitLinkInstance.Create(doc, linkTypeId);
Location location = instance2.Location;
// Create a second instance of the link and offset it by 100 feet.
location.Move(new XYZ(0, -100, 0));
}