Jump to content

How find a drawing with a specific layer name?


Recommended Posts

Posted (edited)
On 12/8/2022 at 6:02 PM, mhupp said:

 

 

Edited by Remco Koedoot
  • 1 month later...
Posted (edited)

Just quickly, core console doesn't handle 'vl-' very well, but if you can do what you want without it then that is possible.

 

You could look at Lee Macs script writer or look for script writer pro if you have a LISP that works well on 1 drawing, do it on the others as a batch that way. My own batch process is a bit slow for you I guess - it opens and closes the files in turn (for my own reasons, my way after a save leaves a .bak file behind just in case I did something wrong).

 

 

I did see something a while ago for running a LISP from excel  - It will come back to me where I saw it, my own thoughts are that it is usually best to do stuff in the software you want to use - so excel for spreadsheets, CAD for modifying or interrogating drawings

 

 

 

-edit-

Might have been a something BigAl posted

Edited by Steven P
Posted (edited)

"I did see something a while ago for running a LISP from excel"  yep I posted but no idea how do this task from Excel. Would still need a list of dwgs to check.

 

As mentioned need VL for direct to Excel so not sure Accoreconsole would work looking for excel each time as the link needs to be found for each dwg. A script may be a better way.

 

Hmmm

Public Sub Opendwg()
 
    Dim acadApp As Object
    Dim acadDoc As Object

 'Check if AutoCAD application is open. If is not opened create a new instance and make it visible.
    On Error Resume Next
    Set acadApp = GetObject(, "AutoCAD.Application")
    If acadApp Is Nothing Then
        Set acadApp = CreateObject("AutoCAD.Application")
        acadApp.Visible = True
    End If

Maybe dont make acad visible but open a dwg,  then run search for layer.

 

If you want to have a go

How do I open an AutoCAD file from Excel? - Microsoft VBA - Visual Basic for Applications - Eng-Tips


https://www.eng-tips.com/viewthread.cfm?qid=245944

Edited by BIGAL

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...