Roadmap for Floor Sketch / Slab Shape Editor API access?

Roadmap for Floor Sketch / Slab Shape Editor API access?

Tom_Bionda
Advocate Advocate
884 Views
8 Replies
Message 1 of 9

Roadmap for Floor Sketch / Slab Shape Editor API access?

Tom_Bionda
Advocate
Advocate

Hi Autodesk team,

 

Currently, the Revit API does not allow creation or modification of Floor sketch geometry or Slab Shape Editor points. As a result, tools built on the API (Dynamo, pyRevit, custom add-ins) cannot automate common workflows such as adding or adjusting floor boundary points or slab shape control points.

This limitation is a significant blocker for parametric and computational workflows, especially for structural and architectural use cases where floors are frequently regenerated or adjusted based on design logic.

A key real-world scenario:
To collaborate efficiently with the civil engineering team, who provide concrete slab designs with slopes by exporting from their software (e.g., 12D Model or Civil 3D), it should be possible to directly map their design points onto a Revit floor family. Currently, this is impossible without manual recreation, which is time-consuming and prone to errors.

To work around this limitation, we built a Dynamo/pyRevit script that reads CSV points exported from civil software and places Generic Model family instances at those points. Here’s a simplified summary of the script workflow:

  1. User selects a CSV file containing X, Y, Z coordinates.

  2. Script reads the points from CSV.

  3. User selects a Generic Model family type.

  4. Script places a family instance at each point.

As a workaround, we currently import XYZ points from civil software (Civil 3D / 12D) via CSV and place Generic Model families at those coordinates using the Revit API (example below). However, these points cannot be applied to Floor or Slab Shape geometry.

 

         # Read XYZ points from CSV exported by civil software
         def read_csv_points(file_path):
         points = []
         with open(file_path, 'r') as f:
         reader = csv.reader(f)
         next(reader, None) # skip header
         for row in reader:
         x, y, z = map(float, row[:3])
        points.append(XYZ(x, y, z))
        return points

       # Place point families at civil design coordinates
        t = Transaction(doc, "Place Civil Design Points")
        t.Start()
        for pt in read_csv_points(csv_file):
        doc.Create.NewFamilyInstance(pt, family_symbol, 0)
        t.Commit()

 

While this works for visualization and marking, it does not replace the ability to map points directly to floor geometry, nor does it allow native floor or slab shape editing in Revit. A native API that supports Floor sketch or Slab Shape Editor points would make this process far more robust, efficient, and interoperable.

My questions are:

  1. Is there any plan to expose Floor sketch geometry or Slab Shape Editor point editing in the Revit API?

  2. If not, is this a deliberate design decision due to model stability or analytical concerns?

  3. Are newer systems (e.g., Toposolids) intended to replace this functionality for point-based workflows and civil/structural interoperability?

Understanding whether this is on the roadmap or explicitly out of scope would help teams plan long-term automation strategies and improve collaboration across disciplines.

 

Thanks for any clarification.

0 Likes
Accepted solutions (1)
885 Views
8 Replies
Replies (8)
Message 2 of 9

GaryOrrMBI
Advisor
Advisor

Since this references the API you would probably get further posting in that specific Forum.

Although you seem to be referencing Dynamo, not the actual API, and that is probably limiting you further...

 

But as to the Capabilities of the actual API in regard to Floors, you might need to dig a little deeper:

 

Help | Floor Class | Autodesk

 

Help | Floor.GetSlabShapeEditor Method | Autodesk

Help | SlabShapeEditor Class | Autodesk

 

Help | Floor.SketchId Property | Autodesk

Help | Sketch Class | Autodesk

Help | Sketch.SketchPlane Property | Autodesk

Help | SketchEditScope Class | Autodesk

 

Happy Coding,

-G

 

Gary J. Orr
GaryOrrMBI (MBI Companies 2014-Current)
aka (past user names):
Gary_J_Orr (GOMO Stuff 2008-2014);
OrrG (Forum Studio 2005-2008);
Gary J. Orr (LHB Inc 2002-2005);
Orr, Gary J. (Gossen Livingston 1997-2002)
Message 3 of 9

ctm_mka
Collaborator
Collaborator

As Gary pointed out, you can absolutely do things with floors, and create them from points, the key is creating a curve loop correctly for the floor sketch.

