Jump to content
Rick Noel

Extracting multiple 3d lengths for lines in AutoCAD 2007

Recommended Posts

Rick Noel

Hi all,

This is my first post so please be gentle...

 

I'm trying to extract the 3d length of multiple lines into either a CSV, SSV or directly into a table, I have done a fair amount of research but all of the solutions seem to be for later versions of CAD than the one i'm currently using, I think 2008 is the first to have embedded data extraction for objects as well as attributes?

 

Any help with this would be amazing!

 

Best Regards

 

Rick. :)

Share this post


Link to post
Share on other sites
SLW210

Try using advanced search and specify a date and use "and Older" in an effort to dig up older files. There used to be some LISP and other programs available to do this, pretty sure they are mostly free.

Share this post


Link to post
Share on other sites
ReMark

I posted a possible solution in your other thread. Sorry, I did not see this one or I would have posted it here.

Share this post


Link to post
Share on other sites
alanjt

Quickie...

 

(defun c:Test (/ AT:WriteToFile ss i e lst)
 (vl-load-com)

 (defun AT:WriteToFile (file lst overwrite / fo)
   ;; Write list to file
   ;; file - file to write list to (must be in form "c:\\File.txt")
   ;; lst - list to write to file
   ;; overwrite - If T, will overwrite; nil to append
   ;; Alan J. Thompson, 04.28.09
   (if (and (vl-consp lst)
            (setq fo (open file
                           (if overwrite
                             "W"
                             "A"
                           )
                     )
            )
       )
     (progn (foreach x lst (write-line (vl-princ-to-string x) fo))
            (close fo)
            file
     )
   )
 )

 (if (setq ss (ssget '((0 . "ARC,*LINE"))))
   (progn (repeat (setq i (sslength ss))
            (setq lst (cons (vlax-curve-getDistAtParam
                              (setq e (ssname ss (setq i (1- i))))
                              (vlax-curve-getEndParam e)
                            )
                            lst
                      )
            )
          )
          (startapp "NOTEPAD"
                    (AT:WriteToFile
                      (strcat (getvar 'DWGPREFIX) (vl-filename-base (getvar 'DWGNAME)) ".CSV")
                      (vl-sort lst '<)
                      T
                    )
          )
   )
 )
 (princ)
)

Share this post


Link to post
Share on other sites
faisal

Hi All,

 

I need help regarding Block Attributes.

 

My Problem is that i have a block.dwg and i want to import data collected from our surveyors as Metres and Decimetres, i.e metre should be the attributes with a height of 7 and decimetre should be next to the metre but with height of 5..i have a thousands of points to be imported and after modifying it i will also be exporting it to excel...

 

Any Help would be appreciable

Thanks

Share this post


Link to post
Share on other sites

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
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

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