Transformation rules for familyinstance

Transformation rules for familyinstance

dirk.neethling
Advocate Advocate
271 Views
1 Reply
Message 1 of 2

Transformation rules for familyinstance

dirk.neethling
Advocate
Advocate

I am trying to transform a familyinstance. It either does not respond at all to

 

ElementTransformUtils.RotateElement

ElementTransformUtils.MoveElement

 

or responds illogically. When I apply the abovementioned methods to an adaptive instance obtained from,

 

AdaptiveComponentInstanceUtils.CreateAdaptiveComponentInstance

 

everything reacts logically. However in the case of a familyinstance, it seems that other rules apply. Which methods can I use to obtain Rotation and Translation of a familyinstance? Should I use

 

fi.Location.Rotate 

fi.Location.Move

 

instead?

 

dirk

0 Likes
272 Views
1 Reply
Reply (1)
Message 2 of 2

Anonymous
Not applicable

Hi,

 

ElementTransformUtils.MoveElement  is use to displace a element from one location to another location.

 

You can use this  as below

 


1st :   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.

0 Likes