Points (by click selection) Coordinates to Excel with Automatic Numbering...

Points (by click selection) Coordinates to Excel with Automatic Numbering...

Yasir.Aman
Advocate Advocate
4,703 Views
25 Replies
Message 1 of 26

Points (by click selection) Coordinates to Excel with Automatic Numbering...

Yasir.Aman
Advocate
Advocate

Hi,

I am looking for a lisp to export point coordinates to excel. The points are selected by clicking one-by-one. I found a lisp named "Click2Xls" by CADSTUDIO.cz, and it works perfectly except it does not add point numbers (neither to the drawing nor to the excel sheet).

So basically, I need the exact same functionality as "click2xls", but with every click I need to add an incremental point number (both in the drawing and excel sheet). Moreover, it will be great if I have the option to choose the start and increment of the numbering, as well as the ability to UNDO a point without leaving the ongoing command.

Hope I explained myself properly.

Thank you all!

 

P.S. I have already tried to thoroughly search this forum, as well as, world wide web, but couldn't find something more similar other than the "click2xls". Forgive me if I missed something out there, and kindly point me to it.

0 Likes
Accepted solutions (2)
4,704 Views
25 Replies
Replies (25)
Message 2 of 26

Sea-Haven
Mentor
Mentor

Did you try to contact the authors and ask ? A VLX is for the reason of people not changing the authors code.

 

This from here at Autodesk/forum.

 

SeaHaven_0-1680155935632.png

 

0 Likes
Message 3 of 26

Yasir.Aman
Advocate
Advocate

Dear @Sea-Haven, I Do Not in any way intend to change/modify their code.

 

As I mentioned in my question, I just need similar functionality. I referred to the "click2xls" for sake of clarification regarding my intended end-result.

 

Do you think I still need to get permission from CadStudio.cz?

0 Likes
Message 4 of 26

Sea-Haven
Mentor
Mentor

Ask them not me.

0 Likes
Message 5 of 26

komondormrex
Mentor
Mentor

hey, and points are not point entities? 

0 Likes
Message 6 of 26

Yasir.Aman
Advocate
Advocate

@Sea-Haven

In my opinion, my question clearly stated that I require similar functionality and that it has nothing to do with reverse engineering or any other similar activity. However, I believe that you raised an ethical objection to my question without thoroughly reading it. I apologize if I am mistaken.

I asked you because you raised a question, and I wanted to clarify my stance. Please note that I do not intend any disrespect.

However, if any moderator of this community feels that I am still in the wrong, kindly inform me, and I will happily modify or delete this post if necessary.

Thank you.

0 Likes
Message 7 of 26

Yasir.Aman
Advocate
Advocate

@komondormrex 

Thank you for your interest.

To clarify, the points I wish to select are not point (node) entities. Rather, I would like to be able to click anywhere in the drawing (sometimes using osnap) and have that coordinate marked as an incremental number while simultaneously exporting the point to an Excel file.

0 Likes
Message 8 of 26

komondormrex
Mentor
Mentor

got it. i have recently written a program, which can be used with some adaptation for your purpose. but i'd prefer to write point data to csv file. is it okay for you? 

0 Likes
Message 9 of 26

Sea-Haven
Mentor
Mentor

What I was suggesting was that you have a very close program now to what you want, often the authors of programs that are named will make different versions and post them. Making a Autocad -> Excel lsp is not a 5 minute exercise. But adding something to an existing can be like 10 minutes, as you only want a add point number.

 

Valdimir reads posts here so ask.

0 Likes
Message 10 of 26

Yasir.Aman
Advocate
Advocate

Sure! That sounds good. But ideally, I would like the incremental numbers to appear in real-time as soon as I click on a point in the drawing.

Additionally, it would be useful to have the ability to undo a click without exiting the command in case of an incorrect selection.

Once I have selected all the necessary points and am satisfied with the numbering, the program can then send the points to a CSV, TXT, XLS, or any other suitable file format.

0 Likes
Message 11 of 26

Yasir.Aman
Advocate
Advocate

I apologize for the misunderstanding. I would be grateful if you could tag Mr. Vladimir for me. Perhaps he would consider helping.

Thank you.

0 Likes
Message 12 of 26

komondormrex
Mentor
Mentor

hey, check the code attached. 

Message 13 of 26

Yasir.Aman
Advocate
Advocate

Wow! Almost perfect. 😍

 

I have encountered a glitch in the program. If I run the command and access the settings menu (before placing any points) to select a starting number, the numbering starts from my_selected_number minus one. For example, if I run the command, go to the settings, and select the starting number as 51, when I make the first click, the numbering begins at 50. Can you please investigate this issue?

 

Thank you very much.

 

P.S. Could you please create another version with the option to use "U" to undo one step and "<ESC>" to cancel the command?

0 Likes
Message 14 of 26

Yasir.Aman
Advocate
Advocate

I apologize for the inconvenience. Could you please include the functionality to draw a point entity at the selected coordinate in addition to the incremental text?

Thank you.

0 Likes
Message 15 of 26

komondormrex
Mentor
Mentor
Accepted solution

hey,

1. i corrected starting number not to be decreased by 1. 

2. <esc> was chosen deliberately, because it is natural error reaction of ongoing command to that key pressed, which can be trapped and thus program execution can be changed. unfortunately there is no way to trap 'u' pressing to perfom undo of a point. unless 'grread' will be used. but in that particular case you will get problems with snapping... so it will stay as it is.

3. if there is a need to add a point entity with every click , i think a better solution will be using a block with point entity and number attribute inside of it. but again it [a block] should go in parallel with program which is ain't good too... 

Message 16 of 26

Yasir.Aman
Advocate
Advocate

Thank  you so much for your effort, and also for the explanation.

Highly Appreciated.

0 Likes
Message 17 of 26

komondormrex
Mentor
Mentor

your welcome)

however, solution with block could be realized if a block itself will be implemented in the program.

0 Likes
Message 18 of 26

Yasir.Aman
Advocate
Advocate

Got it. But I don't need the block anyway, as it will go against my workflow.

Thanks

0 Likes
Message 19 of 26

komondormrex
Mentor
Mentor

why is that? i mean why is using blocks is against your workflow routine? 

0 Likes
Message 20 of 26

Yasir.Aman
Advocate
Advocate

Occasionally, we may need to modify the properties such as size, color, etc. of the numbering text at a later stage. Creating blocks with attributes can make this task difficult and time-consuming, particularly when dealing with a large number of points.

0 Likes