0% found this document useful (0 votes)
1K views

Exporting PCF Files From Revit 2018 - Revit Official Blog

The document provides instructions for exporting piping component files (PCF) from Revit 2018 using a macro. It explains that PCF files are used in the piping industry for tasks like stress analysis and generating documentation. It then provides step-by-step instructions for creating a macro in Revit to export selected piping elements to a PCF file with a single line of code. The document demonstrates exporting a PCF file from a Revit model and generating an isometric drawing from that PCF file in Plant 3D.

Uploaded by

Evaldo Brito
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
1K views

Exporting PCF Files From Revit 2018 - Revit Official Blog

The document provides instructions for exporting piping component files (PCF) from Revit 2018 using a macro. It explains that PCF files are used in the piping industry for tasks like stress analysis and generating documentation. It then provides step-by-step instructions for creating a macro in Revit to export selected piping elements to a PCF file with a single line of code. The document demonstrates exporting a PCF file from a Revit model and generating an isometric drawing from that PCF file in Plant 3D.

Uploaded by

Evaldo Brito
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

MEP TIPS, TRICKS & TUTORIALS

Exporting PCF Files from Revit 2018


Martin Schmid July 26, 2017

(5) Save 1 0

Revit 2018.0 has the ability to generate Piping Component Files (PCF) files from
fabrication level of detail piping models using a simple macro. PCF files are used
in the piping industry to automate a variety of process, such as stress analysis,
generation of documentation (such as isometrics), and even to automate shop
equipment.

The PCF creation engine in Revit 2018 is the same as what was historically in
Autodesk Fabrication CADmep, and used by some users to generate isometrics. As
long as you are using Fabrication (ITM) based piping components in Revit, you can
use a relatively simple macro to output the PCF file, which will include the pipe,
fittings, valves, and hangers. There are some limitations in our current output, for
example, we’re not presently outputting fluid information or pipe wall thickness.

Here’s the scoop on how to create a PCF file from Revit.

Macro Creation

To create the macro, follow these steps:

1. On the Manage tab > Macro panel > click Macro Manager.
2. In the Macro Manager window:
Select the Application tab.
On the right side, under Module, click Create.
3. In the Create a New Module window:
Enter the name MyPipingUtilities
Leave the Language as C#.
Click OK.
4. In the Macro Manager window:
On the right side, under Module, click Macro
5. In the Create a New Macro window:
1. Enter the name ExportSelectionToPCF
2. Click OK.
6. The SharpDevelop macro editing environment will open.
You are now ready to write the associated code.

Writing the Code

There will be a pre-populated function block created as shown below.

1. Between the curly braces, copy and paste the following code:
Autodesk.Revit.DB.Fabrication.FabricationUtils.ExportToPCF(
this.ActiveUIDocument.Document,
this.ActiveUIDocument.Selection.GetElementIds().ToList(),
"C:\\temp\\somefile.pcf");

Your end result should look like the following:

That’s it! One line of code (well, four lines to improve readability).

2. In the SharpDevelop menu.


Click Build > Build Solution
Click File > Exit
3. Click Yes if prompted to save your changes.
The code will export the selected Pipe Fabrication Part elements to the filename
indicated. Feel free to refine this code to change the path or further modify to suit
your workflow needs.

Testing the Functionality

Now, you can try it out!

1. In a model with some Pipe Fabrication Parts.


Select the elements you want to output.
On the Manage tab > Macros panel > click Macro Manager
Select the Application tab
Expand (if necessary) the tree so you can
select ExportSelectionToPCF under MyPipingUtilities.
Click Run.
2. Verify that the file was created in the indicated location.

Sample Result

Once you have the PCF file generated, you can try it out in your targeted workflow.

I used the Plant 3D PCF to ISO feature to generate a single line isometric.

Here’s the original model in Revit.

Here’s the resulting isometric.

You might also like