Skip to content
Discussion options

You must be logged in to vote

Just don't redefine the Importer class 😄:

def porte(largeur):
    if largeur > 58 & largeur <= 68 :
        largeur = 63
    elif largeur > 68 & largeur <= 78 :
        largeur = 73
    elif largeur > 78 & largeur <= 88 :
        largeur = 83
    elif largeur > 88 & largeur <= 98 :
        largeur = 93
    sdoc = ezdxf.readfile(f'P{largeur}_droite.dxf')
    tdoc = ezdxf.new()

    ### Don't redefine the Importer class!
    importer = Importer(sdoc, tdoc)
    importer.import_modelspace()

    importer.import_paperspace_layouts()
    tblock = tdoc.blocks.new('SOURCE_ENTS')
    ents = sdoc.modelspace().query('CIRCLE LINE')
    importer.import_entities(ents, tblock)
    PORTE = tdoc.blocks.new(

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by remysompayrac
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Issues
Labels
None yet
2 participants