Place a Family instance along selected another family instance edge

Place a Family instance along selected another family instance edge

sripandian
Enthusiast Enthusiast
759 Views
3 Replies
Message 1 of 4

Place a Family instance along selected another family instance edge

sripandian
Enthusiast
Enthusiast

Hi ,

I have two family in a project. I bring it one family instance based on the selected model line.I am getting issue while bringing another family instance in a project based on a selected edge in already placed family instance. It placed in opposite orientation (it seems rotated).I used code for GetInstanceEdgeFromSymbolRef from https://github.com/jeremytammik/the_building_coder_samples/blob/master/BuildingCoder/BuildingCoder/C... to select reference edge for placing another family instance. Points of the edge which i selected is taking correct as per code in above link.But orientation of the selected geometry seems to be wrong. 

while placing manually using Family instance edge working fine.

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

jeremytammik
Autodesk
Autodesk

Are you using RevitLookup and other database exploration tools to analyse in detail the differences between the two scenarios?

 

 

There must be some difference between the two.

 

What is it?

 



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

0 Likes
Message 3 of 4

sripandian
Enthusiast
Enthusiast

hi Jeremy,

Thanks for your reply. I used Revit lookup tool. it seems orientation of the instances differ. please refer the attached image for your reference.

0 Likes
Message 4 of 4

sripandian
Enthusiast
Enthusiast
Accepted solution

Hi,

I forget to post the solution which i found.

 

Edge selEdge = RevitActions.Instance.GetInstanceEdgeFromSymbolRef(LeftSideEdge);
Curve refcurve = selEdge.AsCurve().CreateReversed();

 

After extracting the curve i reversed it. But still i couldn't understand, placement of family working fine while doing manually, if i use the api i need to reverse it.

0 Likes