Revit API Forum
Welcome to Autodesk’s Revit API Forums. Share your knowledge, ask questions, and explore popular Revit API topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to get the value of the property "Loss Method"?

4 REPLIES 4
SOLVED
Reply
Message 1 of 5
Hanley.DengK8R83
678 Views, 4 Replies

How to get the value of the property "Loss Method"?

There is the property "Loss Method" in a Pipe fitting, 

In UI, the value is "Use Definition on Type", but in API, the value is a GUID, "3bf616f9-6b98-4a21-80ff-da1120c8f6d6".

Then How can I convert the API value, "3bf616f9-6b98-4a21-80ff-da1120c8f6d6", into the UI value, "Use Definition on Type" ?

See the attachment "LossMethod.png"

Thanks a lot.

4 REPLIES 4
Message 2 of 5

The loss method can be programmed, so the GUID you see might be something like the add-in identifier:

 

https://thebuildingcoder.typepad.com/blog/2017/12/pipe-fitting-k-factor-archilab-and-installer.html

 

Best regards,

 

Jeremy

 

 



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

Message 3 of 5

Problem solved.

This problem is solved in 2 cases:

case 1: for Pipe fittings, when Loss Method is "Use definition on type".

             this case can be identified, if the parameter.AsString() equals to the GUID in Autodesk.Revit.DB.MEPCalculatationServerInfo.PipeUseDefinitionOnTypeGUID. 

            In this case, I cannot find the UI Display string for it, then I hard code the UI display string.

Case 2: when it is not case 1, including other value in Pipe Fittings, and all the value in Duct fittings, use the API:

Autodesk.Revit.DB.MEPCalculatationServerInfo.GetMEPCalculationServerInfo(objFamilyInstance), 

Then the ServerName is the string in UI Display.

Message 4 of 5

Thank you for sharing your results. They make perfect sense, of course. Preserved here for posterity:

 

https://thebuildingcoder.typepad.com/blog/2019/05/generate-directshape-element-to-represent-room-vol...

 



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

Message 5 of 5

I find that if the Loss Method is "Use definition on type", then it actually means to use the Loss Method on Family Type.

As the picture show, in this case, Property “Loss Method” should be “K Coefficient from Table”.

 

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Rail Community