Jump to content
Harry123

Link Symbol text to area of a shape

Recommended Posts

Hello,

 

I am trying to create a quick workflow to attach information to a text for different shapes. 

 

For example: I have the green shape and I want to show it's area in a text with some more info.

My workflow now: (see image)

I made a symbol of the text with different record fields.

For every shape I click on the shape, write down it's area and then change the number in the record info (level3 in this example).

 

I know there must be a quicker and easier way to automatically link the record info of the text to the object info of the shape (the area of the green shape).

So every time I change the shape, the information in the text will change as well. 

 

Hopefully someone can help me and save me a lot of time and frustration.

 

Thanks!

59674f0da8b5f_ScreenShot2017-07-13at12_40_50.png.248f1baec9050c499996ba6d5484e4ea.png

Share this post


Link to post

You could also make a marionette object using your shape as control geometry. You could still edit your shapes easily and marionette could update the area text automatically. 

Kevin

Share this post


Link to post

Or you could use this script from back in 2008.  It will update the Area Field in every object in the drawing that has that record attached.  Just change the names in the const section to match your record and field names.

 

You will have to rerun the script to get the data to update.

 

Using Spaces or the Marionette option may be better solutions if you truly want live updating.

 

Procedure Area_to_Record;
{Stores the area of an object to an appropriate}
{field in a record attached to the object.}

{March 11, 2008}
{© 2008, Coviana, Inc - Pat Stanford pat@coviana.com}
{Licensed under the GNU Lesser General Public License}

const	RecName='PTS_Record';
			Field='Area';
			Decimals=2;

var		H1:Handle;
			R1:Real;

	Procedure FillRecord(H2:Handle);
		Begin
			SetRField(H2,RecName,Field,Num2Str(Decimals,HArea(H2)));
		End;

Begin
	ForEachObject(FillRecord,((R IN [RecName])));
End;

Run(Area_to_Record);

 

Share this post


Link to post

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.


 

7150 Riverwood Drive, Columbia, Maryland 21046, USA   |   Contact Us:   410-290-5114

 

© 2018 Vectorworks, Inc. All Rights Reserved. Vectorworks, Inc. is part of the Nemetschek Group.

×
×
  • Create New...