#1
|
|||
|
|||
How to determine what is at a particular cursor location
Attached is a sample file. They are groups of X & Y coordinates. These groups seem to be bracketed between ";PATH:" and "G00 Z4.^pA0." I'm having trouble conceptualizing an approach to a DO-WHILE to perform operations between those two endpoints.
The file represents X, Y, Z, A, and C coordinates in a 5-Axis system. I need to switch the X and Y coordinates only. I need to switch the X and Y values and then move them back to their correct relative positions. So X-1.8721 Y-1.5709 becomes X-1.5709 Y-1.8721 X-1.571 Y-20.3033 Z7.802 F80. A-.761 Y-19.7012 Z7.7895 A-1.525 C-3.776 Y-19.0993 Z7.769 A-2.288 Y-18.4977 Z7.7405 A-3.051 . . . becomes Y-1.571 X-20.3033 Z7.802 F80. A-.761 X-19.7012 Z7.7895 A-1.525 C-3.776 X-19.0993 Z7.769 A-2.288 X-18.4977 Z7.7405 A-3.051 . . . Y1.571 X-20.3033 Z7.802 F80. A-.761 C-90. X-19.7012 Z7.7895 A-1.525 C-93.776 X-19.0993 Z7.769 A-2.288 X-18.4977 Z7.7405 A-3.051 X-17.8965 Z7.704 A-3.813 . . . Becomes X1.571 Y-20.3033 Z7.802 F80. A-.761 C-90. Y-19.7012 Z7.7895 A-1.525 C-93.776 Y-19.0993 Z7.769 A-2.288 Y-18.4977 Z7.7405 A-3.051 Y-17.8965 Z7.704 A-3.813 . . . |
#2
|
|||
|
|||
There is no need for a loop. This can be achieved with a simple 3 stage Find and Replace.
|
#3
|
|||
|
|||
The (-) is the negative sign in front of the coordinate. I can't simply search for Xs & Ys.
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Protected Word Document Open Cursor Location | data808 | Word VBA | 9 | 10-14-2022 01:06 AM |
Determine Style of paragraph at current location | exoson | Word VBA | 2 | 01-25-2022 11:15 AM |
Cursor location on first click -- insertion point | stevec5088 | Word | 1 | 12-14-2016 02:45 PM |
determine location of object via calculation | sarahtalbot | Visio | 0 | 01-08-2015 03:27 AM |
Hightlight cells based on cursor location | megads | Excel Programming | 2 | 07-31-2014 06:10 PM |