CONVERT COORDINATES TO EXCEL/TEXT

CONVERT COORDINATES TO EXCEL/TEXT

Anonymous
Not applicable
1,953 Views
4 Replies
Message 1 of 5

CONVERT COORDINATES TO EXCEL/TEXT

Anonymous
Not applicable

I'm having a hard time copying 1 by 1 each coordinate on acad to excel,

i have found what you call LISP that can be used for converting but when i move the UCS the coordinates it was different from what LISP gives

Is there someone who can help me on this? im not knowledgeable about LISP's. Thank you for response.

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

Ranjit_Singh
Advisor
Advisor

You may need to provide more information. Which LISP code are you using? Which co-ordinates are we talking about (co-ordinates of lines, points , plines etc.)? What format you need in excel. Can you do a screencast of what you mean by when i move the UCS the coordinates it was different from what LISP gives.? Or provide some more explanation. There are functions in LISP to change CS from UCS to WCS and vice versa. But without exact understanding of your problem it will be difficult for anyone to help.

Message 3 of 5

CodeDing
Mentor
Mentor


but when i move the UCS the coordinates it was different from what LISP gives

When working with coordinates, you should NOT be moving the UCS!

 

~DD

Message 4 of 5

Kent1Cooper
Consultant
Consultant

@Anonymous wrote:

.... when i move the UCS the coordinates it was different from what LISP gives

Is there someone who can help me on this? im not knowledgeable about LISP's. Thank you for response.


On the assumption that the routine you're using is sending some point out to an external file, and that it starts with a point variable [a list of coordinates], which it converts to a text equivalent, it could be a fairly easy fix.

 

I'll assume a point that you want to write out is in a variable I'll call "pt" [substitute your actual variable name], that comes from some object's entity data or VLA properties [for example, extracted with (cdr (assoc 10 entitydatalist)) for the start point of a Line, or some kind of (vlax-curve-get...Point...  AutoLisp function from various object types].  Those things are always returned in World  Coordinate System values, but you can (trans)late them to values expressed in the current UCS.  Before the "pt" variable gets converted to a text equivalent to go into a (write-line) function to send out to the file, do this:

 

(setq pt (trans pt 0 1))

 

The zero means translate from WCS values; the 1 means translate to current UCS values.

Kent Cooper, AIA
Message 5 of 5

Anonymous
Not applicable