How to Copy / Export Dimension Value to Excel in Single Click using LISP Command?

How to Copy / Export Dimension Value to Excel in Single Click using LISP Command?

rahmat_uk20
Observer Observer
1,424 Views
4 Replies
Message 1 of 5

How to Copy / Export Dimension Value to Excel in Single Click using LISP Command?

rahmat_uk20
Observer
Observer

Assalam-o-Alaikum Experts,

 

I am looking for a LISP Command by which I can easily take Dimension Values to excel file.

 

Suppose I have a CAD file having multiple dimensions and I need to take value of a specific Dimension in excel. When I just click on that very dimension; it must automatically place (copy and paste) value of dimension to excel. 

 

Thanks in advance

 

Rahmatullah Khattak

0 Likes
1,425 Views
4 Replies
Replies (4)
Message 2 of 5

Kent1Cooper
Consultant
Consultant

Questions arise....

 

Are you talking about an already-existing Excel file, or do you want a routine that will make one?  AutoLisp can make a .csv file that Excel can work with, or it can open an existing one, and write to it, if that's what you want.  But I don't think it can write to such a file if you have it open in Excel at the time, as you would if you were copying/pasting manually.

 

Do you want to put the values from multiple Dimensions into one file, or have a separate file for each Dimension you pick?

 

Do your dimensions ever have text-content overrides?  If so, do you want the text as it appears in the drawing, or the actual measured value?

 

Is this about distance-type Dimensions only [linear, horizontal, vertical, rotated, aligned, diameter, radius, ordinate], or might you also need it for angular ones?  If angular, is the measured value in radians acceptable [that is what AutoLisp can extract directly], or do you need it in your current angular format [AutoLisp can convert it]?

 

If it should make a new file, what should be the basis of the file name?

 

Etc., etc.

 

 

Kent Cooper, AIA
0 Likes
Message 3 of 5

Sea-Haven
Mentor
Mentor

Yes put cell value exists in lisp. But like Kent a few questions is excel open or open a file or start a new blank one. If exist where do I start inserting values ?

 

Have a look at getexcel.lsp. Has the answers. Do you understand lisp ? 

0 Likes
Message 4 of 5

rahmat_uk20
Observer
Observer

Dear,

 

I would like to answer your questions accordingly.

 

I am talking about already existing excel file. 

I want multiple dimensions in one existing file.

The dimensions don't have any text-content overrides.

Its all about distance-type dimension. 

 

Simply I would like to add simplicity to my Post:

 

I am just looking for the simplest way (by any means) by which I will click on any dimension (distance-type) in CAD and it may automatically place dimension value already existing excel sheet cells which I may select.

 

I have attached a zip file which contains some lisp commands. By loading these lisp commands in CAD when we can take area by typing "q" without quotes; it places area value. After that we can extract text by entering "txt2xls" without quotes; It automatically places text value into existing excel sheet.

 

Thanks for your time.

0 Likes
Message 5 of 5

Sea-Haven
Mentor
Mentor

Txt2xl is a vlx file so can not edit that file.

 

Did you have a look at getexcel.lsp ? It has get and put to excel. 

0 Likes