Jump to content

Report or data tag to display Arc data


Recommended Posts

17 hours ago, Pat Stanford said:

I don't think those values are available in worksheets or Data Tags.

Seems like basic values that should be able to be queried as they are required for every site plan.  I will request an enhancement.  

Link to comment

Isn’t most of this information included in the preformatted Property Line reports? Or are the segment records only attached if you created the arcs as a part of a ‘property line’ object?

Tools: Reports: Create Reports: Preformatted Report: Property Line-Segments

 

Edited by rDesign
Link to comment
2 hours ago, rDesign said:

Isn’t most of this information included in the preformatted Property Line reports? Or are the segment records only attached if you created the arcs as a part of a ‘property line’ object?

In my Opinion the Property Line object is an overcomplicated tool for creating property lines.  The property lines are simply lines from one point to another with or without radius.  The property line tool is not the way any engineer would divide a property.  This is for inputting data that someone else has already created. I never use it.   

  • Like 1
Link to comment

Ok so when looking at a line I was able to write a worksheet function to give the correct bearings to a line in vectorworks. but even if I replace the if's with WS_IF the data tag only reports the name of the tag.  Any ideas of what is wrong with the Data tag forumla?

 

Worksheet formula

=IF((ANGLE>=0), IF((ANGLE=90), CONCAT('N 0°'), IF((ANGLE<90), CONCAT('N ', TRUNCATE(90-ANGLE, 0), '° ', INT((90-ANGLE-INT(90-ANGLE))*60), ''' ', ROUND((((90-ANGLE-INT(90-ANGLE))*60)-INT((90-ANGLE-INT(90-ANGLE))*60))*60), '"', ' E'), CONCAT('N ', TRUNCATE(ANGLE-90, 0), '° ', INT((ANGLE-90-INT(ANGLE-90))*60), ''' ', ROUND((((ANGLE-90-INT(ANGLE-90))*60)-INT((ANGLE-90-INT(ANGLE-90))*60))*60), '"', ' W'))), IF((ANGLE=-90), CONCAT('S 0°'), IF((ANGLE>-90), CONCAT('S ', TRUNCATE(90+ANGLE, 0), '° ', INT((90+ANGLE-INT(90+ANGLE))*60), ''' ', ROUND((((90+ANGLE-INT(90+ANGLE))*60)-INT((90+ANGLE-INT(90+ANGLE))*60))*60), '"', ' E'), CONCAT('S ', TRUNCATE(ANGLE-ANGLE-ANGLE-90, 0), '° ', INT((ANGLE-ANGLE-ANGLE-90-INT(ANGLE-ANGLE-ANGLE-90))*60), ''' ', ROUND((((ANGLE-ANGLE-ANGLE-90-INT(ANGLE-ANGLE-ANGLE-90))*60)-INT((ANGLE-ANGLE-ANGLE-90-INT(ANGLE-ANGLE-ANGLE-90))*60))*60), '"', ' W'))))

 

Data tag Formula

#WS_IF((ANGLE>=0), WS_IF((ANGLE=90), CONCAT('N 0°'), WS_IF((ANGLE<90), CONCAT('N ', TRUNCATE(90-ANGLE, 0), '° ', INT((90-ANGLE-INT(90-ANGLE))*60), ''' ', ROUND((((90-ANGLE-INT(90-ANGLE))*60)-INT((90-ANGLE-INT(90-ANGLE))*60))*60), '"', ' E'), CONCAT('N ', TRUNCATE(ANGLE-90, 0), '° ', INT((ANGLE-90-INT(ANGLE-90))*60), ''' ', ROUND((((ANGLE-90-INT(ANGLE-90))*60)-INT((ANGLE-90-INT(ANGLE-90))*60))*60), '"', ' W'))), WS_IF((ANGLE=-90), CONCAT('S 0°'), WS_IF((ANGLE>-90), CONCAT('S ', TRUNCATE(90+ANGLE, 0), '° ', INT((90+ANGLE-INT(90+ANGLE))*60), ''' ', ROUND((((90+ANGLE-INT(90+ANGLE))*60)-INT((90+ANGLE-INT(90+ANGLE))*60))*60), '"', ' E'), CONCAT('S ', TRUNCATE(ANGLE-ANGLE-ANGLE-90, 0), '° ', INT((ANGLE-ANGLE-ANGLE-90-INT(ANGLE-ANGLE-ANGLE-90))*60), ''' ', ROUND((((ANGLE-ANGLE-ANGLE-90-INT(ANGLE-ANGLE-ANGLE-90))*60)-INT((ANGLE-ANGLE-ANGLE-90-INT(ANGLE-ANGLE-ANGLE-90))*60))*60), '"', ' W'))))#

 

 

Result from the worksheet of four lines each pointing to a different quadrant

image.png.b2c9bcb83e11e305254a5d6d7d723cee.png

 

Link to comment

You can't mix and match between WS and Data Format.

 

Once you type #WS_ until the next )# everything in the middle needs to be in Worksheet format functions only.

 

You can mix #WS_ )# and other #Data Tag# in a single data tag because they are both in data tag format.

 

So try your nested IF inside a single #WS_ delimiter.

 

But it may be too long. Not sure if DT formulas or #WS_ formulas can be over 255 characters.

Link to comment

For the Arc I was able to calulate the Radius, Diameter, and Chord Length, but since the start and end angles are not reported or many of the x y corrdinates I am unable to determine the angle of the chord.  See attached drawing for reference. It seems to me that there should be some formula out there to calculate this. 

 

image.thumb.png.cd569238db0037e03eae6b2b4246797b.png

ARC DATA TAG.vwx

Link to comment

You might have to resort to worksheet scripts,

 

Get2dPt will get you the center and end points of an Arc.  

 

Index of 1 gets the center point.  Index of 2 and 3 get the arc end point.

 

RunScript does work in Data Tags.

 

 

Procedure ArcPoints;
{©2024  Pat Stanford - pat@coviana.com}
{licensed under the Boost Software License 1.0}
{https://github.com/boostorg/boost/blob/master/LICENSE_1_0.txt}
{TL/DR Use as you want, attribution for source, No warranty}

{Worksheet Script to return the X or Y coordinate of a point on an Arc}
{Takes two parameters, first is either a character X or Y to}
{determine which part of the coordinate to return.}
{Second is the index of the point.  0 = arc center. 1 or 2 are the}
{arc end points}

{=RunScript('ArcPoints','X','2')}

VAR	H1		:Handle;
	X1,Y1	:Real;
	S1		:String;
	N1		:Integer;
	
BEGIN
	H1:=WSScript_GetObject;
	S1:=WSScript_GetPrmStr(0);
	UprString(S1);
	N1:=WSScript_GetPrmInt(1);
	Get2DPt(H1,N1,X1,Y1);
	If S1='X' then WSScript_SetResReal(X1);
	If S1='Y' then WSScript_SetResReal(Y1);
End;

Run(ArcPoints);

 

Link to comment

It can be saved as a text file and stored in any of the Resource folders defined for the BuildResourceList commands. But that means that every user is going to have to have a copy of the txt file. If I am doing this (which is very rarely), I typically use code 120 to specify the Reports & Schedules folder in Default content.  RunScript should look in User->Workgroup->Application folder looking for the file.

 

=RunScript(120,'ArcPoints.txt','X',2)

 

If you leave it in a script folder in the Resource Manager, then the script will travel with the file and be useable by whoever has the file.

 

 

Link to comment

I think you will have to rerun it every time.

 

Rather than trying to do the whole thing in Worksheet functions, you are probably better off going to VS/Python and putting all the calcs into a single Worksheet Script. Then you only have one script to run to get your Data Tag output rather than multiple scripts and a bunch of Worksheet stuff.

Link to comment
Posted (edited)
On 8/15/2024 at 2:25 PM, Pat Stanford said:

Rather than trying to do the whole thing in Worksheet functions, you are probably better off going to VS/Python and putting all the calcs into a single Worksheet Script. Then you only have one script to run to get your Data Tag output rather than multiple scripts and a bunch of Worksheet stuff.

Thanks again.  Everything is working great.  I had to create two data tags (one is "Arc Bearing" and the other is "Arc Opposite Bearing") for the arcs because the bearing Northing can't be controlled with the direction that the arc is drawn.  

Also I did put theArcPoints.vs  in the  Reports & Schedules folder in Default content in my workgroup folder. 

 

Updated 08/16/2024 bug fixes

 

Screenshot2024-08-15154343.png.5dcf5a0cc8dfeb945d913d11c3eb870c.png

 

Arc Bearing.vwx

Edited by The Hamma
  • Like 2
Link to comment
  • 4 weeks later...

I revised this for Vectorworks 2025.  

The line labels will rotate with the lines automaticaly and they also compensate for when the Georeferencing Angle to North is changed from 0 degrees. 

 

You will need to put the "ArcPoints.vs"  in the  \Libraries\Defaults\Reports_Schedules of your USER, WORKGROUP, or APPLICATION library folder.

 

The tags are in Site Property Line.vwx file. 

 

 

ArcPoints.vs

  • Like 1
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...