CopyByTransform
ElementId CopyByTransform(this Element element, Transform t, CopyPasteOptions? options = null)Copies an element using an arbitrary transform (e.g., rotate + translate).
Parameters
- elementElement
The element to copy.
- tTransform
Transform to apply during copy.
- optionsCopyPasteOptions?
Optional copy/paste options.
Returns: The id of the new copy, or ElementId.InvalidElementId if failed.
Example
Transform t = Transform.CreateTranslation(new XYZ(5, 0, 0));ElementId id = element.CopyByTransform(t);