Message 4 of 9

Tom_Bionda
Advocate
Advocate

Hi Guys, 

 

Thank you very much for your suggestions and references to the Floor API, Floor.GetSlabShapeEditor, SlabShapeEditor, SketchEditScope, and related methods. I really appreciate the guidance—it clarifies what is possible with the current API and the proper workflow for floor geometry.

Apologies if my question is in the wrong forum (maybe if you could just "throw" me into correct forum then?); I am grateful for any insights you can provide. I completely understand that adding points in the Slab Shape Editor may not be possible via the current Revit API, and I truly value your expertise in explaining the capabilities and limitations.

To clarify my workflow and context: I had previously tried using Dynamo to automate CSV point imports and floor generation. While Dynamo is powerful, I found it limited in handling large point datasets, filtering extremes, and creating accurate floor boundaries from external civil models (12D / Civil 3D). This led me to explore pyRevit scripts, which give more flexibility to preprocess points, filter high/low extremes, and place them accurately in Revit as Generic Model instances.

The core challenge I’m trying to address—and I want to make sure this is understood—is directly mapping CSV points from civil software onto Revit floor geometry, including floors with slopes and complex boundaries. Currently, without native API access to Floor sketch points or Slab Shape Editor vertices, this remains impossible without manual recreation, which is time-consuming and error-prone.

Your guidance about creating curve loops for floor sketches is very helpful. My main question is whether there is any plan to expose Floor sketch geometry or Slab Shape Editor point editing in the Revit API, or if this is a deliberate design decision due to model stability or analytical concerns. Knowing this would help teams plan robust automation workflows for civil/structural collaboration.

Thank you again for your time, guidance, and helpful resources. I hope this clarifies my workflow and the intent of my original message. I sincerely appreciate your expertise and advice.

 

Cheers

0 Likes
Message 5 of 9

GaryOrrMBI
Advisor
Advisor
Accepted solution

It's all there in the "native" (written and provided by the same Autodesk developers that provide Revit itself) Revit API (Application Programming Interface).

Your problem is that Dynamo and pyRevit are too lightweight in terms of programming capabilities (in my opinion, although I am not as familiar with those programming interfaces to know all of their capabilities and/or limitations because I found them too limiting initially to spend much time with them) to tackle the size of job that you're trying to do. To get to something of this scope you will probably need to look at a stronger and more robust Application Programming Toolset: Microsoft Visual Studio (for example) and either Visual Basic or C Sharp (the more common these days) as the language.  These tools will allow for a deeper dive into what is actually possible with the native Revit API.

 

I did not provide every aspect of the API that you will need to get this job done, just some of the starting points. Learn, read, understand what is there. In addition to the boundary (of whatever complexity) you can add folding lines or point by point modifications (your "Slab Shape Editor point editing") to the slab(s) for whatever slopes you are needing to create. It's up to you to program the "pre-processing, filtering, and placement" using the full capabilities of the Revit API, and for that you need an editor that is capable of accessing the whole of the API as it exists.

 

-G

 

Gary J. Orr
GaryOrrMBI (MBI Companies 2014-Current)
aka (past user names):
Gary_J_Orr (GOMO Stuff 2008-2014);
OrrG (Forum Studio 2005-2008);
Gary J. Orr (LHB Inc 2002-2005);
Orr, Gary J. (Gossen Livingston 1997-2002)
0 Likes
Message 6 of 9

ctm_mka
Collaborator
Collaborator

@Tom_Bionda one question, does it need to be a floor? would a toposolid suffice? in which case none of this is necessary, default topo tools would suffice.

0 Likes
Message 7 of 9

GaryOrrMBI
Advisor
Advisor

@ctm_mka , You do realize the irony that the Revit developers threw in for us in regards to the API there don't you (with both the Floor Class and the new Toposolid Class being derived from the CeilingAndFloor Class with similar or even identical methods available)?

 

GaryOrrMBI_0-1770656183697.png

 

GaryOrrMBI_1-1770656254720.png

 

GaryOrrMBI_2-1770656632038.png

GaryOrrMBI_3-1770656672548.png

 

 

It just keeps getting more and more fun doesn't it?

ReallyBigGrin

 

-G

 

 

