open & vl-file-copy long file name bug & workaround

Discussion in 'AutoCAD' started by Eric Boehlke, Aug 26, 2003.

  1. Eric Boehlke

    Eric Boehlke Guest

    There seems to be a limitation on AutoLISP (ACAD 2002) opening or
    copying files with a very long name + path.

    I think the workaround is to use vl-file-rename and temporarily rename
    the file that needs to be opened to something with a short name.

    Example:
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    _$ (setq x (getfiled "" "" "" 0))
    "G:\\Details\\06 - Envelope\\01 Exterior Wall Types\\Cavity
    Walls\\Brick Veneer\\LMF
    Back-Up\\0000-brick-code-01_exterior-wall-at-slab-w-relieving-angle.det"
    _$ (setq a (open x "r"))
    nil
    _$ (vl-file-copy x "c:/temp/xxx")
    nil
    _$ x
    "G:\\Details\\06 - Envelope\\01 Exterior Wall Types\\Cavity
    Walls\\Brick Veneer\\LMF
    Back-Up\\0000-brick-code-01_exterior-wall-at-slab-w-relieving-angle.det"
    _$ (vl-file-rename x "c:/temp/xxxyyy")
    T
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    Perhaps there is some setting to avoid this problem.
     
    Eric Boehlke, Aug 26, 2003
    #1
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.