Quantcast
Channel: All Revit API Forum posts
Viewing all articles
Browse latest Browse all 67020

Changing the location and host of a Family Instance

$
0
0

Hello,

 

I'm trying to change the location (and level if it is possible) of a Family Instance that requires a wall as a host (e.g. a Window or a Door).

I imagine that for this to happen I would have to specify the new host, but this property seems to be read-only. Is there a way to work around this? I searched the whole week for any related example and couldn't find anything so I'm posting here.

 

So far all I have is this code that allows me to move a family instance only along the wall it is already hosted. 

 

 

LocationPoint locationPoint = familyInstance.Location asLocationPoint;if (null != locationPoint)
    {XYZ newLocation = newXYZ(xNew, yNew, 0);// Move the family instance to the new location
        locationPoint.Point = newLocation;
    }

 

 

 

Kind regards,

Gustavo

 


Viewing all articles
Browse latest Browse all 67020


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>