+ Reply to Thread
Results 1 to 3 of 3

Thread: Attext

  1. #1
    Full Member
    Using
    AutoCAD 2007
    Join Date
    Feb 2008
    Posts
    32

    Default Attext

    Registered forum members do not see this ad.

    Hi everyone,

    I am using ATTEXT to extract attributes into a text file. When I create the file and extract the attributes straight away, it works well. However, I need to erase the contents of the file first. So I am using "w" like this:

    (setq y2 (open wpath "w")) ;wpath contains the path of the file

    Then, when I tried to extract the attributes again, Autocad (2007 version) gave me an error "Can't open file". I tried to close the file and open it again using append but it still gave me the error. Can anyone help me please?

  2. #2
    Banned Alan Cullen's Avatar
    Using
    Map 3D 2009
    Join Date
    Jun 2006
    Location
    Cairns, Queensland, Australia
    Posts
    4,185

    Default

    I'm just rushing through here on my way to bed. My first guess is that the file has not been closed from a previous session. Shut down acad and start again. then go to the lisp and make sure the file has been closed.

  3. #3
    Full Member
    Using
    AutoCAD 2007
    Join Date
    Feb 2008
    Posts
    32

    Default

    Hi,

    Finally I managed to solve the problem: my problem was that I was using "read" previously to check whether the file already exists and I wasn't closing the file after the read, only after the write. That's why it couldn't open. Thanks just the same for your help

Similar Threads

  1. counting blocks using ATTEXT
    By explorer in forum AutoCAD Drawing Management & Output
    Replies: 9
    Last Post: 19th Jul 2007, 05:05 pm

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts