Results 1 to 5 of 5

Thread: Delete a specific missing shx file?

  1. #1
    Woo! Hoo! my 1st post
    Join Date
    2013-09
    Posts
    1
    Login to Give a bone
    0

    Default Delete a specific missing shx file?

    I'm going through our library of LISP files and cleaning out old unused files. There was an old LISP routine that was loading in a shape shx file automatically into any drawing opened.

    I need to make a simple LISP routine to delete just a specific shx file reference. From searching I've only seen a couple that purge all unreferenced shx files, this won't work because we'd still need to know if CAD received from clients are missing required shx files.

  2. #2
    Certifiable AUGI Addict
    Join Date
    2001-03
    Location
    Tallahassee, FL USA
    Posts
    3,667
    Login to Give a bone
    0

    Default Re: Delete a specific missing shx file?

    I'd leave AutoCAD's LTYPESHP.SHX in there, there are others required for verticals like Civil 3D.
    What's the name of the shape file?
    A simple macro: "-PURGE SHape " followed by the shape name should do it.

  3. #3
    Member
    Join Date
    2001-03
    Location
    ROMANIA
    Posts
    35
    Login to Give a bone
    0

    Default Re: Delete a specific missing shx file?

    Hello Tom.

    I politely ask you to be more specific. Do you want to Purge a Shape file but you are not able to identify the file name, or what?

  4. #4
    Administrator rkmcswain's Avatar
    Join Date
    2004-09
    Location
    Earth
    Posts
    9,805
    Login to Give a bone
    0

    Default Re: Delete a specific missing shx file?

    Quote Originally Posted by StevenB View Post
    I need to make a simple LISP routine to delete just a specific shx file reference. From searching I've only seen a couple that purge all unreferenced shx files, this won't work .....
    Something like this?

    Code:
    (vl-cmdf "._purge" "_SH" "ShapeFile" "_N")
    Oddly... this doesn't seem to work when you specify a certain shape file, with or without the [.shx].
    Feels like a bug.


    Anyone else try this?
    R.K. McSwain | CAD Panacea |

  5. #5
    Certifiable AUGI Addict
    Join Date
    2001-03
    Location
    Tallahassee, FL USA
    Posts
    3,667
    Login to Give a bone
    0

    Default Re: Delete a specific missing shx file?

    Quote Originally Posted by rkmcswain View Post
    Something like this?

    Code:
    (vl-cmdf "._purge" "_SH" "ShapeFile" "_N")
    Oddly... this doesn't seem to work when you specify a certain shape file, with or without the [.shx].
    Feels like a bug.

    Anyone else try this?
    I even tried "-PURGE SH ShapeFile N" at the command line in Civil 3d 2017 and was told "No unreferenced shape files found." Same shape file is removed easily using the dialog box version. Bug?

Similar Threads

  1. Drawing lines and points from a specific DAT/ txt file
    By ivanov.chv460899 in forum AutoLISP
    Replies: 0
    Last Post: 2014-10-24, 05:40 AM
  2. 2012: Importing specific views from a .RVT file
    By some buddy in forum Revit - API
    Replies: 1
    Last Post: 2011-12-07, 02:49 AM
  3. Search file in a specific drive
    By Dubweisertm in forum AutoLISP
    Replies: 15
    Last Post: 2011-09-11, 04:52 AM
  4. Place Linked File at a specific coordinate
    By Graeme Padgham in forum Revit Architecture - General
    Replies: 6
    Last Post: 2010-06-03, 03:44 PM
  5. Replies: 4
    Last Post: 2007-01-22, 11:04 AM

Posting Permissions

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