Pipe Diameter issue on revit api

Pipe Diameter issue on revit api

Anonymous
Not applicable
2,197 Views
6 Replies
Message 1 of 7

Pipe Diameter issue on revit api

Anonymous
Not applicable

Hi All,

 

I got some issue on pipe diameter measurement. After creting pipe, the diameter value that shown in option bar is quite different from the value that i set in c# code (seee in following figure)

 

Capture.JPG

 

here is my revit api code:

 

  Pipe pipe = Pipe.Create(doc, domesticHotWaterSystemType.Id, firstPipeType.Id, level.Id, p0, p1);
                Parameter parameter = pipe.get_Parameter(BuiltInParameter.RBS_PIPE_DIAMETER_PARAM);
                parameter.Set(1);

According to the picture, the diameter that measured in display is 305mm but the option always shows 200mm

can u guys enlighten me how to do it? quite noob in revit api.

 

Best Rgds,

Mr.Naing

0 Likes
2,198 Views
6 Replies
Replies (6)
Message 2 of 7

Anonymous
Not applicable
I had the same issue previously. When I create a pipe with 300 dia, the resulting one was 350...
I dos not find a direct solution, that I did was after creating the pipe with the wrong diameter, once closed the transaction, I opened other transaction and set the correct diameter. Doing it trough different transactions the pipe gets the correct size
0 Likes
Message 3 of 7

tuuletin
Collaborator
Collaborator

What values are assigned to this pipe in MEP-system properties?

Show the screenshot of pipe dimension parameters...

0 Likes
Message 4 of 7

Charles.Piro
Advisor
Advisor

Hi,

 

you want create a new pipe with a diameter equal to 304.8mm but this diameter doesn't exist in Revit when you start a new project. You must first create diameter in Mechanical Settings :

 

Mechanical Settings.jpg

 

Smiley Wink

 



PIRO Charles
Developer

PIRO CIE
Linkedin


0 Likes
Message 5 of 7

Anonymous
Not applicable

Anyway I have had the issue having created the correct diameter in the Mech settings...

0 Likes
Message 6 of 7

Charles.Piro
Advisor
Advisor

If you have created the dimension in Mechanical settings (attention with the "Material") and in your routing of the pipe you have choosen the good "Material", it's ok.

 

Look this (with the same code of thannaingoo1985):

 

diameter.jpg

 

 



PIRO Charles
Developer

PIRO CIE
Linkedin


Message 7 of 7

Anonymous
Not applicable
Pipe pipe = Pipe.Create(doc, domesticHotWaterSystemType.Id, firstPipeType.Id, level.Id, p0, p1);
                Parameter parameter = newPipe.LookupParameter("Diameter");
                parameter.SetValueString("400.0 mm");