Jump to content

How to make a symbol that displays its X and Y?


Christiaan

Recommended Posts

Is it possible to make a symbol that dynamically displays its X and Y coordinates?

I'm getting into Record Formats for the first time and wondered if they could do it somehow? Ot is there plugin object that already achieves this?

I'm creating a site plan and want to put corner markers on the buildings with their Northing-Easting values.

Link to comment

Christiaan , a while back I wrote a little code to do this using a benchMark symbol.

{requires a Symbol named "Benchmark" }

PROCEDURE BenchmarkXY;

{$DEBUG}

VAR

h : HANDLE;

dimHD : HANDLE;

pX,pY, X, Y : REAL;

rotationAngle : REAL;

showvalue, boxText :BOOLEAN;

leader, trailer :STRING;

symbolName : STRING;

dimPrec :LONGINT

BEGIN

CallTool(-221);

h := FSActLayer;

GetLocPt(h,pX,pY);

Symbol('Benchmark',pX,pY,0);

TextOrigin(pX+.01, pY+.01);

CreateText(Concat(' E: ', X, ' ? N: ', Y));

DSelectAll;

END;

RUN(BenchMarkXY);

Link to comment

Thanks islandmon, although I'm finding that it's inaccurate. I activate the tool, then hover over an object (which gives me smart cursor feedback) and then click, and then need to click again to place the benchmark. The problem is that on the second click the smart cursor disappears and it's not snapping to anything, so I've been unable to actually create the benchmark in the correct position (it's always a few mils out).

Link to comment
  • 1 year later...

How do I get the script to place the text like this:

N 533392990

N 183976735

Instead of this:

# [ 'E:533393228.7?'N:183977926.5]

After fiddling with the script I did manage to get it looking like this, but with both E and N figures on top of each other (being the VS expert that I am):

'N 533392990

Also, how would I get it to place the object with one click instead of two?

Link to comment
Also, how would I get it to place the object with one click instead of two?

The crude-liness of the script requires a Benchmark Symbol placement ... hence the need for 2 clicks.

As you refine and modify the script, please considering posting it to Vectordepot ...

eventually it should get done right.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...