Christiaan Posted September 7, 2006 Share Posted September 7, 2006 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. Quote Link to comment
islandmon Posted September 7, 2006 Share Posted September 7, 2006 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); Quote Link to comment
Christiaan Posted September 7, 2006 Author Share Posted September 7, 2006 Thanks islandmon. Presumably I enter this into the Vectorscript editor. If so, what do I enter it as? A tool, point object...? Quote Link to comment
islandmon Posted September 7, 2006 Share Posted September 7, 2006 Drop these two items into Plug-in Folder then place Tool via WorkSpaceEditor: http://www.fractalnet.org/VSS/VSS_BenchmarkXY.zip Quote Link to comment
Christiaan Posted September 8, 2006 Author Share Posted September 8, 2006 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). Quote Link to comment
Christiaan Posted September 8, 2006 Author Share Posted September 8, 2006 It's a pity you can't add dynamic data to Record Format Objects (e.g. X-Y coordinates). Quote Link to comment
islandmon Posted September 8, 2006 Share Posted September 8, 2006 Try snapping to Locus points ... Quote Link to comment
islandmon Posted September 8, 2006 Share Posted September 8, 2006 Sorry, i recall that the Benchmark Symbol should contain a 2dLocus at the insertion point to the avoid the 'offset' problem noted by Christiaan. I should mentioned that in the script header. Quote Link to comment
Christiaan Posted September 8, 2006 Author Share Posted September 8, 2006 Adding a 2D Locus to the symbol didn't help Islandmon (I did try that), neither did adding Locus points to the point before adding the benchmark. Quote Link to comment
islandmon Posted September 8, 2006 Share Posted September 8, 2006 Yeah, thx for pointing this out...just tested it ... it's a bug related to the TextOrigin which offset no matter what by a single character. Since I only use this script for site work the miniscule offset is of no consequence. But still unacceptable. I'll work on it ... thx again. Quote Link to comment
Christiaan Posted September 8, 2006 Author Share Posted September 8, 2006 K, thanks mate. Quote Link to comment
islandmon Posted September 8, 2006 Share Posted September 8, 2006 Here go Christiaan .... Fixes the offset issues. Let me know how it works for you: BenchMarkXY-text Tool Quote Link to comment
Guest Posted September 8, 2006 Share Posted September 8, 2006 Hey guys and hi - I know - dodo question and I shake as I ask! Will it work on a Windows puter? Quote Link to comment
islandmon Posted September 9, 2006 Share Posted September 9, 2006 It should work fine. It's just a basic script. Put it into your VW>Plug-in , then load it onto the 2d palette ( or other ) using Workspace editor. Quote Link to comment
Christiaan Posted October 30, 2007 Author Share Posted October 30, 2007 Crude, but it works Islandmon, thanks a lot. Would be nice to have such a tool built into VectorWorks that did this and more, such as creating column co-ordinate schedules on the fly, for instance. Quote Link to comment
Christiaan Posted October 30, 2007 Author Share Posted October 30, 2007 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? Quote Link to comment
islandmon Posted October 30, 2007 Share Posted October 30, 2007 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. Quote Link to comment
Christiaan Posted October 30, 2007 Author Share Posted October 30, 2007 The crude-liness of the script requires a Benchmark Symbol placement ... hence the need for 2 clicks Ah I see, thanks. There are three options for co-ordinate annotation plugins. I reckon your one is the most usable, thanks to the crudeness Now, if I could just get it display as above. Quote Link to comment
Christiaan Posted November 7, 2007 Author Share Posted November 7, 2007 Actually the two-click is quite handy because the second click allows you to position the text where you like in relation to the benchmark symbol. Quote Link to comment
Recommended Posts
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.