Tee and TapAdjustable PartType in IDuctFittingAndAccessoryPressureDropServer

Tee and TapAdjustable PartType in IDuctFittingAndAccessoryPressureDropServer

aignatovich
Advisor Advisor
1,157 Views
5 Replies
Message 1 of 6

Tee and TapAdjustable PartType in IDuctFittingAndAccessoryPressureDropServer

aignatovich
Advisor
Advisor

Hi!

 

I am trying to realize some specific pressure drop calculation rules for taps and tees.

 

The problem is to recognize what is tee and what is tap in IDuctFittingAndAccessoryPressureDropServer.Calculate method.

 

For any tees and taps data.GetDuctFittingAndAccessoryData().PartType is PartType.Tee

 

There are two items in data.GetPresureDropItems() and three connectors in data.GetDuctFittingAndAccessoryData().GetAllConnectorData()

 

The only difference is there is a connector with connector index equals to -1 in the tap. In the tee all connectors' indexes are non-negative.

 

I suppose it is enough, because there are three connectors in the tee (you can see it as ConnectorElements in family editor), two connectors in the tap and two "air ways", so there is one "virtual" connector without corresponding ConnectorElement in the tap, so it's index equals to -1.

 

What do you think about it?

0 Likes
1,158 Views
5 Replies
Replies (5)
Message 2 of 6

matthew_taylor
Advisor
Advisor

Hi @aignatovich,

I'm no expert with this, but have you investigate the elements using RevitLookup?

It appears to me that once you use DuctFittingAndAccessoryData.GetFamilyInstanceId to get the familyInstance, you can get the familySymbol, and then the Family. The family has a FAMILY_CONTENT_PART_TYPE => Part Type builtinparameter. That should give you what you need.

 


Cheers,

-Matt
_______________________________________________________________________________
Marking a post as a 'solution' helps the community. Giving a post 'Kudos' is as good as saying thanks. Why not do both?
0 Likes
Message 3 of 6

aignatovich
Advisor
Advisor

Hi @matthew_taylor

 

Unfortunately, there is no access to Revit document from calculation server context, I suppose, this method was added just for debugging purposes.

 

By the way, there is much simpler way (if you have access to family instance, of course): family instance MEPModel property is MechanicalFitting in such cases. MechanicalFitting has PartType property

0 Likes
Message 4 of 6

matthew_taylor
Advisor
Advisor

Hi @aignatovich,

Perhaps you could show the bones of your application so I can help further?


Cheers,

-Matt
_______________________________________________________________________________
Marking a post as a 'solution' helps the community. Giving a post 'Kudos' is as good as saying thanks. Why not do both?
0 Likes
Message 5 of 6

aignatovich
Advisor
Advisor

Please, look in attachment

0 Likes
Message 6 of 6

chema.jimenez
Participant
Participant

Hello,

Sorry for replying this topic with a diferent question.

I am looking for the way to store the calulated pressure drop value in te extensible storage of the fitting.

Do you have any idea on how to achieve it in the Calculate() method of the server?

Thanks in advance!

0 Likes