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: 

Element Movement

3 REPLIES 3
SOLVED
Reply
Message 1 of 4
nitinjambhale
457 Views, 3 Replies

Element Movement

Hello Guys,

Really frustrated here as it is one of the most silent place ever. 

Though i m still posting a message 😞

Do u have any idea why below code not working...

 

ElementTransformUtils.MoveElement(Doc, fiMod.Id, movPos);

 

Regards,

-Nitin.

3 REPLIES 3
Message 2 of 4
SinghManish
in reply to: nitinjambhale

Dear nitin,

 

 

I think this code may help you. because this problem resolved by me using following code.

 

Let Family instance which one you want to move is FInst;

 

1st : Get FamilyInstance Location point

Lp=FamilyInstance Location Point.

You want to move at new Point that is newPosition;

after that do it like.

 

XYZ newposition=new XYZ(1,1,1);

XYZ oldPosition=Lp;

XYZ MovePosition=null;

 

MovePosition= newposition- oldPosition

ElementTransformUtils.MoveElement(Doc, Elemnetid, MovePosition)

 

 

i hope this will work fine.

 

 

Manish Singh
Message 3 of 4
Joe.Ye
in reply to: nitinjambhale

What's the problem message when you try to move the element by MoveElement() method?


Joe Ye
Contractor
Developer Technical Services
Autodesk Developer Network
Message 4 of 4
nitinjambhale
in reply to: Joe.Ye

sorry i forgot to mark as answer... thnx

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