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.

Support archi-lab on Patreon!


  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

  6. mkayali says:

    it didn’t work! i have tried to attach the profile that i have used but i couldn’t. i also tried the builtin profile families but they also didnt work.
    can you upload the profile family you used?

  7. Kim says:

    Hi Konrad, it worked, kind of. I got the profile from the Revit Profile file that i needed. The only problem is that I need the profile to be based on the X and Z axis instead of X and Y. I am trying to use this profile as the profile of a baseboard to then make a sweep of the profile around the boundaries of a room, thus creating a baseboard by selecting a profile and room.

  8. Tom says:

    Hi Konrad,

    I’ve been trying your node but it returns null.
    Do i need to install Python for the node to run?
    sorry i have no experience in this.

  9. Raul says:

    Please, could someone help me. How can I create a solid (Tunnel case) from concrete with Sweep. My intention is to have a “profile” / “section” and a path extracted from a 3D polyline imported . I am sending a screenshot of the script that is failing me. Thank you

    Attachment:  duda.jpg

Leave a Comment