Revit API Forum
Welcome to Autodesk’s Revit API Forums. Share your knowledge, ask questions, and explore popular Revit API topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Move Curve

1 REPLY 1
SOLVED
Reply
Message 1 of 2
mimiazimar
1909 Views, 1 Reply

Move Curve

Is there a method/simple way to move a curve?

(i know how to do it in not so simple way)

For example to move a line by XYZ(1,0,0)

Sorry if my question is too easy. Smiley Embarassed

1 REPLY 1
Message 2 of 2
BenoitE&A
in reply to: mimiazimar

Hey Mimi,

Yes it is easy:

 

// Your curve

Curve myCurve;

// Your vector of translation

XYZ myVector = new XYZ(1,0,0);

// Define a transformation

Transform tf = Transform.CreateTranslation(myVector);

// Apply transformation

Curve myNewCurve = myCurve.CreateTransformed(tf);

 

You can explore the different types of transformations which are very usefull.

Bye

Benoit


Benoit FAVRE
CEO of etudes & automates
www.etudesetautomates.com/

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Rail Community