ve written a script that repositions text on a dimension line when texts overlaps. The script is not finished yet. I put the current status underneath. It currently only works for horizontal dimension lines and it can be easily addapted for vertical dimension lines. But I also want to get it working for dimension lines with an angle other than 0 or 90 degrees. To do this within one script I need to rotate a vector using an API command and then move a point using this rotated vector. I know how to do it in designscript but this doesnt work when the Revit API is imported.
So my question is:
how can I rotate a vector and move a point in the direction of this vector? using the API
The script is attached.