Announcements

The Autodesk Community Forums has a new look. Read more about what's changed on the Community Announcements board.

Family instance lock alignment to pipe

joseluisPQG9P
Explorer

Family instance lock alignment to pipe

joseluisPQG9P
Explorer
Explorer

Good day,

 

I have been trying to lock a family instance to a pipe with Document.Creation.NewAlignment method but it depends on the view you are referring to. I tried some workaround to be able to lock in horizontal and vertical planes even if the active view is a 3d view. When I use CenterFrontBack and CenterElevation for the family instance references I'm getting a non valid reference error on sloped pipes that runs in any direction except straight X-axis. When I use a reference line inside the family to lock alignments, I need to change the elevation views if the pipe is straight Y or straight X and when I move the pipe in Z axis the family instance loose the constrain.

 

Someone have a workaround that actually works or any comment on this topic.

 

Thanks

0 Likes
Reply
200 Views
1 Reply
Reply (1)

jeremy_tammik
Autodesk
Autodesk

The Revit API provides programmatic access to the same end-user functionality that you see and use in the UI. Therefore, to create such a persistent alignment programmatically, you have to implement the same relationships and constraints in the same 2D views as you do creating the alignment manually in the user interface.

  

Jeremy Tammik Developer Advocacy and Support + The Building Coder + Autodesk Developer Network + ADN Open
0 Likes