[New Feature Preview] Python 3 Support Issue Thread

Thanks @c.poupin,
I tried to translate the examples you provided to work with my code and unfortunatley I am either not getting it OR there is another issue that is stopping this from working.
Please see my amended snippet of my previous attempt:

  global adoc
    global cdoc
    s1 = "station" #dummy inputs as per advice on other threads
    o1 = "offset"
     # use float as no longer able to use
    # - strongbox functionality  as per ironpython i.e. Double #clr.Reference[float]()
    station = 1.23 
    offset = 1.23 

    output = []

    with adoc.LockDocument():
        with adoc.Database as db:
            with db.TransactionManager.StartTransaction() as t:
                bt = t.GetObject(db.BlockTableId, OpenMode.ForWrite)
                btr = t.GetObject(bt[BlockTableRecord.ModelSpace], OpenMode.ForWrite)
                alignment = None
                for ind,x in enumerate(name):
                    for oid in cdoc.GetSitelessAlignmentIds():
                        al = t.GetObject(oid, OpenMode.ForRead)
                        if al.Name == name[ind]:
                            alignment = al
                            # so trying to use 'dummy' inputs and station offset will be returned to assigned float vars?
                            station,offset=alignment.StationOffset(easting[ind], northing[ind],s1,o1) 
                    # Couldn't find the alignment with the given name
                    if alignment is None:
    #need to allow for start and and points and for flipping osl and os right points
    return [sta, offs]

OUT = get_soe_by_en(names, northings, eastings)

This crashes Civil 3d with unhandled Type Error.

Any further feedback appreciated, maybe @Paolo_Emilio_Serra1 could advise to correct solution here is possible, thanks.


dummy variables must be same type as ref or out parameters


@c.poupin Was there ever a solution/workaround for the family load code you pasted a while back? I’m trying to get that exact same code to work in CPython3 and am having the same issue you experienced (“interface takes exactly one arguement…”). Thanks!

Hi, @jpclark

currently, I didn’t found a stable solution

Hi @c.poupin,

any update on that issue? Could you solve it or is there no way to fix that?
I ran into the same problem unfortunately…
Thank you in advance for your answer!

for which issue ? Net interface ?

Yeah, the bug with family load via .NET interface.

no, I have the impression that PythonNet 2.5.2 fails to Release all resources for some Revit Objects created.
I’m waiting for PythonNet 3.0 hoping that fixes the problem.

IronPython3 final should be released soon too