See the top rated post in this thread. Click here

Page 1 of 5 12345 LastLast
Results 1 to 10 of 47

Thread: Polylines dimensions export to excel

  1. #1
    Member
    Join Date
    2009-12
    Posts
    12
    Login to Give a bone
    0

    Post Polylines dimensions export to excel

    Can anyone please help me. I am trying to find a lisp which could help me with making of the bbs (bar bending schedule). It means that I want to export my polyline dimensions from autocad drawing to excel file. Every dimension should be in its separate column. Thanks.

  2. #2
    All AUGI, all the time
    Join Date
    2010-10
    Posts
    535
    Login to Give a bone
    0

    Default Re: Polylines dimensions export to excel

    Quote Originally Posted by milivojekrstanovic View Post
    Can anyone please help me. I am trying to find a lisp which could help me with making of the bbs (bar bending schedule). It means that I want to export my polyline dimensions from autocad drawing to excel file. Every dimension should be in its separate column. Thanks.
    You mean the length of the polyline?
    Columns? 15 polylines 15 columns?

    Will there be a test for equal length and a row for quantity?

    Would it be better if Rows for length and colums for quantity?

    Retriving the length is fairly easy

    Code:
    (defun c:test ( / aDoc ss )
    (vl-load-com)
    (setq aDoc (vla-get-ActiveDocument  (vlax-get-acad-object)))
    	(if  (ssget '((0 . "LWPOLYLINE")))
    	  (progn
    	  	(vlax-for itm (setq ss (vla-get-ActiveSelectionSet aDoc))
    	  		(princ (strcat "\nPolyline length :\t"
    				       (rtos (vlax-curve-getDistAtParam
    					       itm
    					       (vlax-curve-getEndParam
    						 itm
    					       )
    					     ) 2 2)
    				       )
    			       )
    		  )
    	    (vla-delete ss)
    	    )
    	  )(princ)
      )
    Last edited by pbejse; 2011-11-01 at 08:51 AM.

  3. #3
    Member
    Join Date
    2009-12
    Posts
    12
    Login to Give a bone
    0

    Default Re: Polylines dimensions export to excel

    Quote Originally Posted by pbejse View Post
    You mean the length of the polyline?
    Columns? 15 polylines 15 columns?

    Will there be a test for equal length and a row for quantity?

    Would it be better if Rows for length and colums for quantity?
    No. I mean length of each segment of polyline. I want to make a separate column for all polyline segment lengths. I plan to make one layer for all polylines which could have the same code (same type). Al of those in that layer would be bars (polylines) of shape code (label) for example 61. So that when you extract it to excel, you get a new row for every polyline, and the name of the row is the name of the layer. So first column would be name of the polyline, and the rest of them would be A, B, C, D, E... lengths of the segments of polylines. And you get a new row for every polyline, no matter if they are the same layer or not.

  4. #4
    All AUGI, all the time
    Join Date
    2010-10
    Posts
    535
    Login to Give a bone
    0

    Default Re: Polylines dimensions export to excel

    Quote Originally Posted by milivojekrstanovic View Post
    No. I mean length of each segment of polyline. I want to make a separate column for all polyline segment lengths. I plan to make one layer for all polylines which could have the same code (same type). Al of those in that layer would be bars (polylines) of shape code (label) for example 61. So that when you extract it to excel, you get a new row for every polyline, and the name of the row is the name of the layer. So first column would be name of the polyline, and the rest of them would be A, B, C, D, E... lengths of the segments of polylines. And you get a new row for every polyline, no matter if they are the same layer or not.
    Post a snapshot of the excel forrmat milivojekrstanovic

    And welcome to the forum

  5. #5
    Member
    Join Date
    2009-12
    Posts
    12
    Login to Give a bone
    0

    Default Re: Polylines dimensions export to excel

    Quote Originally Posted by pbejse View Post
    Post a snapshot of the excel forrmat milivojekrstanovic

    And welcome to the forum
    A, B, C, D .... are the lengths of the segments of the polylines. Shape code column would be the name of the layer.
    Attached Images Attached Images

  6. #6
    All AUGI, all the time
    Join Date
    2010-10
    Posts
    535
    Login to Give a bone
    0

    Default Re: Polylines dimensions export to excel

    Quote Originally Posted by milivojekrstanovic View Post
    A, B, C, D .... are the lengths of the segments of the polylines. Shape code column would be the name of the layer.
    Hmm not as simple as i thought it would be but doable

    What about the Datas for the first 7 columns?

  7. #7
    Member
    Join Date
    2009-12
    Posts
    12
    Login to Give a bone
    0

    Default Re: Polylines dimensions export to excel

    Quote Originally Posted by pbejse View Post
    Hmm not as simple as i thought it would be but doable

    What about the Datas for the first 7 columns?
    it would be great if they could be assinged to the polyline somehow in cad, so that they are generated automatically in excel. all except total length, it has special formula.

  8. #8
    All AUGI, all the time
    Join Date
    2010-10
    Posts
    535
    Login to Give a bone
    0

    Default Re: Polylines dimensions export to excel

    Quote Originally Posted by milivojekrstanovic View Post
    it would be great if they could be assinged to the polyline somehow in cad, .
    Need to get back to you on that one.. for now i'll try to write a simple one.

    One more question, will it be one excel file for inidvidual drawing? and not appending the existing worksheet?

  9. #9
    Member
    Join Date
    2009-12
    Posts
    12
    Login to Give a bone
    0

    Default Re: Polylines dimensions export to excel

    Quote Originally Posted by pbejse View Post
    Need to get back to you on that one.. for now i'll try to write a simple one.

    One more question, will it be one excel file for inidvidual drawing? and not appending the existing worksheet?
    Yes one excel file per one dwg.

  10. #10
    All AUGI, all the time
    Join Date
    2010-10
    Posts
    535
    Login to Give a bone
    0

    Default Re: Polylines dimensions export to excel

    Quote Originally Posted by milivojekrstanovic View Post
    Yes one excel file per one dwg.
    Ok, while i'm working on the code, try searching the forum for similar request

Page 1 of 5 12345 LastLast

Similar Threads

  1. .Net code to import polylines from excel
    By gisvision in forum Dot Net API
    Replies: 15
    Last Post: 2023-06-05, 02:28 PM
  2. Extract area of polylines to excel
    By autocad.wishlist1734 in forum AutoCAD Wish List
    Replies: 2
    Last Post: 2013-01-06, 06:04 AM
  3. AutoCAD dimensions to Excel
    By bartstienaers in forum AutoCAD Customization
    Replies: 4
    Last Post: 2005-11-09, 03:27 PM
  4. Dimensions that follow polylines
    By autocad.wishlist1734 in forum AutoCAD Wish List
    Replies: 0
    Last Post: 2005-10-31, 02:01 PM
  5. REVIT dimensions can take formula like excel
    By Chirag Mistry in forum Revit Architecture - Tips & Tricks
    Replies: 21
    Last Post: 2005-08-06, 03:23 PM

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
  •