Gary J. Orr
GaryOrrMBI (MBI Companies 2014-Current)
aka (past user names):
Gary_J_Orr (GOMO Stuff 2008-2014);
OrrG (Forum Studio 2005-2008);
Gary J. Orr (LHB Inc 2002-2005);
Orr, Gary J. (Gossen Livingston 1997-2002)
Message 8 of 9

ctm_mka
Collaborator
Collaborator

@GaryOrrMBI oh yes, that i do.

0 Likes
Message 9 of 9

Taehoon.AS.BIM
Explorer
Explorer

Hello everyone,

If anyone has been looking for a solution, I figured out with Claude how to fix the Dynamo package SlabShapeByPoints, which doesn't work in Revit 2026–2027 because the API syntax has changed.

The DrawPoint method used in Revit 2024–2025 has been replaced by:

  • AddPoint for internal points
  • ModifySubElement for edge points

Also, the SlabShapeEditor must be enabled before calling the AddPoint method.

Below is my modified Python script for SlabShapeByPoints. It enables the SlabShapeEditor, identifies edge points for ModifySubElement, and uses AddPoint for internal points.

 

import clr
clr.AddReference('RevitAPI')
from Autodesk.Revit.DB import *

clr.AddReference("RevitNodes")
import Revit
clr.ImportExtensions(Revit.GeometryConversion)

clr.AddReference("RevitServices")
import RevitServices
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager

XY_TOLERANCE = 0.01  # ft  (about 3mm) – Tolerance for edge vertex location

def FindExistingVertexAtXY(sle, xyz, tol):
    # Find Edge Vertex x,y location
    for v in sle.SlabShapeVertices:
        vp = v.Position
        if abs(vp.X - xyz.X) < tol and abs(vp.Y - xyz.Y) < tol:
            return v
    return None

def AddPointToSlabShape(item, point, doc, errors):
    # SlabShapeEditor enble (for all versions)
    if hasattr(item, "GetSlabShapeEditor"):
        sle = item.GetSlabShapeEditor()
    elif hasattr(item, "SlabShapeEditor"):
        sle = item.SlabShapeEditor
    else:
        errors.append("SlabShapeEditor isn't enabled")
        return False

    xyz = point.ToXyz()

    try:
        #  If ‘SlabShapeEditor’ is inactive AddPoint/ModifySubElement  will be ignored -> Enable before Run
        if hasattr(sle, "IsEnabled") and not sle.IsEnabled:
            sle.Enable()
            # Important :  SlabShapeVertices is empty just after enabling SlabShapeEditor.
            # Regenerate for edge vertex.
            doc.Regenerate()

        # 1) Try find edge vertex 
        existing = FindExistingVertexAtXY(sle, xyz, XY_TOLERANCE)
        if existing is not None:
            # If it’s edge point, get offset and try ModifySubElement
            offset = xyz.Z - existing.Position.Z
            sle.ModifySubElement(existing, offset)
            return True

        # 2) If not, try AddPoint 
        if hasattr(sle, "AddPoint"):
            vertex = sle.AddPoint(xyz)
            return vertex is not None
        else:
            #  For old version(2024-2025) compatibility
            vertex = sle.DrawPoint(xyz)
            return vertex is not None
    except Exception as e:
        # For error messages
        errors.append(str(e))
        return False

doc = DocumentManager.Instance.CurrentDBDocument
items = UnwrapElement(IN[1])
errors = []  #  For debug

TransactionManager.Instance.EnsureInTransaction(doc)

if isinstance(IN[1], list):
    if isinstance(IN[0], list):
        OUT = []
        for item, points in zip(items, IN[0]):
            if isinstance(points, list):
                OUT.append((item, [AddPointToSlabShape(item, x, doc, errors) for x in points]))
            else:
                OUT.append((item, AddPointToSlabShape(item, points, doc, errors)))
    else:
        OUT = [(x, AddPointToSlabShape(x, IN[0], doc, errors)) for x in items]
    OUT = list(map(list, zip(*OUT)))
else:
    if isinstance(IN[0], list):
        OUT = items, [AddPointToSlabShape(items, x, doc, errors) for x in IN[0]]
    else:
        OUT = items, AddPointToSlabShape(items, IN[0], doc, errors)

TransactionManager.Instance.TransactionTaskDone()

# If there is any failure points, out the error messages
OUT = [OUT, errors]