image by selux lookbook

profile family to ds polycurve

image by selux lookbook

This past week I have ran into a post on the DynamoBIM blog that was asking about an easier way to get profiles from Revit into Dynamo so that they can be used as Profiles while doing sweeps and extrusions like in this example by Eduardo Roca. As you can see Eduardo is going to some painstaking lengths to convert a profile into a PolyCurve that can be used with a Sweep node. As much as I like his write up I hate to do all of this manual labor of re drawing everything in Revit with model lines and then importing into Dynamo via Element Selection node.

In order to solve that problem I have created a node that queries a Profile Family and extracts its geometry (curves) while converting them to PolyCurves or Lists of Lists containing Curve segments as Lines or Arcs. This streamlines the process of creating a PolyCurve to creating a Profile Family and loading it into a project then selecting it using Family Types node in Dynamo.

The gist of this node is its geometry extraction that is done taking advantage of RevitAPI’s family management tools. When we create a Profile Family it is stored in that family’s document under Sketch class and then further under Profile as a CurveArray. The nice thing about that is that CurveArrays are nicely organized into lists of lists containing curves for each closed loop. That makes it much easier to convert to DS geometry and still keep nicely organized.

Here’s the code for this node:

Here’s an example of possible use for this node:


PolyCurve from Profile Family Type can be downloaded here.


  1. Axl says:


    I created the setup as shown in your picture. I created an architectural project and as Family Type I selected M_Gutter – Bevel:150×150 mm. Also I created a column family profile and loaded this into the project.
    Every time the PolyCurve by Profile Family Type is NULL. When I select A1 metric:A1 metric I get a nice extrusion of the A1 template?! And nice Lists of Lines.

    With the Code Block in Python I get:
    Warning: IronPythonEvaluator.EvaluateIronPythonScript operation failed.
    Traceback (most recent call last):
    File “”, line 46, in
    NameError: name ‘family’ is not defined

    How do I get an extrusion of a family profile?


  2. Ahmad says:

    I have tried your node and it seems helpful,
    I Need the curves to make a revit model with the node ByLoftCrossSection, but I need the curves to be vertical and in specified points. The defult Position for your code is x=y=z=0 and the curve is horizontal. How can I change this defult setting?
    thank you in advance

    • x=y=z=0 is nothing else but a shorter version of typing x = 0, y = 0 and z = 0. Just define each one separately if you want them to be independent.

      • Ahmad says:

        first of all, thank you for responding. I think you didn’t get the Point, maybe I didn’t explain clearly.
        anyway, the question is : Where can I define the insert Point in Dynamo of the Profil Family ? (now the insert Point is X=0,Y=0,Z=0)
        should I Change the code that you have written to define new insert Point ? if yes , can you please refer to the line that I should change (in the code)?
        and another question : how can I change the orientation of the profile to make it vertical?
        thank you

  3. Ahmad says:

    I have tried it and that is what I need , thank you very much

  4. Pablo says:


    When extruding the profile, does anyone else get this error message: Warning: Internal error, please report: Dereferencing a non-pointer. (3f47aacd)?

    Many thanks

  5. Martin says:

    Hi Konrad

    I am trying to use the node in Dynamo 1.2 but it consistantly return Null when I feed it a Profile type…

    I also tried to make a Python using your code – it returns the following error:

    Warning: IronPythonEvaluator.EvaluateIronPythonScript operation failed.
    Traceback (most recent call last):
    File “”, line 46, in
    NameError: name ‘family’ is not defined

    Simple graph attached – I try to project a curve onto a surface and extrude a profile along it…

    Any comment welcone…


    Attachment:  Capture-1.png

Leave a Comment