Új hozzászólás Aktív témák

  • repvez

    addikt

    válasz kovisoft #3994 üzenetére

    az IF sorra és az alatta lévöre jön hiba de nem tudom, hogy tudnám megnézni, hogy hol van a szoköz vagy tab hiba, látszolag egyhelyen vannak.
    > import ezdxf
    >>> from openpyxl import load_workbook
    >>>
    >>> # Load the Excel file
    >>> workbook = load_workbook(filename='G:\g_ref\cross\intersection_points.xlsx')
    >>> worksheet = workbook.active
    >>>
    >>> # Create a new DXF file
    >>> doc = ezdxf.new(dxfversion='R2010')
    >>> msp = doc.modelspace()
    >>>
    >>> # Read the coordinates from the Excel file
    >>> max_row = worksheet.max_row
    >>> for i in range(2, max_row+1):
    ... x = worksheet.cell(row=i, column=1).value
    ... y = worksheet.cell(row=i, column=2).value
    ... z = worksheet.cell(row=i, column=3).value
    ...
    >>> # Check if any of the cells are empty
    >>> if x is not None and y is not None and z is not None:
    File "<stdin>", line 1
    if x is not None and y is not None and z is not None:
    IndentationError: unexpected indent
    >>> msp.add_point((x, y, z))
    File "<stdin>", line 1
    msp.add_point((x, y, z))
    IndentationError: unexpected indent
    >>>
    >>> # Save the DXF file
    >>> doc.saveas('G:\g_ref\cross\coordinates.dxf')
    >>>

Új hozzászólás Aktív témák