See the top rated post in this thread. Click here

Results 1 to 4 of 4

Thread: How find in a directory of dwg drawings as result a drawing with a specific layer name?

  1. #1
    Member
    Join Date
    2010-01
    Posts
    8
    Login to Give a bone
    0

    Default ----------------------------------------------

    -------------------------------------------------
    Last edited by Remco Koedoot; 2024-06-10 at 09:52 AM. Reason: please delete

  2. #2
    Administrator Opie's Avatar
    Join Date
    2002-01
    Location
    jUSt Here (a lot)
    Posts
    9,196
    Login to Give a bone
    0

    Default Re: How find in a directory of dwg drawings as result a drawing with a specific layer name?

    Are you needing work on this solution? If so, where is the current code you have posted fail? That is a lot to review to help you diagnose your code.
    If you have a technical question, please find the appropriate forum and ask it there.
    You will get a quicker response from your fellow AUGI members than if you sent it to me via a PM or email.
    jUSt

  3. #3
    Administrator Ed Jobe's Avatar
    Join Date
    2000-11
    Location
    Turlock, CA
    Posts
    6,584
    Login to Give a bone
    1

    Default Re: How find in a directory of dwg drawings as result a drawing with a specific layer name?

    If you're already using VBA, why do you need it in lisp? VBA manages ObjectDBX just fine, as your sample shows.

    So, if you're getting thousands of layer names, what else do you need?
    C:> ED WORKING....


    LinkedIn

  4. #4
    Administrator Opie's Avatar
    Join Date
    2002-01
    Location
    jUSt Here (a lot)
    Posts
    9,196
    Login to Give a bone
    0

    Default Re: How find in a directory of dwg drawings as result a drawing with a specific layer name?

    You state the code you posted extracts layers from a folder of drawings and places the layer properties and drawing name to a CSV file.

    This routine does use ObjectDBX to open drawings without displaying the graphics. Since the graphics are not being displayed, the routine should be fairly quick.

    I believe you are wanting a similar routine that would prompt the user for a layer name and folder to search. You want the results to output to a shell-window, but I am not certain what that is, instead of a CSV.

    You will need to modify your c:CheckLayers routine to prompt the user with the layer name. You would still want to prompt for the folder to search. After those two things are known, you would still use ObjectDBX to open all of the files (one at a time) found in the specified folder. From there, you would process the layers for each found file to see if the user specified layer is found. If the layer is found, add the drawing name to a list. After all drawings are processed, you can decide how to display the drawings that contain the specified layer. I would still recommend exporting to CSV, but that is not what you want.

    It also appears the posted code is cobbled together with code posted by other people. Please leave a note of the original author and a link back to where those parts of the code can be found again. There may be updates due to bugs that may need to be incorporated in the future.

    Also, if you are using Excel as the controlling code, I believe VBA is included in the installation of Excel. I could be wrong as I do not currently have access to the latest version of Excel to verify.
    If you have a technical question, please find the appropriate forum and ask it there.
    You will get a quicker response from your fellow AUGI members than if you sent it to me via a PM or email.
    jUSt

Similar Threads

  1. Search various folders drawings (.dwg files) for a specific block name.
    By Remco Koedoot in forum CAD Management - General
    Replies: 3
    Last Post: 2022-05-02, 12:35 PM
  2. Replies: 1
    Last Post: 2021-03-24, 12:24 AM
  3. Which variables are Drawing Specific and Which are Session Specific?
    By stusic in forum CAD Management - General
    Replies: 4
    Last Post: 2013-09-10, 01:28 PM
  4. Replies: 12
    Last Post: 2010-01-08, 07:49 PM
  5. Dim Text on Specific Layer instead of having Specific Color
    By Masroor Javid in forum ACA Wish List
    Replies: 0
    Last Post: 2009-02-23, 09:34 AM

Tags for this Thread

Posting Permissions

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