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

Re: Best Method for creating "Attaches To" Accessory family to Pipe?

$
0
0

Having the API programmatically insert it when using connectors? No. I'm pretty much stuck where I left off.

 

I was able to get what you described to work awhile ago using a face hosted element and programmatically hosting it to the face of the duct, then having the geometry appear inside the duct. I used NewFamilyInstance to do that.

 

The trouble with this was how Revit handles face hosted elements. I was able to change the length of the duct from one connector and the damper would not move. But changes to the other connector would be seen as a change to the face host, and the damper would start moving in attempt to maintain the same distance from that specific connector (or edge of face, more specifically).

 

I was working out a method that would work for several "attached but not splitting the system" elements. This can be feasible for dampers, but not the other things I was trying to make, including freely placed dampers. So we later discovered that a single duct connector facing into the geometry of the object can give us this behavior that we wanted. And, even better, it will do its best to stay in absolute position regardless of other connectors. Basically, you had to move the duct or pipe perpendicularly to move the accessory, which is perfect.

 

But it appears that once you start using duct or pipe connectors, NewFamilyInstance is totally ignorant to connector generation and you have to start using MEP specific generation techniques such as NewTakeoffFitting, which assumes too much about the item being placed.

 

 

What I can tell you, though, is if the face hosted damper that moves with connector but not the other doesn't sound too bad, I can offer up some pointers and examples of how I got that to work. It's a good short term fix, but I wouldn't expect to go awfully far into customized Revit using it.


Viewing all articles
Browse latest Browse all 66666

Trending Articles



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