Jump to content

Recommended Posts

Posted (edited)

I wrote this routine to check for number of tabs on a drawing thru DBX

 

 
(defun c:FindTabs (fileNames )
(cond ((and fileNames 
        (setq myDoc (vla-GetInterfaceObject
                         (vlax-Get-Acad-Object)
                         (strcat "ObjectDBX.AxDbDocument." (substr (getvar 'AcadVer) 1 2)))))
 (setq AuditFile "D:\\My Documents\\test_reaL.csv" 
              AuditFile (open AuditFile "a"))
   (foreach File Filenames
  (cond (
           (not (vl-catch-all-apply 'vla-Open (list myDoc  file :vlax-true)))

                 (if (> (vla-get-count (vla-get-layouts myDoc)) 2)
                    (write-line (vla-get-name myDoc) AuditFile)
                     )
           )
                  )
          )

        (vl-catch-all-apply 'vlax-Release-Object (list myDoc))
        (close AuditFile)
        )
  )
 )

 

everythings working fine, somewhere along the way it shows

 

"Two vertices were added to a 2D pline (3AFB9) which had no

vertices."

 

What do you think is causing this? any thoughts?

 

i'm runiing this code thru 9000+ files.

 

Autocad 2009

 

Edit: everything appears to be okay now.. Dont really know what gives the first time i run it on 500 files, All is well

Thanks

Edited by pBe
Light bulb
Posted

crap! the message is back

 

suggestions gentlemen?

Posted

Sounds like an issue from a different code that is creating an LWPolyline definition with no vertices, but with DXF 90 set to 2.

Posted
Sounds like an issue from a different code that is creating an LWPolyline definition with no vertices, but with DXF 90 set to 2.

 

That could be it.

When you running ODBX does is still load acaddoc.lsp and all routines at startup suite?

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...