Importing AutoCAD objects individually

I am have issue with the output I would prefer not to list what is above this. I am missing something it it says there is an error with OUTPUT = DocumentImportResult



def main():
    # Get the step file path
    filePath = "path/to/file.step"

    # Import the model
    instance = ImportInstance.BySatFile(filePath)

    # Add the model to the active Revit document
    doc = DocumentManager.Instance.CurrentDBDocument
    doc.GetElementsInModel(instance).Add(instance)

    # Get the import result
    importResult = doc.Import(instance)

    # Return the import result
    return importResult

if __name__ == "__main__":
    main()

OUTPUT = DocumentImportResult

Can’t help much with the code stub as provided, as it’s somewhat incomplete and we have no indication of what the imports, inputs or error message is.

But by the looks of it you haven’t defined the variable DocumentImportResult anywhere.