Element Movement

Element Movement

nitinjambhale
Advocate Advocate
574 Views
3 Replies
Message 1 of 4

Element Movement

nitinjambhale
Advocate
Advocate

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.

0 Likes
Accepted solutions (1)
575 Views
3 Replies
Replies (3)
Message 2 of 4

Anonymous
Not applicable
Accepted solution

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.

 

 

Message 3 of 4

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


Joe Ye
Contractor
Developer Technical Services
Autodesk Developer Network
0 Likes
Message 4 of 4

nitinjambhale
Advocate
Advocate
sorry i forgot to mark as answer... thnx
0 Likes